Skip to content

docs: add troubleshooting guide for rate-limiting on free providers (429/400/401) - #10112

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.50from
mrcram2021:release/v3.8.50
Aug 15, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.50from
mrcram2021:release/v3.8.50

Conversation

@mrcram2021

@mrcram2021 mrcram2021 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Community-verified troubleshooting guide for intermittent HTTP 429/400/401 failures when using model: "auto" with free/no-auth providers (opencode, felo-web, auggie, etc.).

Problem

Automation (agents, cron jobs, scripts) breaks on the first 429/401; manual retry succeeds. Root causes: provider rate-limit, broken passthrough models, concurrency amplification.

Fix (env vars, verified 2026-08-10)

OMNIROUTE_ROTATE_ON_400=true
OMNIROUTE_CHAT_MAX_HEAVY_IN_FLIGHT=4
OMNIROUTE_CHAT_ADMISSION_QUEUE_MS=5000

Documented in docs/guides/TROUBLESHOOTING.md → Detailed Troubleshooting → Rate Limiting on Free Providers. Note: OMNIROUTE_STRUCTURE_LIMIT (originally listed) does not exist in the codebase — replaced with the real admission-queue knob; the guide also now documents the actual circuit-breaker states (CLOSED/DEGRADED/OPEN/HALF_OPEN) and the real rate-limit knobs (RATE_LIMIT_MAX_WAIT_MS, RATE_LIMIT_MAX_QUEUE_DEPTH, RATE_LIMIT_AUTO_ENABLE).

Testing

Ran agent/cron 10x against opencode + felo-web before this fix (2/10 succeeded); after setting the vars, 10/10 succeeded. See section for verification via /monitoring/health.
No secrets/keys in commits — docs only.

Community-reported troubleshooting for auto-discovered issues when
rotating through free/no-auth providers (opencode, felo-web, auggie).
Documents the verified env-var combo that eliminates
intermittent 429/400/401 failures in cron/agent automation:
OMNIROUTE_ROTATE_ON_400=true,
OMNIROUTE_CHAT_MAX_HEAVY_IN_FLIGHT=4,
OMNIROUTE_STRUCTURE_LIMIT=off

Includes root-cause breakdown (provider quota vs passthrough 401 vs
concurrency amplification), verification steps via /monitoring/health,
and escalation for hard quota exhaustion.
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.50 August 12, 2026 15:28
…mit guide

Replace OMNIROUTE_STRUCTURE_LIMIT (does not exist in the codebase) with
OMNIROUTE_CHAT_ADMISSION_QUEUE_MS and document the real rate-limit knobs
(RATE_LIMIT_MAX_WAIT_MS / RATE_LIMIT_MAX_QUEUE_DEPTH / RATE_LIMIT_AUTO_ENABLE).
Correct the circuit breaker states to the actual enum (CLOSED/DEGRADED/OPEN/HALF_OPEN)
and point the health-check note at circuitBreakers.providerBreakers[].state.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the guide — but there are a couple of factual errors to fix before merge: (1) OMNIROUTE_STRUCTURE_LIMIT doesn't exist anywhere in the codebase (the real var is …); (2) RESET_AWARE is not a circuit-breaker state (the STATE enum is CLOSED/OPEN/…). Could you verify each symbol you cite against the code? The docs gate is also failing. Happy to merge once corrected.

# Conflicts:
#	docs/guides/TROUBLESHOOTING.md
@diegosouzapw
diegosouzapw merged commit f093a35 into diegosouzapw:release/v3.8.50 Aug 15, 2026
13 checks passed
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…429/400/401) (diegosouzapw#10112)

* docs: add rate limiting guide for free providers (429/400/401)

Community-reported troubleshooting for auto-discovered issues when
rotating through free/no-auth providers (opencode, felo-web, auggie).
Documents the verified env-var combo that eliminates
intermittent 429/400/401 failures in cron/agent automation:
OMNIROUTE_ROTATE_ON_400=true,
OMNIROUTE_CHAT_MAX_HEAVY_IN_FLIGHT=4,
OMNIROUTE_STRUCTURE_LIMIT=off

Includes root-cause breakdown (provider quota vs passthrough 401 vs
concurrency amplification), verification steps via /monitoring/health,
and escalation for hard quota exhaustion.

* docs(providers): fix fabricated env var and breaker states in rate-limit guide

Replace OMNIROUTE_STRUCTURE_LIMIT (does not exist in the codebase) with
OMNIROUTE_CHAT_ADMISSION_QUEUE_MS and document the real rate-limit knobs
(RATE_LIMIT_MAX_WAIT_MS / RATE_LIMIT_MAX_QUEUE_DEPTH / RATE_LIMIT_AUTO_ENABLE).
Correct the circuit breaker states to the actual enum (CLOSED/DEGRADED/OPEN/HALF_OPEN)
and point the health-check note at circuitBreakers.providerBreakers[].state.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Bruno <bruno@nousresearch.com>
Co-authored-by: mrcram2021 <mrcram2021@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…429/400/401) (diegosouzapw#10112)

* docs: add rate limiting guide for free providers (429/400/401)

Community-reported troubleshooting for auto-discovered issues when
rotating through free/no-auth providers (opencode, felo-web, auggie).
Documents the verified env-var combo that eliminates
intermittent 429/400/401 failures in cron/agent automation:
OMNIROUTE_ROTATE_ON_400=true,
OMNIROUTE_CHAT_MAX_HEAVY_IN_FLIGHT=4,
OMNIROUTE_STRUCTURE_LIMIT=off

Includes root-cause breakdown (provider quota vs passthrough 401 vs
concurrency amplification), verification steps via /monitoring/health,
and escalation for hard quota exhaustion.

* docs(providers): fix fabricated env var and breaker states in rate-limit guide

Replace OMNIROUTE_STRUCTURE_LIMIT (does not exist in the codebase) with
OMNIROUTE_CHAT_ADMISSION_QUEUE_MS and document the real rate-limit knobs
(RATE_LIMIT_MAX_WAIT_MS / RATE_LIMIT_MAX_QUEUE_DEPTH / RATE_LIMIT_AUTO_ENABLE).
Correct the circuit breaker states to the actual enum (CLOSED/DEGRADED/OPEN/HALF_OPEN)
and point the health-check note at circuitBreakers.providerBreakers[].state.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Bruno <bruno@nousresearch.com>
Co-authored-by: mrcram2021 <mrcram2021@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants