What happened
On an openai-codex (ChatGPT subscription) connection, setting a per-model output limit (modelOverrides[model].maxOutputTokens, exposed in the connection's model settings) makes every main turn on that model fail. The model adapter forwards the limit as max_output_tokens (packages/runtime/src/model-adapter.ts:715-745 → ai-sdk-turn.ts:1580-1622). The Codex backend rejects that field:
failureClass: request_rejected
Codex OAuth request failed: HTTP 400 {"detail":"Unsupported parameter: max_output_tokens"}
The setting is accepted and saved without complaint. The user only learns about the problem when every turn on that model fails.
How to reproduce
- Configure an
openai-codex connection (ChatGPT sign-in).
- In the connection's model settings, set an output limit for e.g.
gpt-6-astra (verified with 4096).
- Start a turn on that model. It fails with the 400 above. Remove the limit and the same turn completes.
I reproduced this headlessly against the real backend on main at 87fc9f69c, using a Runtime Host on a copy of a Desktop workspace.
Environment
- Maka commit:
87fc9f69c
- OS: Windows 10 x64
- Connection:
openai-codex via ChatGPT OAuth
Logs, screenshots, or additional context
Found while addressing review on #5723. That PR keeps streamed turns byte-identical to main, so it neither causes nor fixes this.
Possible directions, for maintainers to choose:
- The settings UI and codec refuse an output limit on
openai-codex models, with a message saying the subscription backend does not accept one.
- Or the adapter drops it for
openai-codex and the UI marks it as ignored there.
AI disclosure: Claude Code (Claude Opus) reproduced the failure against the real backend and drafted this issue; liugddx reviewed it and is the human contributor of record.
What happened
On an
openai-codex(ChatGPT subscription) connection, setting a per-model output limit (modelOverrides[model].maxOutputTokens, exposed in the connection's model settings) makes every main turn on that model fail. The model adapter forwards the limit asmax_output_tokens(packages/runtime/src/model-adapter.ts:715-745→ai-sdk-turn.ts:1580-1622). The Codex backend rejects that field:The setting is accepted and saved without complaint. The user only learns about the problem when every turn on that model fails.
How to reproduce
openai-codexconnection (ChatGPT sign-in).gpt-6-astra(verified with 4096).I reproduced this headlessly against the real backend on
mainat87fc9f69c, using a Runtime Host on a copy of a Desktop workspace.Environment
87fc9f69copenai-codexvia ChatGPT OAuthLogs, screenshots, or additional context
Found while addressing review on #5723. That PR keeps streamed turns byte-identical to
main, so it neither causes nor fixes this.Possible directions, for maintainers to choose:
openai-codexmodels, with a message saying the subscription backend does not accept one.openai-codexand the UI marks it as ignored there.AI disclosure: Claude Code (Claude Opus) reproduced the failure against the real backend and drafted this issue; liugddx reviewed it and is the human contributor of record.