Skip to content

🤖 feat: add GPT-5.6 Sol/Terra/Luna models and move gpt alias to Sol#3702

Open
ammar-agent wants to merge 7 commits into
mainfrom
mux-models-f408
Open

🤖 feat: add GPT-5.6 Sol/Terra/Luna models and move gpt alias to Sol#3702
ammar-agent wants to merge 7 commits into
mainfrom
mux-models-f408

Conversation

@ammar-agent

@ammar-agent ammar-agent commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds first-class support for OpenAI's GPT-5.6 family (Sol / Terra / Luna) and moves the bare gpt alias to gpt-5.6-sol now that the family is generally available.

Background

OpenAI previewed GPT-5.6 on June 26, 2026 and released it generally on July 9, 2026. The family introduces a new naming system: the number is the generation, while Sol (flagship), Terra (balanced), and Luna (fast/cheap) are durable capability tiers.

GA availability was verified against the live API with a plain API key: all three ids (gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna) appear in /v1/models and successfully complete minimal Responses API calls (HTTP 200, status: completed).

Implementation

  • knownModels.ts: three new registry entries with sol / terra / luna aliases. Bare gpt alias moves from gpt-5.5 to gpt-5.6-sol (Sol succeeds 5.5 as the flagship at the same list price); gpt-5.5 stays selectable via its explicit id alias. Sol is warmed.
  • models-extra.ts: published pricing — Sol $5/$30, Terra $2.50/$15, Luna $1/$6 per 1M tokens; cache reads keep the 90% discount and cache writes bill at 1.25x input. Context window mirrors GPT-5.5 (1.05M in / 128K out) as a documented provisional value — OpenAI hasn't published official context specs yet.
  • thinking/policy.ts: GPT-5.6 tiers expose all 6 thinking levels including the documented native max reasoning effort ("for demanding tasks that need more exploration and verification"). The Responses API path sends max through as-is; Chat Completions clamps to xhigh (the SDK enum rejects max).
  • Thinking labels stay distinguishable on GPT-5.6: max renders as MAX (native effort) while xhigh stays XHIGH; other OpenAI models keep XHIGH for both since they clamp max→xhigh on the wire.
  • Pro mode (reasoning.mode: "pro") is deliberately not in this PR: it belongs as a toggle inside the thinking slider (it composes with effort rather than replacing it). Known gap, tracked in 🤖 feat: expose GPT-5.6 pro reasoning mode as a thinking-slider toggle #3704.
  • codexOAuth.ts: all three tiers added to CODEX_OAUTH_ALLOWED_MODELS since the family ships in both Codex and the public API.
  • Docs table + built-in skill snapshot regenerated via bun scripts/gen_docs.ts.

Validation

  • Live API check: /v1/models listing + successful Responses API smoke call per tier.
  • Live-verified reasoning.effort: "max" completes on gpt-5.6-sol and that gpt-5.5 rejects max (confirms per-model gating).
  • New policy tests per tier, including gateway-prefixed and version-suffixed forms.
  • make static-check, typecheck, and 600+ registry/alias-dependent tests pass locally.

Risks

Low. The riskiest bit is the gpt alias move: users relying on gpt now get Sol instead of GPT-5.5. Pricing is identical and gpt-5.5 remains addressable, so blast radius is a model-behavior change only. Context-window metadata is provisional (mirrors GPT-5.5) until OpenAI publishes official specs; worst case is premature compaction, not request failures.


Generated with mux • Model: anthropic:claude-fable-5 • Thinking: high • Cost: $10.12

Adds OpenAI's GPT-5.6 preview family (previewed June 26, 2026):
- Known-model registry entries with sol/terra/luna aliases (not warmed;
  bare gpt alias stays on gpt-5.5 until broad availability)
- Token metadata with published preview pricing (Sol $5/$30, Terra
  $2.50/$15, Luna $1/$6 per 1M) incl. 90%-off cache reads and 1.25x
  cache writes; context window mirrors GPT-5.5 pending official specs
