From 3110840eba4e0b0f7619bf650cead1ec23e08d65 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 09:26:37 +0100 Subject: [PATCH] test: skip stale openrouter live routes --- src/agents/live-model-errors.test.ts | 5 +++++ src/agents/live-model-errors.ts | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/agents/live-model-errors.test.ts b/src/agents/live-model-errors.test.ts index 8a5b97cbc7f..a40815981ca 100644 --- a/src/agents/live-model-errors.test.ts +++ b/src/agents/live-model-errors.test.ts @@ -18,6 +18,11 @@ describe("live model error helpers", () => { expect( isModelNotFoundErrorMessage("404 No endpoints found for deepseek/deepseek-r1:free."), ).toBe(true); + expect( + isModelNotFoundErrorMessage( + '400 Provider returned error {"code":400,"msg":"model[Alibaba-NLP/Tongyi-DeepResearch-30B-A3B] router not found"}', + ), + ).toBe(true); expect( isModelNotFoundErrorMessage( "HTTP 400 not_found_error: model: claude-3-5-haiku-20241022 (request_id: req_123)", diff --git a/src/agents/live-model-errors.ts b/src/agents/live-model-errors.ts index c9948aba583..bf677101c2a 100644 --- a/src/agents/live-model-errors.ts +++ b/src/agents/live-model-errors.ts @@ -6,6 +6,9 @@ export function isModelNotFoundErrorMessage(raw: string): boolean { if (/no endpoints found for/i.test(msg)) { return true; } + if (/\brouter not found\b/i.test(msg)) { + return true; + } if (/unknown model/i.test(msg)) { return true; }