Repository navigation
fix(gateway): route v2 openai calls over the responses api - #1166
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
|
/wizard-ci basic-integration/javascript-node |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
|
/wizard-ci basic-integration/javascript-node |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
OpenAI rejects function tools combined with reasoning_effort on /v1/chat/completions, which every task in the pi harness sends. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… empty plan Legacy keeps chat completions, so the transport change reaches only runs on the new gateway. An empty task queue after seeding now fails the run rather than reporting success with zero steps. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…he caller A 401 means the endpoint does not recognise the credential, which is the case for the API key CI runs with. The legacy gateway authenticates that credential itself, so a downgrade grants nothing. 400, 403 and 429 stay fatal: those are callers the endpoint authenticated and then refused. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The hollow-run abort on the drain covers it, with an error code and a message for the user. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bb36963 to
bf00bde
Compare
|
/wizard-ci basic-integration/javascript-node |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
Problem
Setup-wizard runs against the Go gateway do nothing and still report success. OpenAI refuses function tools combined with
reasoning_efforton/v1/chat/completions, and every task in this harness sends both, so each agent turn comes back 400.Changes
Moves OpenAI-class models onto the Responses API, but only for runs on the new gateway. Anthropic models are untouched.
gatewayApiFornow takes the gateway edition.v2getsopenai-responses; legacy stays on chat completions, where litellm already does that routing. The transport change reaches only the runs that need it, not the ~100% still on the old gateway.baseUrlkeys offanthropic-messagesrather than naming the OpenAI shape, so the/v1suffix survives the rename.reasoning_effort: 'none', but these calls produce real reasoning today.Test plan
vitest run src/lib/agent: 529 tests pass, including a new case pinning that a v2 run resolves toopenai-responseswhile a legacy run stays onopenai-completions.reasoning_effortreturn 400 on/v1/chat/completionsand succeed on/v1/responses. The legacy gateway serves/v1/responsesas well (401 there, against 404 on an unknown path), so the edition gate limits blast radius rather than working around a missing route.Known gap: the empty-queue guard is not pinned by a test. Nothing drives
runOrchestratorend to end today and the neighbouring tests cover pure helpers, so reverting that line fails nothing.This changes the transport for every OpenAI model on the v2 path, including the scan-triage call, and no unit test touches the wire. A live wizard run with the rollout flag enabled is the real gate.
LLM context
Authored with Claude Opus 5; requires human review.