Skip to content

feat(claude): add Claude Sonnet 5.5 and correct Sonnet 5 pricing - #15035

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:feat/sonnet-5-5
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:feat/sonnet-5-5

Conversation

@HouMinXi

Copy link
Copy Markdown
Contributor

Summary

Claude Sonnet 5.5 (claude-sonnet-5-5) shipped on 2026-09-28. A request routed to it currently fails upstream in three ways this change closes:

  • thinking: {"type":"disabled"} is rejected. The new model spec sets rejectsThinkingDisabled, so normalizeThinkingForModel drops the field and the model uses its adaptive default.
  • Forced tool_choice (any, tool, function) returns 400. rejectsForcedToolChoice makes normalizeForcedToolChoiceForModel drop it back to the default auto behavior.
  • Reasoning effort tops out at xhigh; max returns 400. The model is excluded from supportsClaudeMaxEffort, so a max request is lowered to high.

The published rate for Sonnet 5 and Sonnet 5.5 is $2 input, $10 output, $0.20 cache reads, and $2.50 for a five-minute cache write. The catalog still carried the retired $3/$15 rate. reasoning is not published as its own rate; $10 follows the output price.

Test plan

  • node --import tsx/esm --test tests/unit/claude-sonnet-5-5.test.ts — 4 passed
  • tests/unit/catalog-updates-v3x.test.ts passed
  • Injected defect: removing the two reject flags fails the thinking/tool-choice test; removing the max-effort exclusion fails the effort test. Restoring each passes.

@diegosouzapw diegosouzapw changed the title feat(claude): add Claude Sonnet 5.5 and correct Sonnet 5 pricing [defer] feat(claude): add Claude Sonnet 5.5 and correct Sonnet 5 pricing Sep 29, 2026
@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Sep 29, 2026

@ggiak ggiak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Automated review — a8d8a24

5 important · 5 nits · 1 pre-existing · effort high

External facts not verifiable from the repo: the $2/$10 Sonnet 5 / 5.5 list price, and whether Sonnet 5.5 rejects temperature/top_p/top_k and needs the 1M-context beta the way Sonnet 5 does. Please confirm these against Anthropic's docs. The findings below judge whether the repo is internally consistent with what this PR claims.

