mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 04:47:39 +00:00
fix(agents): harden model fallback failover paths
This commit is contained in:
@@ -433,6 +433,12 @@ describe("classifyFailoverReason", () => {
|
||||
expect(classifyFailoverReason("Missing scopes: model.request")).toBe("auth");
|
||||
expect(classifyFailoverReason("429 too many requests")).toBe("rate_limit");
|
||||
expect(classifyFailoverReason("resource has been exhausted")).toBe("rate_limit");
|
||||
expect(
|
||||
classifyFailoverReason("model_cooldown: All credentials for model gpt-5 are cooling down"),
|
||||
).toBe("rate_limit");
|
||||
expect(classifyFailoverReason("all credentials for model x are cooling down")).toBe(
|
||||
"rate_limit",
|
||||
);
|
||||
expect(
|
||||
classifyFailoverReason(
|
||||
'{"type":"error","error":{"type":"overloaded_error","message":"Overloaded"}}',
|
||||
|
||||
Reference in New Issue
Block a user