Repository navigation
fix(session): stop retrying free and Go usage quotas - #47339
KaranDhillon05 wants to merge 2 commits into
Conversation
Treat FreeUsageLimitError and GoUsageLimitError as terminal so the client surfaces the Go upsell once instead of sleeping for hours on retry-after. Persist the Go upsell message for free-tier failures. Closes anomalyco#47318 Co-authored-by: Cursor <cursoragent@cursor.com>
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
Why it might be related: |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Just a heads up to maintainers: The bot flagged this as a duplicate of #46994, but that PR targets the v2 branch. This PR applies the fix to release/dev (v1.18.x) to resolve the issue for current users. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #47318
Type of change
What does this PR do?
Free Zen models return
FreeUsageLimitErrorwith a long dailyretry-after. The session retry policy treated that like a normal 429 and slept for hours (Free usage exceeded, subscribe to Go [retrying in 8h …]).This change treats
free_tier_limitandaccount_rate_limitas terminal: publish the existing Go upsell status once so App/TUI dialogs still fire, then stop instead of waiting. Free-tier API errors also persist the Go upsell message instead of a generic rate-limit string. Ordinary short-window 429s still retry.How did you verify your code works?
bun test test/session/retry.test.ts test/provider/error.test.tsinpackages/opencode(65 pass)bun typecheckinpackages/opencodeScreenshots / recordings
N/A — non-UI change.
Checklist