-
[DO NOT MERGE] feat(providers): Add GPT-5.6 Sol / Terra / Luna model support (#3937)
发布于
2026-07-10 22:34:46 +00:00 - Fixes #3931
feat(llm): add GPT-5.6 Sol / Terra / Luna model support
Add first-class support for OpenAI's GPT-5.6 family (GA 2026-07-09):
gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna, plus the bare gpt-5.6
alias that OpenAI routes to Sol server-side.The headline change is a cost-reporting fix, not just three new model
IDs. gpt-5.6-sol already resolved in the fleet pricing table -- via the
("gpt-5", "gpt-5") catch-all family prefix -- and was billed at the base
gpt-5 rate of $1.25/$10 instead of $5/$30. Fleet monitoring silently
under-reported flagship spend by 4x, with no exception raised and no
blank dashboard cell to signal it.Pricing (tools/system/fleet_monitoring/pricing.py)
- Add MODEL_PRICES rows for the three tiers: sol 5/30, terra 2.50/15,
luna 1/6 per 1M tokens, with cached input at 90% off uncached. - Add per-tier _FAMILY_FALLBACKS rows plus ("gpt-5.6", "gpt-5.6-sol").
The per-tier rows are load-bearing, not boilerplate: without them an
unrecognized suffix such as gpt-5.6-terra-preview matches the shorter
gpt-5.6 alias prefix and silently borrows Sol's rate. - Point the alias at the gpt-5.6-sol canonical rather than adding a
duplicate price row. One price in one place, and as a side benefit
normalize_model_name("gpt-5.6") now returns "gpt-5.6-sol", so the
dashboard groups alias traffic with Sol instead of splitting it.
Context budget (core/context_budget.py)
- Raise the GPT-5.6 window to 1M, honoring the standing "raise once
verified to reclaim headroom" comment on the conservative 128k gpt-5
pin. Sol users were getting 12% of their available context window. - _MODEL_CONTEXT_WINDOWS is substring-matched in dict insertion order
with a break, so the gpt-5.6 key must stay above the gpt-5 catch-all
or it is never reached. Guarded by a test, because alphabetizing that
dict would otherwise revert the fix silently.
Wizard pickers (surfaces/cli/wizard/config.py)
- List all three tiers under OpenAI, Azure, Codex, and OpenRouter, each
confirmed available against a primary vendor source. - OPENCODE_MODELS is intentionally left alone: OpenCode Zen does not
publish GPT-5.6 in its curated catalog, and listing the ID would 404
for users. Worth a follow-up once support is announced. - Defaults are unchanged per the issue. A test pins OpenAI's
default_model at gpt-5.4-mini so a future quick-pick reshuffle cannot
promote a GPT-5.6 tier into the default slot.
Docs (docs/llm-providers.mdx)
- Add /model set examples, a tier explainer, and the GPT-5.6 deployment
names to the Azure picker list. No docs.json entry needed: no new page.
Tests
- Published rates, alias resolution to Sol, tier distinctness, suffix
shadowing, and a regression guard that Sol is not priced as base
gpt-5 -- the bug this change exists to fix. - The 1M context ceiling, the insertion-order guard, and preservation of
the 128k pin for older gpt-5 models. - Catalog presence per picker, plus the defaults-unchanged guard.
- /model set openai gpt-5.6- is accepted and persists. This
already held, since openai sets allow_custom_models=True and there was
no allowlist to widen; the test pins the behavior against a future
tightening rather than fixing a bug that did not exist.
Deliberately not addressed: ModelPrice has no tiered-rate support, so
GPT-5.6's long-context pricing (Sol rises to $10/$45 above the
threshold) and its 1.25x cache-write rate are not modeled. Fleet will
under-report on very large prompts. That gap is pre-existing and affects
every model in the table, so it belongs in its own issue rather than
inside a change that adds three models.Verified with make lint, make format-check, make typecheck, and
make test-cov -- the full suite is required here because this touches
core/. Result: 10771 passed, 57 skipped.- fix(llm): route GPT-5.6 tools through Responses API
Preserve reasoning and function-call items across tool turns so GPT-5.6 agents no longer fail on Chat Completions.
Co-authored-by: Cursor cursoragent@cursor.com
Co-authored-by: Aditya Parab mradityaparab@gmail.com
Co-authored-by: davincios jvf.hus@gmail.com
Co-authored-by: Cursor cursoragent@cursor.com下载附件