Repository navigation
fix(codex): drop top-level max_output_tokens from Responses requests - #247
Merged
Merged
Conversation
The Codex Responses backend (chatgpt.com/backend-api/codex/responses) now rejects a top-level max_output_tokens with "Unsupported parameter: max_output_tokens" on gpt-5.6-* models, hard-failing every turn including the title task. openai/codex never sends it at the request top level — there it is only a tool argument (exec_command/wait output truncation). Drop the field from the Responses payload; output length is bounded by the model's own cap and our prompts. Tests now guard its absence. Co-authored-by: Codegraff <blackfloofie@codegraff.com>
… Responses Dedicated regression test: buildBody's .responses branch must never emit a top-level max_output_tokens (normal, compaction, or title mode) while still carrying the required Responses fields — the gpt-5.6 backend rejects the parameter. Complements the absence assertions in the WS-delta test. Co-authored-by: Codegraff <blackfloofie@codegraff.com>
justrach
added a commit
that referenced
this pull request
Jul 20, 2026
…utput_tokens The midturn/transactional scenarios still expected explicit 16k/4k/16k top-level output caps, but #247 removed the field entirely (gpt-5.6 rejects it). CI never caught the stale expectation because the json-controls step failed first and the job stopped. Assert the new contract: the field must be absent from every Responses request. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
justrach
added a commit
that referenced
this pull request
Jul 20, 2026
…st (#247) Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Codex Responses backend rejects a top-level
max_output_tokens("Unsupported parameter: max_output_tokens") on gpt-5.6-* models, hard-failing every turn including the title task. openai/codex only uses max_output_tokens as a tool argument (exec_command/wait output truncation), never at the request top level.Changes
agent_request_body.zig: drop the top-levelmax_output_tokensfrom the.responsespayload; output is bounded by the model's own cap + prompts.agent_ws_test.zig: flip the 3 codex-body assertions to guard the field's absence, plus a dedicated regression test covering normal/compaction/title modes.Shipped as the v0.0.213 hotfix (notarized macOS builds); this lands the same fix + tests on main.