You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(runtime): a per-model output limit makes every OpenAI Codex subscription turn fail with HTTP 400 #5736
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:
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.
Activity
liugddx commentedon Sep 26, 2026
take
fix(runtime): send no output-token limit to the OpenAI Codex subscrip…