mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
2 lines
3.2 KiB
JSON
2 lines
3.2 KiB
JSON
{"author":{"id":"MDQ6VXNlcjE0NDAzMDM=","is_bot":false,"login":"matteoantoci","name":"Matteo Antoci"},"body":"## Problem\n\nWhen a combo uses the `auto` strategy, targets are reordered by score. If the top-scored targets all share the same provider (e.g., 4 opencode-go models), a single provider quota exhaustion forces the combo to burn through every same-provider target one by one — each cycling through all accounts getting 429 — before reaching a cross-provider fallback (e.g., glm).\n\nObserved behavior: opencode-go quota exhausted → combo spent ~5 minutes cycling through mimo → kimi → qwen → deepseek (all opencode-go), each spending 30-60s on account fallback loops returning 429, before finally trying glm.\n\nThe auto-selection algorithm has no awareness that all top-scored targets share the same provider, so cross-provider diversity is zero in the fallback chain.\n\n## Expected Behavior\n\nBefore: opencode-go/mimo (429) → opencode-go/kimi (429) → opencode-go/qwen (429) → opencode-go/deepseek (429) → glm/glm-5.1 (success) — **~5 minutes**\n\nAfter: opencode-go/mimo (429) → skip kimi/qwen/deepseek → glm/glm-5.1 (success) — **~10 seconds**\n\n## Root Cause\n\nTwo issues compound:\n\n1. **`isModelAvailable` pre-check doesn't catch quota exhaustion** — when all accounts return 429 \"Subscription quota exceeded\", the account-level cooldown is only 3-5s (base cooldown for OAuth/API key profiles). By the time the next combo target is evaluated, the cooldown has expired and the account appears available again.\n\n2. **429 is excluded from the provider circuit breaker** — `PROVIDER_FAILURE_ERROR_CODES = {408, 500, 502, 503, 504}` at `accountFallback.ts:59`. Even hundreds of consecutive 429s won't open the provider breaker, so there's no durable cross-request backoff for rate-limited providers.\n\n<details><summary>Log evidence (14:00-14:02 UTC, 2026-04-28)</summary>\n\n```\n14:00:30 Model opencode-go/mimo-v2.5-pro failed, trying next (429)\n14:00:31 Trying model 2/5: opencode-go/kimi-k2.6\n14:01:18 Model opencode-go/kimi-k2.6 failed, trying next (429)\n14:01:18 Trying model 3/5: opencode-go/qwen3.6-plus\n14:02:10 Model opencode-go/qwen3.6-plus succeeded (146978ms, 1 fallbacks)\n```\n\nAll accounts returned 429 \"Subscription quota exceeded\" for each model in sequence. Total cascade: ~2 minutes before a working path was found.\n\n</details>\n\n<details><summary>Additional evidence: overnight harness (2026-04-29)</summary>\n\n```\n03:40:50 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n03:40:56 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n03:51:03 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n03:51:09 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n03:51:15 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n...\n06:48:39 429 mimo-v2.5-pro \"Subscription quota exceeded\"\n```\n\nAll 429s are from the same provider. The combo never reached the cross-provider fallback (glm). Every request cycled through all 3 accounts × all opencode-go targets before giving up.\n\n</details>","comments":[],"createdAt":"2026-04-28T15:31:43Z","labels":[],"number":1731,"title":"[Feature] (combo): provider-level exhaustion tracking to skip same-provider targets","url":"https://github.com/diegosouzapw/OmniRoute/issues/1731"}
|