Repository navigation
opencode-zen rate limit (~15-20 RPM) is silent: no header, no doc, no client warning #1145
Description
Client or integration
Codex App (the desktop Codex application, which routes its requests through the OpenCodex proxy at localhost:10100), also reproducible as a Direct HTTP/API client against https://opencode.ai/zen/v1.
Area
Provider adapter (the opencode-zen keyed provider — src/providers/registry.ts:1753), and Proxy and routing (rate-limit handling in src/lib/upstream-retry.ts, src/providers/key-failover.ts, src/lib/retry-after.ts).
Summary
When the keyed opencode-zen provider hits OpenCode's request rate limit, every call returns:
Provider error 429: Rate limit exceeded. Please try again later.
The proxy forwards this generic message verbatim, but exposes nothing that lets the user understand or plan around the limit:
- no
Retry-After/X-RateLimit-*response headers are surfaced, - no provider
notedocuments the limit (the200 requests / 5hnote lives only on the keylessopencode-freeprovider atregistry.ts:1773, even though both share the same base URLhttps://opencode.ai/zen/v1and the same free-model roster), - no client-side warning is shown before the wall,
- the key cooldown (
KeyCooldown,src/providers/key-failover.ts:18) is not surfaced to the dashboard.
The user only discovers the limit after Codex exhausts its own retries and reports exceeded retry limit, last status: 429.
Reproduction
- In the Codex App, select the model
opencode-zen/deepseek-v4-flash-free(routed through the OpenCodex proxy). - Send requests at a sustained pace (≈15+ requests within a short window) from the Codex App chat.
- Observe
status: 429witherrorCode: "rate_limit_exceeded"and the upstream message above.
This is reproduced from real request logs (~/.opencodex/usage.jsonl): 629 total opencode-zen requests, 25 returned status: 429, all errorCode: "rate_limit_exceeded", all with upstreamError: "Provider error 429: Rate limit exceeded. Please try again later.".
Note: this is not the 200/5h quota of opencode-free. Evidence it is a short-window rate limit (burst), not a period quota:
- the first 429 cluster (2026-08-05 13:16:52 UTC) had 0 requests in the prior 5 minutes and only 2–8 requests in the prior 5-hour window → rules out a 200/5h quota,
- consecutive-429 gaps were 10 s, 21 s, 52 s early in a cluster → burst signature,
- busiest 60-second window across the whole log = 15 requests → consistent with a ~15–20 RPM cap on the keyed Zen tier.
Version
@bitkyc08/opencodex@2.10.2 (npm latest).
Operating system
Windows 11 (build 26100), but the behavior is provider-side and OS-independent.
Provider and model
opencode-zen / deepseek-v4-flash-free (also observed on laguna-s-2.1-free, longcat-2.0-free, mimo-v2.5-free during the same 429 bursts).
Logs or error output
status:429 model:deepseek-v4-flash-free provider:opencode-zen
upstreamError: "Provider error 429: Rate limit exceeded. Please try again later."
Rolling 5h-window request counts just before each 429 (excerpt):
2, 3, 4, 5, 6, 7, 8 (early cluster — nowhere near a 200/5h quota)
Busiest 60s window: 15 requests
Redacted configuration
{
"providers": {
"opencode-zen": {
"apiKey": "REDACTED_OPENCODE_ZEN_API_KEY",
"baseUrl": "https://opencode.ai/zen/v1"
}
}
}Checks
- I searched existing issues and documentation. (Note: [Feature]: add per-account Gem/Cla quota display for Google Antigravity #1082 covers quota/reset display; this issue is the underlying silent 429 on
opencode-zenand the missing limit metadata — a distinct root cause.) - I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Aug 6, 2026
Automated translation bookkeeping — detected language: English.
Wibias commentedon Aug 7, 2026
Related
Wibias commentedon Aug 9, 2026
[GD] Opened PR #1330 to address this.
Wibias commentedon Aug 9, 2026
[GD] Research review
Claim: Keyed
opencode-zenfree-model traffic hits a short-window ~15–20 RPM ceiling; OpenCodex forwards opaque 429s with no usable backoff metadata or provider note.Checked against:
dev@3e5cd5374(release/default: n/a for this tip check)opencode-zenregistry entry had no rate-limitnote; Zen429 Rate limit exceededbodies lackRetry-After/X-RateLimit-*, so clients only learn after exhausting retries#1330(fix(providers): surface OpenCode Zen short-window rate limits, @Wibias, open)#1146(cooldown watchdog / notify-on-reset), not the same root causeEvidence
src/providers/registry.tsopencode-zenlacked a rate-limit note whileopencode-freeonly documented ~200/5hProvider error 429: …and usedresolveClientRetryAfterwith the generic 2s default when Zen omitted headersrateLimitsUI was intentionally removed indadda3251/ feat(providers): fill rate-limit gaps in the providers overview #1157 follow-up; not reintroducedGaps: Live Zen 429 reproduction not re-run here (needs a keyed Zen account and sustained traffic).
Recommended next: review/merge #1330; keep #1146 for cooldown/reset notification follow-up.