🔴 Important

  1. open-sse/config/providers/registry/claude/index.ts:100 — claude-sonnet-5-5 is not added to any provider registry (claude, anthropic, vertex, vertex/partner). The sibling Opus 5.5 PR (#14546) added it to all of these.
    Fails when: cc/claude-sonnet-5-5 or anthropic/claude-sonnet-5-5 is requested. The model is missing from /v1/models and the provider catalogs. getUnsupportedParams() (open-sse/config/providerRegistry.ts:261) finds no unsupportedParams, so a client-sent temperature/top_p is forwarded. Sonnet 5 lists these because the adaptive-only model returns 400 on them, and the new spec marks 5.5 adaptiveThinkingOnly: true too. There are also no supportedThinkingEfforts, which causes finding 2.
  2. open-sse/executors/base/reasoningEffort.ts:624 — the executor sanitizer still forwards effort: "max" for Sonnet 5.5. The model has no registry supportedThinkingEfforts, and supportsXHigh defaults to true, so the body is returned unchanged. supportsClaudeMaxEffort is not read on this path.
    Fails when: a native Anthropic or Claude Code request with output_config.effort: "max" is sent to claude-sonnet-5-5. Upstream receives max and returns the 400 this PR is meant to prevent. A registry entry with supportedThinkingEfforts: ["low","medium","high","xhigh"] would lower max to xhigh here.
  3. src/shared/constants/modelSpecs.ts:408 — only the exact id claude-sonnet-5-5 gets the new spec. Dated, -thinking and dotted ids fall through to prefix matching, where the earlier claude-sonnet-5 key wins. There is also no claude-sonnet-5.5 dot alias, although 4.6 has one.
    Fails when: getCanonicalModelSpecId resolves claude-sonnet-5-5-20260915, claude-sonnet-5-5-thinking and claude-sonnet-5.5 to claude-sonnet-5 (checked at the PR head). rejectsThinkingDisabled and rejectsForcedToolChoice then never apply, so thinking: {type:"disabled"} or tool_choice: {type:"any"} passes through and upstream returns 400.
  4. src/shared/constants/pricing/frontier-labs.ts:222 — no claude-sonnet-5-5 key in the anthropic DEFAULT_PRICING table, and none in the cc table in oauth-subscriptions.ts. #14546 added claude-opus-5-5 to both. getPricingForModel (src/shared/constants/pricing.ts:18) matches exact keys only.
    Fails when: usage for anthropic/claude-sonnet-5-5 or cc/claude-sonnet-5-5 resolves to null pricing, so it is costed at $0 unless the synced LiteLLM/models.dev layer has the model. The new test does not catch this: getModelPricing("claude", …) passes only through the generic KNOWN_MODEL_PRICING fallback in providerCostData.ts.
  5. src/shared/constants/pricing/oauth-subscriptions.ts:81 — the Sonnet 5 price change was applied to CLAUDE_SONNET_5_PRICING (anthropic) and KNOWN_MODEL_PRICING, but the cc table still prices claude-sonnet-5 at $3 / $15 / $0.30 cached / $3.75 cache-write.
    Fails when: the same model is costed 1.5× higher through cc/ than through anthropic/, so the dashboard shows two different Sonnet 5 prices. Other tables look consistent: devin.ts is already $2/$10, inference-hosts.ts ($1.40/$7) is a host discount, and the kiro table ($3/$15, line 464) is kept on purpose per the updated test comment.
🟡 5 nits (+2 more) · 🟣 1 pre-existing
  • 🟡 open-sse/translator/request/openai-to-claude.ts:224 — when a model doesn't support max, it is lowered to high. Sonnet 5.5 accepts xhigh, so max should become xhigh. Fails when: reasoning_effort: "max" on claude-sonnet-5-5 goes upstream as high, two tiers below what was asked. claudeCodeCompatible.ts:462 does the same.
  • 🟡 open-sse/config/providerModels.ts:330 — the new pattern only matches the hyphen form, and supportsClaudeMaxEffort does not turn dots into hyphens. Fails when: supportsClaudeMaxEffort("claude-sonnet-5.5") returns true and max is forwarded.
  • 🟡 open-sse/config/context1m.ts:17 — claude-sonnet-5-5 is not eligible for the 1M beta. The digit guard in modelSupportsContext1mBeta rejects it as a child of claude-sonnet-5, while the spec says contextWindow: 1000000. Fails when: a claude-sonnet-5-5[1m] request has its context-1m beta header stripped, if 5.5 needs the beta (needs confirmation).
  • 🟡 open-sse/services/modelFamilyFallback.ts:94 — no claude-sonnet-5-5 fallback chain, and no entry in src/lib/providers/staticModels.ts:44. #14546 added both for Opus 5.5. Fails when: a family fallback from claude-sonnet-5-5 finds no siblings, and the static catalog does not list the model.
  • 🟡 src/shared/constants/modelSpecs.ts:409 — the comment says "(use between_tools)", but normalizeThinkingForModel just deletes thinking. Fails when: a reader expects a between_tools rewrite that the code never does.
  • (+2 more nits) Adding a single model version to CLAUDE_MAX_EFFORT_UNSUPPORTED_FAMILY_PATTERNS (meant for whole families) is the wrong level; a per-model supportedThinkingEfforts would cover every effort path. The four-line pricing comment at shared-tiers.ts:121 repeats the values set just below it.
  • 🟣 open-sse/config/providers/registry/bedrock/index.ts:24 — the Bedrock registry lists no Sonnet 5 at all (only 4.6 / 4.5), so Bedrock Sonnet-5-family ids never get registry unsupportedParams. This predates this PR, but #14546 had to add Bedrock sampling stripping for Opus 5.5, and Sonnet 5.5 probably needs the same.

Sonnet 5.5 rejects thinking.type disabled and forced tool_choice, and
caps reasoning effort at xhigh. Register the model spec with those
constraints so normalizeThinkingForModel and
normalizeForcedToolChoiceForModel drop the rejected fields, and exclude
it from the max effort tier so a max request is lowered to high.

The published Sonnet 5 / 5.5 rate is $2 input, $10 output, $0.20 cache
reads, $2.50 five-minute cache writes. The catalog still had the
retired $3/$15 rate.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.51 to release/v3.8.52 September 29, 2026 11:17
@diegosouzapw

Copy link
Copy Markdown
Owner

Re-homed to release/v3.8.52: v3.8.51 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

@diegosouzapw diegosouzapw removed the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Oct 1, 2026
@diegosouzapw diegosouzapw changed the title [defer] feat(claude): add Claude Sonnet 5.5 and correct Sonnet 5 pricing feat(claude): add Claude Sonnet 5.5 and correct Sonnet 5 pricing Oct 1, 2026
@diegosouzapw
diegosouzapw merged commit 5be6f03 into diegosouzapw:release/v3.8.52 Oct 6, 2026
11 of 16 checks passed
diegosouzapw added a commit to backryun/OmniRoute that referenced this pull request Oct 8, 2026
Resolve: keep the curated Copilot catalog and re-add the release tip's
claude-sonnet-5-5 entry (diegosouzapw#15035); union the test-masking allowlist entries.
diegosouzapw added a commit to backryun/OmniRoute that referenced this pull request Oct 8, 2026
The release tip added claude-sonnet-5-5 to the curated GitHub Copilot
catalog (diegosouzapw#15035); the static fallback list must mirror it so fallback
discovery keeps catalog order. Also restore the GLM-5.2 route limits the
tip actually serves (128K for HF/Cloudflare/ZenMux) in the models catalog
test - this PR does not change those registries.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw added a commit that referenced this pull request Oct 8, 2026
Drains 9 v3.8.52 tip unit reds: 1 production fix (combo family-fallback skipped for request-scoped refusals, regression of #13603) + 8 test alignments to intentional contract changes (#15301 #15132 #15035 #15478 #15310 #15710 #15487), each annotated. Validated on a combined board with #15902 after clean npm ci: 32 previously-red files 327/329 (remaining 2 = quality-rail-gate-membership owned by #15682, and route-namespaces fixed in #15902), typecheck/open-sse/api typecheck, lint, 22 gates.
veseckytomas added a commit to veseckytomas/OmniRoute that referenced this pull request Oct 9, 2026
Catalog-only clients (OpenCode, plain OpenAI-SDK pickers) can only select an
effort level when it is advertised as a standalone model id. The gateway already
accepted and dispatched `<model>-max`, but nothing enumerated it, so the top
effort tier was unreachable outside Kiro's Opus 5 special case.

Enumerate `-max` for every max-capable Claude model and correct the capability
matrix:

- claudeEffortLevelsFor() now appends `max` via supportsClaudeMaxEffort(),
  de-duplicating after extendCodexGpt56EffortValues() so Kiro's provider-native
  max is not emitted twice.
- Export CLAUDE_MAX_EFFORT_LEVEL and widen ClaudeEffortVariantLevel.
- Add `max` to all three sibling CLAUDE_EFFORT_SUFFIX_RE copies (kept
  byte-identical, still deliberately not consolidated) so a `-max` id is never
  double-suffixed nor combined with a no-think alias.
- Drop the claude-sonnet-5-5 max exclusion (operator-verified, diegosouzapw#15035) and add an
  exact-boundary claude-opus-4-5 exclusion, which supports low/medium/high only.
  The family boundary keeps a hypothetical 4.50 eligible.

The drift guard now treats `-max` as matching and keeps `-highest` non-matching;
unsuffixed controls are unchanged.
veseckytomas added a commit to veseckytomas/OmniRoute that referenced this pull request Oct 9, 2026
The previous commit enumerated `-max` for every Claude model that was not in an
explicit exclusion family, which over-advertised the Sonnet 4.x line. Operator
verification against Claude Code confirms `claude-sonnet-4-5` and
`claude-sonnet-4-6` top out at high; a `-max` id for them would be silently
downgraded by sanitizeReasoningEffortForProvider() rather than rejected, so the
picker would show a tier the model never honors.

Add a family-boundary `claude-sonnet-4` pattern to
CLAUDE_MAX_EFFORT_UNSUPPORTED_FAMILY_PATTERNS. The boundary is deliberately
narrow: Opus 4.6/4.8 are a different family and stay max-eligible, and Sonnet 5.5
remains eligible per diegosouzapw#15035.

The pre-existing low/medium/high variants for Sonnet 4.x are untouched; only the
max tier is withheld.
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