Skip to content

fix(provider): complete support for Claude Opus 5.5 and GPT-6 - #369

Merged
filipeforattini merged 5 commits into
mainfrom
new-models-support
Sep 23, 2026
Merged

filipeforattini merged 5 commits into
mainfrom
new-models-support

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

Routing for the 2026-09-22 launches (GPT-6 Sol/Luna, Claude Opus 5.5).

Codex

  • CODEX_CLI_VERSION 0.154.0 → 0.155.1. The backend serves GPT-6 Sol and Luna only to clients ≥ 0.155.1 (it gates on /models?client_version= and /responses). The version now reaches the User-Agent, a new version header (codex-rs sends one to the built-in OpenAI provider), and the /codex/models query, which was hard-coded to 0.144.6.
  • New gpt-6-sol and gpt-6-luna in the Codex registry. Capabilities: 272K context (the Codex default), 128K output, effort none/low..max. Pricing per 1M: Sol $2/$10 (cache read $0.20; >272K $4/$15), Luna $0.10/$0.50 (cache read $0.01; >272K $0.20/$0.75). Model briefs added.
  • Astra pricing on main was already $10/$50 (>272K $20/$75). I left it as is and pinned it in a test.

Effort

  • GPT-6 gets its own level list on every provider: none/low..max, with no minimal. Astra drops none because it declares thinkingCanDisable: false on Codex and in the new *gpt-6-astra* pattern. max now passes through on OpenAI-format providers too. Before, only Codex kept it and every other provider cut it to xhigh.
  • minimal becomes low when a model's list has low but not minimal. This applies to GPT-6 and the *codex* models, in both the translator and the Codex executor. A none request on a model that cannot disable thinking now drops to that model's lowest level instead of always minimal. Astra gets low; Opus 5.5 and Fable 5.1 get effort low instead of the invalid minimal.
  • Adaptive Claude models that support xhigh (Opus 4.7/4.8, Opus 5.x including 5.5, Sonnet 5, Fable/Mythos 5.x) now list it. It is sent as-is instead of being mapped to high. Opus 4.6 and Sonnet 4.6 keep the old mapping. PATTERN_THINKING entries take an optional format filter, so these levels only apply to models whose thinkingFormat is claude-adaptive.

Claude thinking display

  • The claude-adaptive path used to delete thinking on models that cannot disable it, which also dropped display. It now always sends {type:"adaptive"}, which Anthropic accepts on Opus 5.5 and Fable 5.1. A display sent by the client is kept. Models that cannot disable thinking get display: "summarized" when the client sent none.
  • normalizeClaudePassthrough (Claude Code passthrough) adds the same display: "summarized" to a bare adaptive block for those models. It builds a new thinking object, so the client's original body is left unchanged.

Claude Code version adoption

  • New open-sse/utils/claudeCodeVersion.js. Anthropic can answer 400 claude_code_version_too_old ("... version X.Y.Z or newer is required"). The router then adopts that version process-wide. It only ever raises the version, and RED_ROUTER_CLAUDE_CODE_VERSION (documented in .env.example) always wins.
  • DefaultExecutor.retryBodyForClientVersion returns a body whose billing-header cc_version has been rewritten. BaseExecutor.execute resends it once, before any output reaches the client. It does not retry when the env pin keeps the version below the requirement, and never loops.
  • The User-Agent is recomputed per request in buildHeaders (for any claude-cli/ UA), and the billing header in claudeCloaking reads the current version.

Tests

  • New: tests/unit/codex-gpt-6.test.js, tests/unit/claude-adaptive-effort-display.test.js, tests/unit/claude-code-version-adoption.test.js (mocked proxyAwareFetch: adopt + single retry, persistence, only once, env pin, other 400s untouched).
  • Updated: Fable 5.1 expectations in thinking-unified.test.js (now a summarized adaptive block); the Python SDK anomalyco/opencode#4031 table now expects each model's own floor (low for Astra); Codex version in providers-baseline.json and image-generation.test.js.
  • Not run locally (weak machine). CI validate is the check.

@filipeforattini
filipeforattini enabled auto-merge (squash) September 23, 2026 03:32
@filipeforattini
filipeforattini merged commit 875f7c9 into main Sep 23, 2026
22 checks passed
@filipeforattini
filipeforattini deleted the new-models-support branch September 23, 2026 03:36
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