fix(coding-agent): update stale test expectations

This commit is contained in:
Armin Ronacher 2026-09-21 18:26:29 +02:00
parent 7f06f9cf16
commit eaf72ed4d8
2 changed files with 8 additions and 7 deletions

View file

@ -632,6 +632,7 @@ describe("AgentSession concurrent prompt guard", () => {
"user",
"assistant",
"toolResult",
"system",
"assistant",
]);
});

View file

@ -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");
});