fix(ui): add dedicated error message for API rate limit (429)#1407
Open
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
Open
fix(ui): add dedicated error message for API rate limit (429)#1407howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
howardpen9 wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
Previously, 429 errors showed a generic "LLM provider error" message after retries were exhausted. This adds a clear, actionable message for both shell and print UIs, consistent with how 401/402/403 are already handled. Closes MoonshotAI#1383
This was referenced Mar 12, 2026
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.
Summary
[yellow]styling (warning, not error) since the issue is transient and recoverableContext
Reported in #1383 — users hitting rate limits see a generic
LLM provider error: ...message, which doesn't clearly explain the cause or suggest what to do. The 429 case was missing from the status-code-specific error handling that already covers 401 (auth), 402 (membership expired), and 403 (quota exceeded).Changes
src/kimi_cli/ui/shell/__init__.py: Addelifbranch fore.status_code == 429with actionable messagesrc/kimi_cli/ui/print/__init__.py: Add same 429 handling + importAPIStatusErrorTest plan