From eaf72ed4d86be179e4b0b4c64af04e92b49d19bd Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 21 Sep 2026 18:26:29 +0200 Subject: [PATCH] fix(coding-agent): update stale test expectations --- .../test/agent-session-concurrent.test.ts | 1 + packages/coding-agent/test/model-registry.test.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/coding-agent/test/agent-session-concurrent.test.ts b/packages/coding-agent/test/agent-session-concurrent.test.ts index 0df97e0d9..1fb8b4517 100644 --- a/packages/coding-agent/test/agent-session-concurrent.test.ts +++ b/packages/coding-agent/test/agent-session-concurrent.test.ts @@ -632,6 +632,7 @@ describe("AgentSession concurrent prompt guard", () => { "user", "assistant", "toolResult", + "system", "assistant", ]); }); diff --git a/packages/coding-agent/test/model-registry.test.ts b/packages/coding-agent/test/model-registry.test.ts index 17ba7a182..ccf925f09 100644 --- a/packages/coding-agent/test/model-registry.test.ts +++ b/packages/coding-agent/test/model-registry.test.ts @@ -704,7 +704,7 @@ describe("ModelRegistry", () => { expect(sonnet?.name).toBe("Custom Sonnet Name"); // Other models should be unchanged - const opus = models.find((m) => m.id === "anthropic/claude-opus-4"); + const opus = models.find((m) => m.id === "anthropic/claude-opus-4.1"); expect(opus?.name).not.toBe("Custom Sonnet Name"); }); @@ -783,7 +783,7 @@ describe("ModelRegistry", () => { expect(sonnet?.samplingParams).toEqual({ top_p: 0.9 }); // Models without sampling config keep it unset. - const opus = models.find((m) => m.id === "anthropic/claude-opus-4"); + const opus = models.find((m) => m.id === "anthropic/claude-opus-4.1"); expect(opus?.samplingParams).toBeUndefined(); }); @@ -810,7 +810,7 @@ describe("ModelRegistry", () => { expect(registry.getError()).toBeUndefined(); expect(openrouter.find((m) => m.id === "custom/cached-model")?.promptCache).toEqual({ short: 120 }); expect(openrouter.find((m) => m.id === "anthropic/claude-sonnet-4")?.promptCache).toEqual({ short: 300 }); - expect(openrouter.find((m) => m.id === "anthropic/claude-opus-4")?.promptCache).toBeUndefined(); + expect(openrouter.find((m) => m.id === "anthropic/claude-opus-4.1")?.promptCache).toBeUndefined(); // Overrides merge per tier with the built-in catalog. expect(registry.find("anthropic", "claude-sonnet-4-6")?.promptCache).toEqual({ short: 300, long: 1800 }); }); @@ -898,7 +898,7 @@ describe("ModelRegistry", () => { const registry = await createModelRegistry(authStorage, modelsJsonPath); const models = getModelsForProvider(registry, "openrouter"); const sonnet = models.find((model) => model.id === "anthropic/claude-sonnet-4"); - const opus = models.find((model) => model.id === "anthropic/claude-opus-4"); + const opus = models.find((model) => model.id === "anthropic/claude-opus-4.1"); expect((sonnet?.compat as OpenAICompletionsCompat | undefined)?.supportsFinishReason).toBe(false); expect((opus?.compat as OpenAICompletionsCompat | undefined)?.supportsFinishReason).toBe(true); @@ -933,7 +933,7 @@ describe("ModelRegistry", () => { "anthropic/claude-sonnet-4": { compat: { openRouterRouting: { only: ["amazon-bedrock"] } }, }, - "anthropic/claude-opus-4": { + "anthropic/claude-opus-4.1": { compat: { openRouterRouting: { only: ["anthropic"] } }, }, }, @@ -944,7 +944,7 @@ describe("ModelRegistry", () => { const models = getModelsForProvider(registry, "openrouter"); const sonnet = models.find((m) => m.id === "anthropic/claude-sonnet-4"); - const opus = models.find((m) => m.id === "anthropic/claude-opus-4"); + const opus = models.find((m) => m.id === "anthropic/claude-opus-4.1"); const sonnetCompat = sonnet?.compat as OpenAICompletionsCompat | undefined; const opusCompat = opus?.compat as OpenAICompletionsCompat | undefined; @@ -973,7 +973,7 @@ describe("ModelRegistry", () => { expect(sonnet?.name).toBe("Proxied Sonnet"); // Other models should have the baseUrl but not the name override - const opus = models.find((m) => m.id === "anthropic/claude-opus-4"); + const opus = models.find((m) => m.id === "anthropic/claude-opus-4.1"); expect(opus?.baseUrl).toBe("https://my-proxy.example.com/v1"); expect(opus?.name).not.toBe("Proxied Sonnet"); });