Skip to content

ug: Use GPT reasoning levels for GPT models Codex doesn't bundle - #1034

Draft
max-rozen-oss-db wants to merge 3 commits into
mainfrom
codex-reasoning-fallback
Draft

max-rozen-oss-db wants to merge 3 commits into
mainfrom
codex-reasoning-fallback

Conversation

@max-rozen-oss-db

@max-rozen-oss-db max-rozen-oss-db commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the #ai-gateway report where ug codex with managed system.ai.gpt-5-nano / gpt-5-4-nano / gpt-5-mini failed every turn with Unsupported value: 'none' is not supported with the 'gpt-5-nano' model.

Current Codex releases don't bundle these older GPT models, so build_codex_catalog built their entries from the non-GPT hosted defaults, which only offer reasoning effort none. Codex then sends reasoning.effort: "none", which the gateway rejects for GPT-5 base models. ug codex update can't help because no Codex release adds them.

  • GPT fallbacks now have no default_reasoning_level, so Codex omits reasoning.effort and the gateway applies the model's own default (medium for gpt-5-nano/mini, none for gpt-5.4-nano). low/medium/high stay selectable; every GPT-5-generation model accepts them.
  • Other fallback fields stay conservative (text-only, 32k context); non-GPT fallbacks and the glm/kimi capability overrides are unchanged.
  • The warning no longer promises ug codex update fixes it.

Verification

  • Reproduced on main with real Codex against the gateway: the fallback entry sends none and the turn fails with the reported 400.
  • With this change, the catalog ug builds for databricks-gpt-5-nano has no default and low/medium/high; codex exec with it completes a turn. Direct gateway calls without reasoning return 200 for all three models.
  • test_codex_catalog.py, test_agent_codex.py, test_codex_smart_routing_v2.py, and the integration contract tests pass locally.
  • Not verified: choosing the model in the interactive /model picker. Codex converts a null default to none when building picker presets, so that path should be checked by hand.

This pull request and its description were written by the Isaac LLM tool (Claude Code, session 053e9e2b-b4dd-41dc-9287-b081cc6ed1bc).

max-rozen-oss-db and others added 3 commits October 7, 2026 16:49
The fallback catalog entry for GPT models missing from Codex's bundle used
the non-GPT hosted defaults, which only offer reasoning effort none. The
gateway rejects none for gpt-5-nano and gpt-5-mini, so every request failed.
GPT fallbacks now offer low/medium/high with medium as the default, and the
warning no longer promises that ug codex update adds the metadata.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
With no default_reasoning_level Codex omits reasoning.effort, so the gateway
applies each model's default (medium for gpt-5-nano/mini, none for
gpt-5.4-nano) instead of a value UG guessed. low/medium/high stay selectable.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant