[defer] fix(providers): declare claude-opus-5 thinking efforts in claude registry - #14548
Conversation
|
Thanks @HouMinXi! #14546 already adds the Opus 5.5 registry entry and spec, so we'll carry your two unique pieces over there with co-author credit: One correction for the record: Opus 5.5 rejects |
Ported from diegosouzapw#14548: requests without an explicit effort get reasoning_effort=medium; a client-chosen effort still wins. Co-authored-by: Minxi Hou <houminxi@gmail.com>
6799a32 to
ce263d5
Compare
ce263d5 to
054b455
Compare
054b455 to
0a915ac
Compare
…tries The static catalog passes skipCanonicalEffortFallback=true for registry-seeded models, so entries without supportedThinkingEfforts expose no effort_tiers in /v1/models even though their modelSpec marks supportsThinking: true. Opus 5 was fixed in diegosouzapw#14548; the same gap covers Fable 5 and Opus 4.8/4.7/4.6/4.5 across the claude, anthropic, github and ghe-copilot registries. Tier lists follow Anthropic's per-model effort table: xhigh exists on Opus 4.7+ and Fable 5; max on Opus 5/4.8/4.7/4.6; Opus 4.5 tops out at high. Fast variants (4.8-fast) mirror their base model. SupportsXHighEffort() defaults to true for unlisted models, so 4.6/4.5 stay correct through the canonical fallback to the claude registry's explicit false flags; new tests pin that behavior end-to-end. Signed-off-by: Minxi Hou <houminxi@gmail.com>
|
Merge-order note for whoever lands second between this PR and #14551. #14551 declares tiered thinking for claude-opus-4-8 in the firstparty registry. This PR's "no tiers declared -> no synthesized hint" guard in tests/unit/claude-opus-5-effort-tiers.test.ts uses claude-opus-4-8 as its tier-less subject, so once #14551 is in, that guard fails on a now-incorrect premise. The fix is small: point the guard at an entry that is still tier-less. claude-sonnet-4-5-20250929 works (dated legacy row, least likely to get tier declarations next). I hit this in an integration build carrying both PRs; single-PR CI on either side stays green. |
…stry The static catalog path calls getThinkingCapabilityFields with skipCanonicalEffortFallback=true for registry models (src/app/api/v1/models/catalog.ts:730), so a registry entry without declared tiers is listed in /v1/models with no effort_tiers at all. claude-opus-5's modelSpec already has supportsThinking: true, but the registry entry never declared supportedThinkingEfforts, so the model exposed no thinking tiers through the static catalog. Declare supportsReasoning and the tier list [low, medium, high, xhigh, max] on the claude-opus-5 registry entry, matching sibling entries. claude-opus-5-5 itself is intentionally out of scope here; it is covered by upstream PR diegosouzapw#14546. Signed-off-by: Minxi Hou <houminxi@gmail.com>
claude-opus-4-8 can gain declared tiers from a sibling registry change, which would break this guard's premise without touching this fix. claude-sonnet-4-5-20250929 is a dated legacy entry and stays tierless. Signed-off-by: Minxi Hou <houminxi@gmail.com>
0a915ac to
737982f
Compare
…tries The static catalog passes skipCanonicalEffortFallback=true for registry-seeded models, so entries without supportedThinkingEfforts expose no effort_tiers in /v1/models even though their modelSpec marks supportsThinking: true. Opus 5 was fixed in diegosouzapw#14548; the same gap covers Fable 5 and Opus 4.8/4.7/4.6/4.5 across the claude, anthropic, github and ghe-copilot registries. Tier lists follow Anthropic's per-model effort table: xhigh exists on Opus 4.7+ and Fable 5; max on Opus 5/4.8/4.7/4.6; Opus 4.5 tops out at high. Fast variants (4.8-fast) mirror their base model. SupportsXHighEffort() defaults to true for unlisted models, so 4.6/4.5 stay correct through the canonical fallback to the claude registry's explicit false flags; new tests pin that behavior end-to-end. Signed-off-by: Minxi Hou <houminxi@gmail.com>
|
Re-homed to |
777cc43
into
diegosouzapw:release/v3.8.52
|
Thanks @HouMinXi — merged into |
Summary
Scoped down to the gap #14546 does not cover:
claude-opus-5(Opus 5, not 5.5) had no declared reasoning tiers in theclauderegistry, so the static catalog listed it withouteffort_tiers.supportsReasoning: trueandsupportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"]to theclaude-opus-5registry entry, matching the sibling entries.Why the registry entry needs the explicit list: for static registry models the catalog calls
getThinkingCapabilityFields(..., skipCanonicalEffortFallback=true)(src/app/api/v1/models/catalog.ts:730), so without declared tiers the model gets noeffort_tiersat all — the canonical fallback is deliberately skipped on that path. The modelSpec forclaude-opus-5already hassupportsThinking: true; only the registry tier list was missing.claude-opus-5-5itself is intentionally not added here — #14546 carries the full 5.5 addition (including thedefaultReasoningEffort: "medium"spec field ported from this PR's earlier revision, with co-authorship noted there). The two PRs touch disjoint hunks and merge cleanly in either order.Test plan
node --import tsx/esm --test tests/unit/claude-opus-5-effort-tiers.test.ts— 3/3.