Repository navigation
fix(opengateway): lower routed custom tools on the Responses wire - #6879
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The OpenGateway preset, tests, and guide align on converting custom-tool history to function tools. No actionable issue remains before normal merge checks. Pre-merge checks |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be40e5b008
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // #6877: on the Responses wire OpenGateway answers 400 once history replays native | ||
| // custom_tool_call/custom_tool_call_output items (Codex code-mode exec), and accepts the | ||
| // same request after the custom tool is lowered to a function. Same contract as xAI. | ||
| supportsResponsesCustomTools: false, |
There was a problem hiding this comment.
Update the owned structure docs for this registry behavior
This changes provider-registry behavior, but the commit updates only the public guide; the maintainer source of truth—including the existing OpenGateway section in structure/providers-and-adapters.md—still omits the new provider-wide Responses custom-tool denial and lowering invariant. Update the structure documents mapped to src/providers/ so future transport work does not rely on an incomplete architecture contract.
AGENTS.md reference: src/AGENTS.md:L10-L11
Useful? React with 👍 / 👎.
Summary
On the Responses wire, OpenGateway answers
400 invalid_request_erroronce a Codex turn replays nativecustom_tool_call/custom_tool_call_outputhistory (code-modeexec). The first turn succeeds and the second fails. The same request succeeds after the custom tool is lowered to a function tool, which is whatsupportsResponsesCustomTools: falsedoes; the xAI preset already declares it for the same reason.This adds
supportsResponsesCustomTools: falseto the OpenGateway registry entry. Saved provider rows without their own value inherit it through the existingenrichProviderFromRegistry/ router backfill, and an explicit usertruestill wins. The OpenGateway section of the providers guide now says custom tools are lowered on that wire.Closes #6877
Verification
bun test tests/providers/opengateway-provider.test.ts: 10 pass. Two new cases cover the registry flag, inheritance versus an explicit override, and a replayedexechistory whose tool is no longer declared, which now serializes asfunction_call/function_call_output.Received: undefined, and the history keepscustom_tool_callitems).bun x tsc --noEmit: exit 0.Checklist
Summary by CodeRabbit
Bug Fixes
Documentation