Implement llm-connect ADHOC diagnostics
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled

This commit is contained in:
2026-06-03 11:56:21 +02:00
parent 79c899b694
commit 24f4c09d42
17 changed files with 1618 additions and 611 deletions

View File

@@ -4,11 +4,11 @@ type: workplan
title: "Ad hoc — llm-connect lessons from CUST-WP-0045 canary"
domain: custodian
repo: llm-connect
status: ready
status: finished
owner: custodian
topic_slug: custodian
created: "2026-06-02"
updated: "2026-06-02"
updated: "2026-06-03"
state_hub_workstream_id: "1c936c91-79c7-427d-ab37-9052e8a61cda"
---
@@ -38,7 +38,7 @@ workplan.
```task
id: ADHOC-2026-06-02-T01
status: todo
status: done
priority: medium
state_hub_task_id: "69626e9e-29f1-40f6-8cd2-d38a7e802293"
```
@@ -78,7 +78,7 @@ debug field is omitted in normal mode.
```task
id: ADHOC-2026-06-02-T02
status: todo
status: done
priority: low
state_hub_task_id: "e2b1be30-71f7-4497-9b10-b0f24d37beba"
```
@@ -101,7 +101,7 @@ max of their individual latencies, not the sum.
```task
id: ADHOC-2026-06-02-T03
status: todo
status: done
priority: medium
state_hub_task_id: "da4821f0-a876-44ce-9dc3-f3fc67732d0f"
```
@@ -127,7 +127,7 @@ ergonomics.
```task
id: ADHOC-2026-06-02-T04
status: todo
status: done
priority: medium
state_hub_task_id: "f8a033e6-22ac-4700-b8d2-43a5d76a3751"
```
@@ -155,7 +155,7 @@ forbidden top-level fields, schema in the right wrapper).
```task
id: ADHOC-2026-06-02-T05
status: todo
status: done
priority: medium
state_hub_task_id: "5d53dbb4-b374-45fe-b81c-ff0b222ca74f"
```
@@ -188,7 +188,7 @@ bug) before either was merged.
```task
id: ADHOC-2026-06-02-T06
status: todo
status: done
priority: low
state_hub_task_id: "33fcb951-d7ab-4d3c-8d67-9eebd986c711"
```
@@ -210,3 +210,21 @@ would only send OpenAI-valid fields. Codify the contract in
Done when a new adapter author can read the doc and know what their
`_merge_model_params` implementation must support.
## Implementation Notes
Completed on 2026-06-03:
- Added opt-in `/execute` debug envelopes via `LLM_CONNECT_DEBUG=1` or
`?debug=1`, with redacted provider request/response capture and adapter
transformation records.
- Switched serve mode to `ThreadingHTTPServer` and added a concurrency
regression test.
- Added `LLM_CONNECT_AUDIT_DIR` per-call audit records plus
`python -m llm_connect.replay` for parser/unwrapper replay.
- Extracted shared OpenAI-compatible and Gemini payload translation helpers
and wired OpenRouter, OpenAI, and Gemini through them.
- Added CI-safe structured-output smoke tests that mock provider HTTP calls
and assert model routing plus payload shape.
- Documented the adapter `model_params` contract in
`docs/adapter-model-params.md`.