fix(ai): use claude-sonnet-4.5 in OpenRouter tests

anthropic/claude-sonnet-4 is no longer in the OpenRouter catalog.
This commit is contained in:
David Brailovsky 2026-10-15 15:23:31 +02:00
parent f7e3cb5433
commit 568c2a82a7
2 changed files with 4 additions and 4 deletions

View file

@ -540,8 +540,8 @@ describe("Context overflow error handling", () => {
describe.skipIf(!process.env.OPENROUTER_API_KEY)("OpenRouter", () => {
// Anthropic backend
it("anthropic/claude-sonnet-4 via OpenRouter - should detect overflow via isContextOverflow", async () => {
const model = getModel("openrouter", "anthropic/claude-sonnet-4");
it("anthropic/claude-sonnet-4.5 via OpenRouter - should detect overflow via isContextOverflow", async () => {
const model = getModel("openrouter", "anthropic/claude-sonnet-4.5");
const result = await testContextOverflow(model, process.env.OPENROUTER_API_KEY!);
logResult(result);

View file

@ -707,10 +707,10 @@ describe("totalTokens field", () => {
describe.skipIf(!process.env.OPENROUTER_API_KEY)("OpenRouter", () => {
it(
"anthropic/claude-sonnet-4 - should return totalTokens equal to sum of components",
"anthropic/claude-sonnet-4.5 - should return totalTokens equal to sum of components",
{ retry: 3, timeout: 60000 },
async () => {
const llm = getModel("openrouter", "anthropic/claude-sonnet-4");
const llm = getModel("openrouter", "anthropic/claude-sonnet-4.5");
console.log(`\nOpenRouter / ${llm.id}:`);
const { first, second } = await testTotalTokensWithCache(llm, { apiKey: process.env.OPENROUTER_API_KEY });