- Thinking policy: 5 levels including xhigh (same as gpt-5.5)
- Codex OAuth allowlist entries (preview ships via API and Codex)
- Regenerated docs model table + built-in skill snapshot

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs= -->
GPT-5.6 went GA July 9, 2026. Verified via live API: all three tiers
appear in /v1/models and complete Responses API calls with a plain API
key. Sol succeeds gpt-5.5 as the flagship at the same list price, so
the bare `gpt` alias moves there; gpt-5.5 stays selectable via its
explicit id alias. Sol is now warmed.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$10.12`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=10.12 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@mintlify

mintlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview Jul 9, 2026, 6:38 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 52537dae86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Contributor
  1. Max reasoning effort: GPT-5.6 supports max reasoning effort for demanding tasks that need more exploration and verification. If you currently use xhigh, compare both settings on representative workloads.
  2. Pro mode: GPT-5.6 can perform more model work to improve reliability on difficult tasks and return a single final answer. Enable it with reasoning.mode: "pro" when quality matters more than latency and token usage. Learn how to use pro mode.

Per OpenAI's GA docs, GPT-5.6 adds two capabilities:

1. Native "max" reasoning effort for demanding tasks that need more
   exploration and verification. The thinking policy for GPT-5.6 tiers
   now exposes all 6 levels; on the Responses API we send "max" through
   (the SDK schema accepts arbitrary effort strings), while the Chat
   Completions path keeps the shared max→xhigh clamp (its enum rejects
   "max").

2. reasoning.mode: "pro" — more model work for reliability on difficult
   tasks, returning a single final answer, for when quality matters more
   than latency and token usage. The SDK cannot send reasoning.mode, so
   it rides a Mux-internal header (mirroring the Anthropic xhigh effort
   rewrite) that the OpenAI fetch wrapper consumes: strips the header and
   injects reasoning.mode into the Responses body on the wire. Enable via
   muxProviderOptions.openai.reasoningMode or providers.jsonc openai
   reasoningMode: "pro"; gated per-model to the GPT-5.6 family, direct
   OpenAI routes, and the Responses wire format.

Live-verified against the API: effort "max" and reasoning.mode "pro"
complete on gpt-5.6-sol; gpt-5.5 rejects "max" (confirms gating).

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$14.25`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=14.25 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Added GPT-5.6 native max reasoning effort (6-level thinking policy, Responses-only passthrough with Chat Completions clamp) and reasoning.mode: "pro" support via a Mux-internal header + fetch-wrapper body injection, both live-verified against the API.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 991009ec03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/thinking/policy.ts Outdated
Comment thread src/node/services/providerModelFactory.ts Outdated
Per review decision, GPT-5.6 pro mode (reasoning.mode: "pro") is removed
from this PR. It belongs as a toggle inside the thinking slider rather
than backend-only config plumbing; tracked in #3704. This also moots the
Codex finding about provider-level pro mode being ignored by headless
createModel() callers.

Addresses the other Codex finding: getThinkingDisplayLabel now returns
MAX (and getThinkingOptionLabel "max") for the max level on GPT-5.6
models, keeping the native max effort distinguishable from xhigh in the
thinking slider and settings dropdowns. Other OpenAI models keep XHIGH
for both levels since they clamp max→xhigh on the wire.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$34.69`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=34.69 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Addressed both review findings in 75119b7:

  • Keep GPT-5.6 max distinguishable in thinking labels (PRRT_kwDOPxxmWM6PrcuR): fixed. getThinkingDisplayLabel/getThinkingOptionLabel now return MAX/max for the max level on GPT-5.6 models (gated on openaiSupportsNativeMaxEffort), while xhigh stays XHIGH/xhigh. Other OpenAI models keep XHIGH for both levels since they clamp max→xhigh on the wire. Covered by new tests in thinking.test.ts.
  • Honor provider-level pro mode outside main chat (PRRT_kwDOPxxmWM6PrcuT): mooted by removal. Per maintainer decision, pro mode is out of this PR entirely — it belongs as a toggle inside the thinking slider, not backend-only config plumbing. All pro-mode code (schema knobs, header, fetch-wrapper injection) is reverted; the gap you identified (headless createModel() callers bypassing buildRequestHeaders) is recorded in the tracking issue 🤖 feat: expose GPT-5.6 pro reasoning mode as a thinking-slider toggle #3704 so the follow-up implementation handles it from the start.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75119b702a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/tokens/models-extra.ts
Codex flagged that the 1.25x cache-write rate on GPT-5.6 entries is
never applied: createDisplayUsage() only sources cacheCreateTokens from
Anthropic provider metadata. Verified live that the Responses API does
report input_tokens_details.cache_write_tokens, but @ai-sdk/openai
(through at least 3.0.83) hardcodes cacheWrite: undefined and strips the
field from its usage schema, so Mux cannot attribute the premium without
SDK support. Bounded impact: 0.25x input rate on first-write tokens only;
cache reads are costed correctly.

Metadata is kept so pricing lights up automatically once the SDK
surfaces cache-write usage. Tracked in #3705.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$40.68`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=40.68 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Wire OpenAI cache-write tokens into GPT-5.6 pricing (PRRT_kwDOPxxmWM6PrtRN): verified and triaged as a real but currently-unfixable-in-Mux gap; documented in 30baf4b and tracked in #3705.

