Skip to content

fix(models): correct Codex context and combo limit resolution - #10533

Merged
diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.50from
jackjinke:fix/codex-gpt56-combo-context
Aug 18, 2026
Merged

diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.50from
jackjinke:fix/codex-gpt56-combo-context

Conversation

@jackjinke

@jackjinke jackjinke commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Set Codex-provider GPT-5.6 Sol, Terra, and Luna context/input limits to 272000 while preserving direct OpenAI API limits.
  • Derive Combo context metadata from canonical effective limits so persisted overrides agree across /v1/models and /api/combos.
  • Keep context-window and max-input overrides independent.

Source: https://github.com/openai/codex/blob/9ded177ce7c1c0bd2047f902936c177612ab3434/codex-rs/models-manager/models.json

Fixes #10530.

Validation

  • Focused follow-up: 18 passed, 0 failed
  • Broader Node scope: 198 files, 1,606 passed, 2 skipped
  • Vitest auto-combo scope: 15 passed
  • ESLint and npm run check:changelog-integrity passed
  • runner-base built and passed the health smoke test

Changed tests:

  • tests/unit/codex-gpt56-catalog.test.ts
  • tests/unit/combo-context-prefix-resolution.test.ts
  • tests/unit/models-catalog-combo-metadata.test.ts
  • tests/unit/provider-models-route-codex.test.ts
  • tests/unit/vscode-token-routes-gpt56.test.ts

Coverage / Risk

The repository-wide coverage command was not run locally because its root glob includes lifecycle tests that can stop port 20128; isolated CI remains authoritative for the 60% gate.

The change is limited to Codex limits and shared Combo metadata resolution. Direct OpenAI limits and explicit override precedence remain unchanged.

@jackjinke jackjinke changed the title fix(models): honor Codex combo context overrides fix(models): correct Codex context and combo limit resolution Aug 16, 2026
@jackjinke
jackjinke marked this pull request as ready for review August 16, 2026 10:37
@jackjinke
jackjinke marked this pull request as draft August 17, 2026 01:43
@jackjinke
jackjinke marked this pull request as ready for review August 17, 2026 01:54
@jackjinke

jackjinke commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Update: Tibo has just confirmed that Codex supports a 1M context window and suggested using model capability overrides to opt into it. That is consistent with this PR: the built-in Codex defaults stay at 272000, while users who need the 1M path can set both context_length and max_input_tokens to 1000000. The public Codex models.json still advertises 272K at the moment, so there may be a catalog/rollout lag.

The pricing rationale also remains:

  • OpenAI's GPT-5.6 API docs expose a 1,050,000-token context window (922,000 max input), but say prompts over 272K input are billed at 2x input and 1.5x output for the full request (Sol, Terra, Luna). Keeping 272000 as the default avoids opting ordinary Codex requests into long-context pricing while retaining an explicit 1M opt-in.
  • OmniRoute's Settings → Model Overrides supports both context_length and max_input_tokens for codex/<model>. Because this PR keeps these limits independent, users wanting the 1M path should set both to 1000000; setting only context_length still leaves the 272K input cap. The override changes OmniRoute's advertised/routing guard; upstream long-context billing still applies.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

I revalidated the live PR metadata after the head moved. The current failing quality/unit checks overlap the open release-base-red issue #9985, so they are not being attributed to this PR without a pure-base reproduction. The updated head remains a train candidate pending the local combined-tip gates; no head-specific defect was asserted from the stale snapshot.

@jackjinke
jackjinke force-pushed the fix/codex-gpt56-combo-context branch from f1dc09c to eccb273 Compare August 18, 2026 06:53
@diegosouzapw
diegosouzapw merged commit 9a43377 into cheaper-inference:release/v3.8.50 Aug 18, 2026
5 checks passed
@jackjinke
jackjinke deleted the fix/codex-gpt56-combo-context branch August 18, 2026 17:13
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…r-inference#10533)

* fix(models): honor Codex combo context overrides

* test(codex): align discovery context expectation

* test(models): align Codex route limits

* test(models): align remaining Codex route limits
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.

fix(models): combo catalog ignores explicit Codex context override

2 participants