feat(TASK-041): add WireApi enum and wire-aware Responses dispatch
Introduce a WireApi enum (responses|chat) with an optional wire_api config field on the openai and openai-compatible clients, resolved through a single resolve_wire_api fn: codex forces the responses wire (an explicit wire_api: chat there is a hard config error), an explicit wire_api wins everywhere else, and the default stays chat for now. The openai dispatch generalizes from (RequestData, bool) to (RequestData, WireApi), and the openai-compatible client gains opt-in Responses dispatch (URL, body, extractor, and streaming forks). Both patch layers are now wire-aware: RequestData carries its wire, RequestPatch gains a responses section, and patch_request_data selects patches per wire. This deliberately FIXES a codex bug: chat-shaped model patches (e.g. o3-high's max_tokens/temperature/top_p/ reasoning_effort tweaks) previously merged wire-blind into codex responses bodies, poisoning them with chat-only keys. On the responses wire only an explicit responses sub-patch applies; chat-wire patching is byte-identical to before (pinned by a regression test).
This commit is contained in:
5 files changed
+646
-44
No files matched your search
@@ -73,6 +73,7 @@ impl BedrockClient {
|
||||
url: _,
|
||||
headers,
|
||||
body,
|
||||
..
|
||||
} = request_data;
|
||||
|
||||
let builder = aws_fetch(
|
||||
@@ -126,6 +127,7 @@ impl BedrockClient {
|
||||
url: _,
|
||||
headers,
|
||||
body,
|
||||
..
|
||||
} = request_data;
|
||||
|
||||
let builder = aws_fetch(
|
||||
|
||||
Reference in new issue
Block a user