fix(session): stop retrying free and Go usage quotas - #47339
Open
KaranDhillon05 wants to merge 2 commits into
Open
fix(session): stop retrying free and Go usage quotas#47339KaranDhillon05 wants to merge 2 commits into
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>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
Why it might be related: |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
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. |
6 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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