fix: per-agent model fallbacks (#583) (thanks @mitschabaude-bot)

This commit is contained in:
Peter Steinberger
2026-01-13 06:49:26 +00:00
parent ece01d89fe
commit 3368284b2a
4 changed files with 4 additions and 5 deletions

View File

@@ -177,7 +177,7 @@ describe("runWithModelFallback", () => {
run: async (provider, model) => {
calls.push({ provider, model });
if (provider === "anthropic") {
throw new Error("primary failed");
throw Object.assign(new Error("nope"), { status: 401 });
}
if (provider === "openai" && model === "gpt-4.1") {
return "ok";