From 7f893e43c1d42a21de4337657f80d735dd79a17f Mon Sep 17 00:00:00 2001 From: Sanchit Rk <0xsanchit@gmail.com> Date: Wed, 4 Nov 2026 18:49:44 +0530 Subject: [PATCH 1/2] chore: stop using retired claude-sonnet-4-5 Anthropic retires Claude Sonnet 4.5 from the Claude API on 2026-11-30. Tests that picked it now use Claude Sonnet 5.5; the budget-thinking wire fixtures use Claude Haiku 4.5, which still takes budget_tokens. Co-Authored-By: Claude Opus 5.5 --- packages/aikit/test/thinking.wire.test.ts | 4 ++-- .../codework/test/__artifacts__/acp.config-persist.json | 6 +++--- packages/codework/test/acp.test.ts | 2 +- packages/codework/test/cli.test.ts | 2 +- packages/harness/test/__artifacts__/thread.walkthrough.json | 2 +- packages/harness/test/thread.test.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) 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 fc5be405..9fd78abc 100644 --- a/packages/harness/test/__artifacts__/thread.walkthrough.json +++ b/packages/harness/test/__artifacts__/thread.walkthrough.json @@ -72,7 +72,7 @@ "kind": "agent", "revisions": [ "19 {\"model\":{\"provider\":\"openai\",\"id\":\"gpt-5.4\"},\"modelTools\":{\"add\":[\"web_fetch\"]}}", - "25 {\"model\":{\"provider\":\"anthropic\",\"id\":\"claude-sonnet-4-5\"},\"modelTools\":{\"add\":[\"web_fetch\"]}}" + "25 {\"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 60b2383d..0cc5d69c 100644 --- a/packages/harness/test/thread.test.ts +++ b/packages/harness/test/thread.test.ts @@ -330,7 +330,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"); From 43eb0fe57ae1f380f2d02b4526e2875921c20455 Mon Sep 17 00:00:00 2001 From: Sanchit Rk <0xsanchit@gmail.com> Date: Thu, 5 Nov 2026 00:16:59 +0530 Subject: [PATCH 2/2] chore(aikit): drop retired Claude Sonnet 4.5 from the Anthropic catalog modelgen now skips anthropic/claude-sonnet-4-5 and its dated id, which Anthropic retires from the Claude API on 2026-11-30. The baseline takes only the regenerated anthropic section; OpenRouter's listing is unchanged. Co-Authored-By: Claude Opus 5.5 --- packages/aikit/src/cli/modelgen.ts | 9 ++- packages/aikit/src/model/baseline.json | 68 ------------------- .../aikit/test/__artifacts__/modelgen.json | 68 ------------------- 3 files changed, 7 insertions(+), 138 deletions(-) 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",