Skip to content

Stop retrying exhausted OpenAI quota - #116

Merged
markeljan merged 1 commit into
mainfrom
codex/openai-terminal-quota
Nov 15, 2026
Merged

markeljan merged 1 commit into
mainfrom
codex/openai-terminal-quota

Conversation

@markeljan

Copy link
Copy Markdown
Owner

Summary

  • Stop the existing AI SDK retry loop on OpenAI's insufficient_quota and project_spend_limit_exceeded codes. Ordinary provider rate limits retain SDK backoff.
  • Return a documented 503 model_quota_exhausted from the skill API. Browser chat shows a fixed message and omits the immediate Retry action for that failure.

Verification

  • Against the original routes, the real OpenAI SDK with mocked HTTP attempted terminal quota requests three times. It now attempts them once. A transient response followed by quota stops on the second attempt; ordinary provider throttling still gets three attempts.
  • Offline route tests covered failures before and after browser stream output. The browser panel test verifies that only other errors show Retry.
  • Bun 1.4.2 typecheck, lint, 290 tests, and Next.js build passed locally.

The provider quota remains a separate operational dependency. Verification used synthetic responses and made no live inference or onchain requests.

OpenAI uses a retryable 429 for terminal project quota errors. Handle the exact structured codes before the SDK retries and give skill clients and browser chat a bounded public error.
@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web3gpt Ready Ready Preview Nov 15, 2026 1:15am UTC

Request Review

@markeljan
markeljan marked this pull request as ready for review November 15, 2026 01:17
@markeljan
markeljan merged commit 9b4224a into main Nov 15, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — eb3f761b Deployed Nov 15, 2026 by vercel[bot]
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.

1 participant