diff --git a/packages/aikit/src/cli/modelgen.ts b/packages/aikit/src/cli/modelgen.ts index 86475aac..8ff141d0 100644 --- a/packages/aikit/src/cli/modelgen.ts +++ b/packages/aikit/src/cli/modelgen.ts @@ -127,8 +127,13 @@ function toModelValue(providerId: string, provider: ModelsDevProvider, model: Mo return applyModification(providerId, provider, model); } -// models.dev lists this alias, but OpenAI's APIs do not accept it (pi). -const MODELS_DEV_UNSUPPORTED_MODEL_IDS = new Set(["openai/gpt-5.6"]); +// models.dev lists these, but the provider's API does not accept them: an OpenAI alias (pi), +// and Claude Sonnet 4.5, retired from the Claude API on 2026-11-30. +const MODELS_DEV_UNSUPPORTED_MODEL_IDS = new Set([ + "openai/gpt-5.6", + "anthropic/claude-sonnet-4-5", + "anthropic/claude-sonnet-4-5-20250929", +]); function usable(providerId: string, provider: ModelsDevProvider, model: ModelsDevModel): boolean { return ( diff --git a/packages/aikit/src/model/baseline.json b/packages/aikit/src/model/baseline.json index a5ca950f..f2ce785e 100644 --- a/packages/aikit/src/model/baseline.json +++ b/packages/aikit/src/model/baseline.json @@ -501,74 +501,6 @@ "xhigh": "xhigh" } }, - "claude-sonnet-4-5": { - "api": { - "id": "claude-sonnet-4-5", - "method": "languageModel", - "url": "https://api.anthropic.com/v1" - }, - "baseUrl": "https://api.anthropic.com/v1", - "contextWindow": 200000, - "cost": { - "cacheRead": 0.3, - "cacheWrite": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5", - "input": [ - "text", - "image" - ], - "maxTokens": 64000, - "name": "Claude Sonnet 4.5 (latest)", - "npm": "@ai-sdk/anthropic", - "protocol": "anthropic", - "provider": { - "env": [ - "ANTHROPIC_API_KEY" - ], - "id": "anthropic", - "name": "Anthropic", - "source": "api" - }, - "providerOptionsKey": "anthropic", - "reasoning": true - }, - "claude-sonnet-4-5-20250929": { - "api": { - "id": "claude-sonnet-4-5-20250929", - "method": "languageModel", - "url": "https://api.anthropic.com/v1" - }, - "baseUrl": "https://api.anthropic.com/v1", - "contextWindow": 200000, - "cost": { - "cacheRead": 0.3, - "cacheWrite": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5-20250929", - "input": [ - "text", - "image" - ], - "maxTokens": 64000, - "name": "Claude Sonnet 4.5", - "npm": "@ai-sdk/anthropic", - "protocol": "anthropic", - "provider": { - "env": [ - "ANTHROPIC_API_KEY" - ], - "id": "anthropic", - "name": "Anthropic", - "source": "api" - }, - "providerOptionsKey": "anthropic", - "reasoning": true - }, "claude-sonnet-4-6": { "api": { "id": "claude-sonnet-4-6", diff --git a/packages/aikit/test/__artifacts__/modelgen.json b/packages/aikit/test/__artifacts__/modelgen.json index b27e677e..6031bb66 100644 --- a/packages/aikit/test/__artifacts__/modelgen.json +++ b/packages/aikit/test/__artifacts__/modelgen.json @@ -501,74 +501,6 @@ "xhigh": "xhigh" } }, - "claude-sonnet-4-5": { - "api": { - "id": "claude-sonnet-4-5", - "method": "languageModel", - "url": "https://api.anthropic.com/v1" - }, - "baseUrl": "https://api.anthropic.com/v1", - "contextWindow": 200000, - "cost": { - "cacheRead": 0.3, - "cacheWrite": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5", - "input": [ - "text", - "image" - ], - "maxTokens": 64000, - "name": "Claude Sonnet 4.5 (latest)", - "npm": "@ai-sdk/anthropic", - "protocol": "anthropic", - "provider": { - "env": [ - "ANTHROPIC_API_KEY" - ], - "id": "anthropic", - "name": "Anthropic", - "source": "api" - }, - "providerOptionsKey": "anthropic", - "reasoning": true - }, - "claude-sonnet-4-5-20250929": { - "api": { - "id": "claude-sonnet-4-5-20250929", - "method": "languageModel", - "url": "https://api.anthropic.com/v1" - }, - "baseUrl": "https://api.anthropic.com/v1", - "contextWindow": 200000, - "cost": { - "cacheRead": 0.3, - "cacheWrite": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5-20250929", - "input": [ - "text", - "image" - ], - "maxTokens": 64000, - "name": "Claude Sonnet 4.5", - "npm": "@ai-sdk/anthropic", - "protocol": "anthropic", - "provider": { - "env": [ - "ANTHROPIC_API_KEY" - ], - "id": "anthropic", - "name": "Anthropic", - "source": "api" - }, - "providerOptionsKey": "anthropic", - "reasoning": true - }, "claude-sonnet-4-6": { "api": { "id": "claude-sonnet-4-6", diff --git a/packages/aikit/test/thinking.wire.test.ts b/packages/aikit/test/thinking.wire.test.ts index a20e2f16..6c94fdcb 100644 --- a/packages/aikit/test/thinking.wire.test.ts +++ b/packages/aikit/test/thinking.wire.test.ts @@ -96,7 +96,7 @@ describe("thinking wire budgets", () => { it("lets the Anthropic adapter add the budget exactly once", async () => { const model = makeModel({ - id: "claude-sonnet-4-5", + id: "claude-haiku-4-5", npm: "@ai-sdk/anthropic", reasoning: true, maxTokens: 64_000, @@ -128,7 +128,7 @@ const adaptiveClaude = makeModel({ compat: { forceAdaptiveThinking: true }, }); const budgetClaude = makeModel({ - id: "claude-sonnet-4-5", + id: "claude-haiku-4-5", npm: "@ai-sdk/anthropic", reasoning: true, maxTokens: 64_000, diff --git a/packages/codework/test/__artifacts__/acp.config-persist.json b/packages/codework/test/__artifacts__/acp.config-persist.json index 7e0e62d8..fc093f5f 100644 --- a/packages/codework/test/__artifacts__/acp.config-persist.json +++ b/packages/codework/test/__artifacts__/acp.config-persist.json @@ -4,12 +4,12 @@ "thinking": "low" }, "chosen": { - "model": "openrouter/anthropic/claude-sonnet-4.5", + "model": "openrouter/anthropic/claude-sonnet-5.5", "thinking": "high" }, "afterRestart": { "chosen": { - "model": "openrouter/anthropic/claude-sonnet-4.5", + "model": "openrouter/anthropic/claude-sonnet-5.5", "thinking": "high" }, "untouched": { @@ -17,7 +17,7 @@ "thinking": "low" }, "rethought": { - "model": "openrouter/anthropic/claude-sonnet-4.5", + "model": "openrouter/anthropic/claude-sonnet-5.5", "thinking": "medium" } } diff --git a/packages/codework/test/acp.test.ts b/packages/codework/test/acp.test.ts index c4eb7df4..7e15bada 100644 --- a/packages/codework/test/acp.test.ts +++ b/packages/codework/test/acp.test.ts @@ -438,7 +438,7 @@ describe("codework acp", () => { yield* acp.agent.setSessionConfigOption({ sessionId: chosen.sessionId, configId: "model", - value: "openrouter/anthropic/claude-sonnet-4.5", + value: "openrouter/anthropic/claude-sonnet-5.5", }); const set = yield* acp.agent.setSessionConfigOption({ sessionId: chosen.sessionId, diff --git a/packages/codework/test/cli.test.ts b/packages/codework/test/cli.test.ts index 5d2f3bd3..e9778904 100644 --- a/packages/codework/test/cli.test.ts +++ b/packages/codework/test/cli.test.ts @@ -393,7 +393,7 @@ describe("codework CLI", () => { expect(result.status).toBe(0); expect(result.stdout).toContain("openai/gpt-4o\n"); - expect(result.stdout).toContain("anthropic/claude-sonnet-4-5\n"); + expect(result.stdout).toContain("anthropic/claude-sonnet-5-5\n"); }); it("filters models by provider with models --provider", () => { diff --git a/packages/harness/test/__artifacts__/thread.walkthrough.json b/packages/harness/test/__artifacts__/thread.walkthrough.json index 381262f3..c7e4bdf7 100644 --- a/packages/harness/test/__artifacts__/thread.walkthrough.json +++ b/packages/harness/test/__artifacts__/thread.walkthrough.json @@ -78,7 +78,7 @@ "kind": "agent", "revisions": [ "23 {\"model\":{\"provider\":\"openai\",\"id\":\"gpt-5.4\"},\"modelTools\":{\"add\":[\"web_fetch\"]}}", - "31 {\"model\":{\"provider\":\"anthropic\",\"id\":\"claude-sonnet-4-5\"},\"modelTools\":{\"add\":[\"web_fetch\"]}}" + "31 {\"model\":{\"provider\":\"anthropic\",\"id\":\"claude-sonnet-5-5\"},\"modelTools\":{\"add\":[\"web_fetch\"]}}" ] }, { diff --git a/packages/harness/test/thread.test.ts b/packages/harness/test/thread.test.ts index 0676930b..e002ec2a 100644 --- a/packages/harness/test/thread.test.ts +++ b/packages/harness/test/thread.test.ts @@ -331,7 +331,7 @@ describe("threads", () => { script.set(t2, [{ _tag: "reply", text: "oauth it is" }]); yield* run(sessionId, t2, "Use OAuth instead"); - yield* configure(sessionId, t2, { model: { provider: "anthropic", id: "claude-sonnet-4-5" } }); + yield* configure(sessionId, t2, { model: { provider: "anthropic", id: "claude-sonnet-5-5" } }); expect((yield* documents.agent(t2)).model?.provider).toBe("anthropic"); expect((yield* documents.agent(main)).model?.provider).toBe("openai");