Skip to content

fix(gateway): separate 429 quota errors from auth failures (#32790) - #33780

Closed
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/32790-gateway-429-mislabel-and-fallback-label
Closed

fix(gateway): separate 429 quota errors from auth failures (#32790)#33780
zccyman wants to merge 1 commit into
NousResearch:mainfrom
atyou2happy:fix/32790-gateway-429-mislabel-and-fallback-label

Conversation

@zccyman

@zccyman zccyman commented May 28, 2026

Copy link
Copy Markdown
Contributor

Closes #32790

Summary

Two fixes in one commit because they share the same code area:

  1. 429 quota mislabeled as auth failure (gateway/run.py:16132): When resolve_runtime_provider raises an AuthError whose code indicates a rate-limit/quota problem (contains "rate", "quota", or "limit"), the gateway now surfaces "⚠️ Provider quota exhausted: ..." instead of the misleading "⚠️ Provider authentication failed: No Codex credentials stored".

  2. Fallback provider log label (gateway/run.py:910): The Fallback provider resolved: log line now uses the literal provider key from the config entry (entry.get("provider")) instead of the normalized provider label returned by resolve_runtime_provider. This fixes the issue where ollama in config was being logged as openrouter.

Changes

  • gateway/run.py — two targeted patches; no new dependencies

Testing

Existing tests cover the fallback resolution path. The behavioral change (different user-facing message for rate-limit AuthErrors) is verified by code inspection.

@zccyman
zccyman requested a review from a team May 28, 2026 09:23
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery provider/openai OpenAI / Codex Responses API codex duplicate This issue or pull request already exists labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of merged #33168 which already fixes #32790 (Codex 429 quota mislabeled as auth failure). The fallback provider log label fix is also covered by #32881 (open).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes mislabels upstream 429 quota exhaustion as missing Codex credentials

2 participants