Skip to content
Merged
1 change: 1 addition & 0 deletions changelog.d/features/14546-claude-opus-5-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **feat(providers):** add Claude Opus 5.5 (`claude-opus-5-5`) to the Anthropic API, Claude OAuth, Bedrock and Vertex catalogs — native 1M context, 128K output, five effort tiers, $4/$20 pricing, Fast Mode, Opus 5 fallback; disabled thinking, manual budgets and forced `tool_choice` are normalized before dispatch since Opus 5.5 rejects them ([#14546](https://github.com/diegosouzapw/OmniRoute/pull/14546)).
5 changes: 0 additions & 5 deletions config/quality/eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"count": 6
}
},
"open-sse/config/providers/registry/vertex/index.ts": {
"@typescript-eslint/no-unused-vars": {
"count": 1
}
},
"open-sse/config/providers/shared.ts": {
"@typescript-eslint/no-unused-vars": {
"count": 1
Expand Down
2 changes: 1 addition & 1 deletion open-sse/config/claudeCodeCompatibleIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const CLAUDE_CODE_COMPATIBLE_USER_AGENT = getClaudeCodeUserAgent("sdk-cli
export { getClaudeCodeUserAgent };
export const CLAUDE_CODE_COMPATIBLE_STAINLESS_PACKAGE_VERSION = CLAUDE_CODE_SDK_PACKAGE_VERSION;
export const CLAUDE_CODE_COMPATIBLE_STAINLESS_RUNTIME_VERSION = CLAUDE_CODE_RUNTIME_VERSION;
const CONTEXT_1M_NATIVE_MODELS = ["claude-fable-5-1", "claude-opus-5"];
const CONTEXT_1M_NATIVE_MODELS = ["claude-fable-5-1", "claude-opus-5-5", "claude-opus-5"];

export function modelHasNativeContext1m(model: string | null | undefined): boolean {
const normalizedModel = String(model || "")
Expand Down
11 changes: 11 additions & 0 deletions open-sse/config/providers/registry/anthropic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ export const anthropicProvider: RegistryEntry = {
contextLength: 1048576,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5-5",
name: "Claude Opus 5.5",
contextLength: 1000000,
maxOutputTokens: 128000,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
supportsVision: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5",
name: "Claude Opus 5",
Expand Down
11 changes: 11 additions & 0 deletions open-sse/config/providers/registry/bedrock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ export const bedrockProvider: RegistryEntry = {
contextLength: 1000000,
maxOutputTokens: 128000,
},
{
id: "anthropic.claude-opus-5-5",
name: "Claude Opus 5.5 (Bedrock)",
toolCalling: true,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
supportsVision: true,
contextLength: 1000000,
maxOutputTokens: 128000,
},
{
id: "anthropic.claude-sonnet-4-6",
name: "Claude Sonnet 4.6 (Bedrock)",
Expand Down
11 changes: 11 additions & 0 deletions open-sse/config/providers/registry/claude/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ export const claudeProvider: RegistryEntry = {
// is fixed; reasoning is steered by output_config.effort). Strip them before dispatch.
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5-5",
name: "Claude Opus 5.5",
contextLength: 1000000,
maxOutputTokens: 128000,
supportsReasoning: true,
supportedThinkingEfforts: ["low", "medium", "high", "xhigh", "max"],
supportsXHighEffort: true,
supportsVision: true,
unsupportedParams: ["temperature", "top_p", "top_k"],
},
{
id: "claude-opus-5",
name: "Claude Opus 5",
Expand Down
1 change: 1 addition & 0 deletions open-sse/config/providers/registry/vertex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const vertexProvider: RegistryEntry = {
...VERTEX_XAI_MODELS,
{ id: "claude-fable-5-1", name: "Claude Fable 5.1 (Vertex)", targetFormat: "claude" },
{ id: "claude-fable-5", name: "Claude Fable 5 (Vertex)", targetFormat: "claude" },
{ id: "claude-opus-5-5", name: "Claude Opus 5.5 (Vertex)", targetFormat: "claude" },
{ id: "claude-opus-5", name: "Claude Opus 5 (Vertex)", targetFormat: "claude" },
{ id: "claude-sonnet-5", name: "Claude Sonnet 5 (Vertex)", targetFormat: "claude" },
{ id: "claude-opus-4-8", name: "Claude Opus 4.8 (Vertex)", targetFormat: "claude" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const vertex_partnerProvider: RegistryEntry = {
...VERTEX_XAI_MODELS,
{ id: "claude-fable-5-1", name: "Claude Fable 5.1", targetFormat: "claude" },
{ id: "claude-fable-5", name: "Claude Fable 5", targetFormat: "claude" },
{ id: "claude-opus-5-5", name: "Claude Opus 5.5", targetFormat: "claude" },
{ id: "claude-opus-5", name: "Claude Opus 5", targetFormat: "claude" },
{ id: "claude-sonnet-5", name: "Claude Sonnet 5", targetFormat: "claude" },
{ id: "claude-opus-4-8", name: "Claude Opus 4.8", targetFormat: "claude" },
Expand Down
1 change: 1 addition & 0 deletions open-sse/services/modelFamilyFallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const FAMILY_FALLBACK_TEMPLATES: Record<string, readonly string[]> = {
"claude-fable-5": ["claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-5"],

// Claude Opus family
"claude-opus-5-5": ["claude-opus-5", "claude-opus-4-8", "claude-sonnet-5"],
"claude-opus-5": ["claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-5"],
"claude-opus-4-8": ["claude-opus-4-7", "claude-opus-4-6", "claude-sonnet-5"],
"claude-opus-4-7": ["claude-opus-4-6", "claude-opus-4-5-20251101", "claude-sonnet-5"],
Expand Down
1 change: 1 addition & 0 deletions open-sse/services/providerCostData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const KNOWN_MODEL_PRICING: Record<string, ModelPricing> = {
"gpt-4o-mini": { inputCostPer1M: 0.15, outputCostPer1M: 0.6, isFree: false },
"claude-fable-5-1": { inputCostPer1M: 10.0, outputCostPer1M: 50.0, isFree: false },
"claude-fable-5": { inputCostPer1M: 15.0, outputCostPer1M: 75.0, isFree: false },
"claude-opus-5-5": { inputCostPer1M: 4.0, outputCostPer1M: 20.0, isFree: false },
"claude-opus-5": { inputCostPer1M: 5.0, outputCostPer1M: 25.0, isFree: false },
"claude-opus-4-8": { inputCostPer1M: 15.0, outputCostPer1M: 75.0, isFree: false },
"claude-opus-4-7": { inputCostPer1M: 15.0, outputCostPer1M: 75.0, isFree: false },
Expand Down
1 change: 1 addition & 0 deletions src/lib/db/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export async function getSettings() {
enabled: false,
supportedModels: [
"claude-fable-5",
"claude-opus-5-5",
"claude-opus-5",
"claude-opus-4-8",
"claude-opus-4-7",
Expand Down
1 change: 1 addition & 0 deletions src/lib/providers/claudeFastMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type JsonRecord = Record<string, unknown>;
*/
export const CLAUDE_FAST_MODE_DEFAULT_MODELS = [
"claude-fable-5",
"claude-opus-5-5",
"claude-opus-5",
"claude-opus-4-8",
"claude-opus-4-7",
Expand Down
1 change: 1 addition & 0 deletions src/lib/providers/staticModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const STATIC_MODEL_PROVIDERS: Record<string, () => Array<{ id: string; name: str
claude: () => [
{ id: "claude-fable-5-1", name: "Claude Fable 5.1" },
{ id: "claude-fable-5", name: "Claude Fable 5" },
{ id: "claude-opus-5-5", name: "Claude Opus 5.5" },
{ id: "claude-opus-5", name: "Claude Opus 5" },
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
Expand Down
15 changes: 15 additions & 0 deletions src/shared/constants/modelSpecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,21 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {
aliases: BEDROCK_CLAUDE_ALIASES("claude-fable-5"),
},

// ── Claude Opus 5.5 ─────────────────────────────────────────────
"claude-opus-5-5": {
maxOutputTokens: 128000,
contextWindow: 1000000,
defaultThinkingBudget: 32000,
thinkingBudgetCap: 120000,
supportsThinking: true,
supportsTools: true,
supportsVision: true,
rejectsThinkingDisabled: true,
adaptiveThinkingOnly: true,
rejectsForcedToolChoice: true,
aliases: BEDROCK_CLAUDE_ALIASES("claude-opus-5-5"),
},

// ── Claude Opus 5 ───────────────────────────────────────────────
"claude-opus-5": {
maxOutputTokens: 128000,
Expand Down
2 changes: 2 additions & 0 deletions src/shared/constants/pricing/frontier-labs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
GPT_5_6_TERRA_PRICING,
CLAUDE_FABLE_5_1_PRICING,
CLAUDE_FABLE_5_PRICING,
CLAUDE_OPUS_5_5_PRICING,
CLAUDE_OPUS_5_PRICING,
CLAUDE_OPUS_4_PRICING,
CLAUDE_SONNET_4_PRICING,
Expand Down Expand Up @@ -218,6 +219,7 @@ export const DEFAULT_PRICING_FRONTIER = {
// to cover hyphen-notation IDs (claude-opus-4-6) used by some clients
"claude-fable-5-1": CLAUDE_FABLE_5_1_PRICING,
"claude-fable-5": CLAUDE_FABLE_5_PRICING,
"claude-opus-5-5": CLAUDE_OPUS_5_5_PRICING,
"claude-opus-5": CLAUDE_OPUS_5_PRICING,
"claude-sonnet-5": CLAUDE_SONNET_5_PRICING,
"claude-opus-4.8": CLAUDE_OPUS_4_PRICING,
Expand Down
2 changes: 2 additions & 0 deletions src/shared/constants/pricing/oauth-subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import {
GPT_6_ASTRA_PRICING,
CLAUDE_FABLE_5_1_PRICING,
CLAUDE_OPUS_5_5_PRICING,
CLAUDE_OPUS_5_PRICING,
GEMINI_3_7_FLASH_PROMO_PRICING,
GPT_5_3_CODEX_PRICING,
Expand Down Expand Up @@ -34,6 +35,7 @@ export const DEFAULT_PRICING_OAUTH = {
reasoning: 50.0,
cache_creation: 12.5,
},
"claude-opus-5-5": CLAUDE_OPUS_5_5_PRICING,
"claude-opus-5": CLAUDE_OPUS_5_PRICING,
"claude-opus-4-8": {
input: 5.0,
Expand Down
8 changes: 8 additions & 0 deletions src/shared/constants/pricing/shared-tiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ export const CLAUDE_FABLE_5_1_PRICING = {
cache_creation: 12.5,
};

export const CLAUDE_OPUS_5_5_PRICING = {
input: 4.0,
output: 20.0,
cached: 0.2,
reasoning: 20.0,
cache_creation: 5.0,
};

export const CLAUDE_OPUS_5_PRICING = {
input: 5.0,
output: 25.0,
Expand Down
155 changes: 155 additions & 0 deletions tests/unit/claude-opus-5-5.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import test from "node:test";
import assert from "node:assert/strict";

import {
getModelTargetFormat,
getModelsByProviderId,
supportsClaudeMaxEffort,
supportsXHighEffort,
} from "../../open-sse/config/providerModels.ts";
import {
getClaudeCodeDefaultModels,
getUnsupportedParams,
} from "../../open-sse/config/providerRegistry.ts";
import { modelHasNativeContext1m } from "../../open-sse/config/claudeCodeCompatibleIdentity.ts";
import { modelSupportsContext1mBeta } from "../../open-sse/config/context1m.ts";
import { normalizeClaudeAdaptiveThinking } from "../../open-sse/services/claudeAdaptiveThinking.ts";
import { getNextFamilyFallback } from "../../open-sse/services/modelFamilyFallback.ts";
import { getModelPricing } from "../../open-sse/services/providerCostData.ts";
import { CLAUDE_FAST_MODE_DEFAULT_MODELS } from "../../src/lib/providers/claudeFastMode.ts";
import { getStaticModelsForProvider } from "../../src/lib/providers/staticModels.ts";
import { getDefaultPricing } from "../../src/shared/constants/pricing.ts";
import {
getModelSpec,
normalizeForcedToolChoiceForModel,
normalizeThinkingForModel,
} from "../../src/shared/constants/modelSpecs.ts";

const MODEL_ID = "claude-opus-5-5";
const BEDROCK_MODEL_ID = "anthropic.claude-opus-5-5";
const EFFORTS = ["low", "medium", "high", "xhigh", "max"];

test("Claude Opus 5.5 is registered only on verified launch surfaces", () => {
for (const [providerId, modelId] of [
["anthropic", MODEL_ID],
["claude", MODEL_ID],
["bedrock", BEDROCK_MODEL_ID],
["vertex", MODEL_ID],
["vertex-partner", MODEL_ID],
] as const) {
const model = getModelsByProviderId(providerId).find((entry) => entry.id === modelId);
assert.ok(model, `${providerId} must expose ${modelId}`);
if (providerId === "vertex" || providerId === "vertex-partner") {
assert.equal(model.targetFormat, "claude", `${providerId} wire format`);
} else {
assert.equal(model.contextLength, 1_000_000, `${providerId} context window`);
assert.equal(model.maxOutputTokens, 128_000, `${providerId} max output`);
assert.deepEqual(model.supportedThinkingEfforts, EFFORTS, `${providerId} effort levels`);
}
}

assert.equal(getModelTargetFormat("vertex", MODEL_ID), "claude");
assert.equal(getModelTargetFormat("vertex-partner", MODEL_ID), "claude");

for (const providerId of ["claude-web", "github", "ghe-copilot", "kiro", "cursor"]) {
const ids = new Set(getModelsByProviderId(providerId).map((entry) => entry.id));
assert.equal(ids.has(MODEL_ID), false, `${providerId} availability is not verified`);
}

assert.ok(
getStaticModelsForProvider("claude")?.some((entry) => entry.id === MODEL_ID),
"Claude OAuth static discovery must expose Opus 5.5"
);
assert.equal(getClaudeCodeDefaultModels().opus, MODEL_ID);
assert.equal(
getNextFamilyFallback(`claude/${MODEL_ID}`, new Set([`claude/${MODEL_ID}`])),
"claude/claude-opus-5"
);
});

test("Claude Opus 5.5 has native 1M context and always-on adaptive thinking", () => {
assert.equal(modelHasNativeContext1m(MODEL_ID), true);
assert.equal(modelHasNativeContext1m(BEDROCK_MODEL_ID), true);
assert.equal(modelSupportsContext1mBeta(MODEL_ID), false);

const spec = getModelSpec(MODEL_ID);
assert.notEqual(spec, getModelSpec("claude-opus-5"), "must not inherit the Opus 5 spec");
assert.equal(spec?.contextWindow, 1_000_000);
assert.equal(spec?.maxOutputTokens, 128_000);
assert.equal(spec?.supportsThinking, true);
assert.equal(spec?.supportsTools, true);
assert.equal(spec?.supportsVision, true);
assert.equal(spec?.adaptiveThinkingOnly, true);
assert.equal(spec?.rejectsThinkingDisabled, true);
assert.equal(spec?.rejectsForcedToolChoice, true);
assert.equal(spec?.maxEffortWhenThinkingDisabled, undefined);

assert.equal(getModelSpec(`global.${BEDROCK_MODEL_ID}`), spec);
assert.equal(supportsXHighEffort("claude", MODEL_ID), true);
assert.equal(supportsClaudeMaxEffort(MODEL_ID), true);
});

test("Claude Opus 5.5 strips unsupported sampling parameters", () => {
for (const providerId of ["anthropic", "claude"] as const) {
const unsupported = getUnsupportedParams(providerId, MODEL_ID);
for (const param of ["temperature", "top_p", "top_k"]) {
assert.ok(unsupported.includes(param), `${providerId}/${MODEL_ID} must strip ${param}`);
}
}
});

test("Claude Opus 5.5 drops disabled thinking and collapses manual budgets to adaptive", () => {
const withoutDisabled = normalizeThinkingForModel(
{ model: MODEL_ID, thinking: { type: "disabled" }, output_config: { effort: "low" } },
MODEL_ID
);
assert.equal("thinking" in withoutDisabled, false);
assert.deepEqual(withoutDisabled.output_config, { effort: "low" });

const adaptive = normalizeClaudeAdaptiveThinking(
{ model: MODEL_ID, thinking: { type: "enabled", budget_tokens: 64_000 } },
MODEL_ID
);
assert.deepEqual(adaptive.thinking, { type: "adaptive" });
});

test("Claude Opus 5.5 relaxes forced tool choices without removing tools", () => {
for (const toolChoice of [
"required",
{ type: "any" },
{ type: "tool", name: "read_file" },
{ type: "function", function: { name: "read_file" } },
]) {
const tools = [{ name: "read_file", input_schema: { type: "object" } }];
const result = normalizeForcedToolChoiceForModel(
{ model: MODEL_ID, tools, tool_choice: toolChoice },
MODEL_ID
);
assert.equal("tool_choice" in result, false);
assert.equal(result.tools, tools);
}

const opus5 = { model: "claude-opus-5", tool_choice: { type: "tool", name: "read_file" } };
assert.equal(normalizeForcedToolChoiceForModel(opus5, "claude-opus-5"), opus5);
});

test("Claude Opus 5.5 is a Fast Mode default model", () => {
assert.ok((CLAUDE_FAST_MODE_DEFAULT_MODELS as readonly string[]).includes(MODEL_ID));
});

test("Claude Opus 5.5 pricing matches Anthropic's published rates", () => {
for (const providerId of ["anthropic", "cc"] as const) {
const price = getDefaultPricing()[providerId][MODEL_ID];
assert.equal(price.input, 4);
assert.equal(price.output, 20);
assert.equal(price.cached, 0.2);
assert.equal(price.reasoning, 20);
assert.equal(price.cache_creation, 5);
}

assert.deepEqual(getModelPricing("anthropic", MODEL_ID), {
inputCostPer1M: 4,
outputCostPer1M: 20,
isFree: false,
});
});
2 changes: 1 addition & 1 deletion tests/unit/pricing-fallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test("off-table paid model keeps the conservative fallback", () => {
});

test("table hits are untouched", () => {
assert.equal(Object.keys(KNOWN_MODEL_PRICING).length, 21);
assert.equal(Object.keys(KNOWN_MODEL_PRICING).length, 22);
assert.deepEqual(getModelPricing("openai", "gpt-4o"), KNOWN_MODEL_PRICING["gpt-4o"]);
assert.deepEqual(getModelPricing("longcat", "LongCat-2.0"), KNOWN_MODEL_PRICING["longcat-2.0"]);
});
Loading