Merge pull request #687 from evalexpr/fix/usage-limit-fallback
fix: add 'usage limit' to rate limit detection patterns
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- Docker: allow optional home volume + extra bind mounts in `docker-setup.sh`. (#679) — thanks @gabriel-trigo.
|
- Docker: allow optional home volume + extra bind mounts in `docker-setup.sh`. (#679) — thanks @gabriel-trigo.
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
- Agents: recognize "usage limit" errors as rate limits for failover. (#687) — thanks @evalexpr.
|
||||||
- CLI: avoid success message when daemon restart is skipped. (#685) — thanks @carlulsoe.
|
- CLI: avoid success message when daemon restart is skipped. (#685) — thanks @carlulsoe.
|
||||||
- Gateway: disable the OpenAI-compatible `/v1/chat/completions` endpoint by default; enable via `gateway.http.endpoints.chatCompletions.enabled=true`.
|
- Gateway: disable the OpenAI-compatible `/v1/chat/completions` endpoint by default; enable via `gateway.http.endpoints.chatCompletions.enabled=true`.
|
||||||
- macOS: stabilize bridge tunnels, guard invoke senders on disconnect, and drain stdout/stderr to avoid deadlocks. (#676) — thanks @ngutman.
|
- macOS: stabilize bridge tunnels, guard invoke senders on disconnect, and drain stdout/stderr to avoid deadlocks. (#676) — thanks @ngutman.
|
||||||
|
|||||||
@@ -272,6 +272,14 @@ describe("classifyFailoverReason", () => {
|
|||||||
);
|
);
|
||||||
expect(classifyFailoverReason("bad request")).toBeNull();
|
expect(classifyFailoverReason("bad request")).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("classifies OpenAI usage limit errors as rate_limit", () => {
|
||||||
|
expect(
|
||||||
|
classifyFailoverReason(
|
||||||
|
"You have hit your ChatGPT usage limit (plus plan)",
|
||||||
|
),
|
||||||
|
).toBe("rate_limit");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("isCloudCodeAssistFormatError", () => {
|
describe("isCloudCodeAssistFormatError", () => {
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ const ERROR_PATTERNS = {
|
|||||||
"resource has been exhausted",
|
"resource has been exhausted",
|
||||||
"quota exceeded",
|
"quota exceeded",
|
||||||
"resource_exhausted",
|
"resource_exhausted",
|
||||||
|
"usage limit",
|
||||||
],
|
],
|
||||||
timeout: [
|
timeout: [
|
||||||
"timeout",
|
"timeout",
|
||||||
|
|||||||
Reference in New Issue
Block a user