Findings:

  • Confirmed live that the Responses API reports input_tokens_details.cache_write_tokens for GPT-5.6 (3207 write tokens on first call, 3207 cached_tokens on repeat).
  • However @ai-sdk/openai cannot surface it: convertOpenAIResponsesUsage hardcodes cacheWrite: undefined and its usage Zod schema strips cache_write_tokens. Verified on both our installed 3.0.62 and the latest 3.0.83 — an SDK bump does not help, so createDisplayUsage() has no OpenAI-side source for cacheCreateTokens.
  • Folding the 1.25x rate into input_cost_per_token would overcharge every non-write request, so we're not doing that.

Resolution in this PR: a KNOWN COST GAP comment at the metadata site explains the bounded underreport (0.25x input rate, first-write tokens only; reads are costed correctly) and why the cache_creation_input_token_cost values are kept — pricing lights up automatically once the SDK surfaces cache-write usage. #3705 captures the verified evidence and the upstream-first fix plan.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30baf4bd6d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/thinking/policy.ts Outdated
Codex flagged that non-passthrough gateways rebuild reasoning params
with their own effort maps (OpenRouter clamps max→high, Copilot→xhigh),
so offering MAX in the thinking slider for e.g.
openrouter:openai/gpt-5.6-sol would silently send a lower effort than
promised. The GPT-5.6 policy now exposes all 6 levels only when the
route delivers Mux-built openai providerOptions verbatim (direct openai
or a PROVIDER_DEFINITIONS passthrough gateway); other routes keep the
5-level xhigh-capped policy.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$46.88`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=46.88 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Gate native max to OpenAI Responses routes (PRRT_kwDOPxxmWM6Pr3GG): fixed in 6d233d7. The GPT-5.6 policy now exposes max only when the route delivers Mux-built openai providerOptions verbatim — direct openai: or a PROVIDER_DEFINITIONS passthrough gateway (mux-gateway). Non-passthrough routes like openrouter:openai/gpt-5.6-sol or github-copilot:openai/gpt-5.6-terra keep the 5-level xhigh-capped policy, so the slider never offers an effort the wire clamps away. Covered by new route-gating tests alongside the existing passthrough-gateway case.

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d233d779c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/thinking/policy.ts
Codex flagged that the policy-level route gate only inspects the model
string, but routing can be decided at request time via routePriority/
overrides — openai:gpt-5.6-sol can resolve onto OpenRouter or Copilot,
whose effort maps silently send high/xhigh for a selected MAX.

New clampThinkingLevelForRoute() downgrades max→xhigh for GPT-5.6 when
the resolved route is non-passthrough, applied in AIService right after
route resolution (primary and fallback-model paths) so provider options,
headers, replay transforms, and metadata all agree with what the wire
can deliver. Mirrors the existing Mythos-class clamp precedent. xhigh is
those routes' policy ceiling; their effort maps handle any further
provider-side clamping. No-op for every other model since max and xhigh
already share a wire value outside GPT-5.6.

---

_Generated with `mux` • Model: `anthropic:claude-fable-5` • Thinking: `high` • Cost: `$54.12`_

<!-- mux-attribution: model=anthropic:claude-fable-5 thinking=high costs=54.12 -->
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Gate GPT-5.6 max on the resolved route (PRRT_kwDOPxxmWM6Pr3GG follow-up, thread PRRT_kwDOPxxmWM6Pr-wp): fixed in fc03cbe. You're right that the policy gate only sees the model string while routePriority/overrides pick the route at request time. Added clampThinkingLevelForRoute(): when a GPT-5.6 model resolves onto a non-passthrough route, max is clamped to xhigh in AIService immediately after route resolution — before provider options, headers, replay transforms, and metadata are built — so everything downstream agrees with what the wire can deliver (mirrors the existing Mythos-class clamp precedent). Applied on both the primary and fallback-model paths; no-op for non-GPT-5.6 models where max/xhigh already share a wire value. Covered by new clamp tests (resolved-route override, model-string fallback, passthrough routes, non-max levels).

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: fc03cbe059

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coadler

coadler commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator
image

been working fine for me, only thing that feels odd is the model ordering in the menu. i feel like they should be before 5.5

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.

3 participants