fix(shell): Fix misleading "Quota exceeded" prefix shown on every 403 error#2342
Open
liruifengv wants to merge 1 commit into
Open
fix(shell): Fix misleading "Quota exceeded" prefix shown on every 403 error#2342liruifengv wants to merge 1 commit into
liruifengv wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts Shell-mode handling of HTTP 403 provider errors so the CLI no longer shows a misleading “Quota exceeded” prefix, and records the fix in release notes.
Changes:
- Update Shell error handling for
APIStatusErrorwithstatus_code == 403to stop hardcoding the “Quota exceeded” wording. - Add an Unreleased changelog entry describing the fix (root + both locales’ release notes).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/kimi_cli/ui/shell/__init__.py |
Changes how 403 provider errors are printed to the console. |
docs/zh/release-notes/changelog.md |
Adds a Chinese Unreleased release-note entry for the fix. |
docs/en/release-notes/changelog.md |
Adds an English Unreleased release-note entry for the fix (but this file is generated). |
CHANGELOG.md |
Adds the source-of-truth Unreleased entry for the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "[red]Quota exceeded, please upgrade your plan or retry later[/red]\n" | ||
| f"[dim]Server: {e}[/dim]" | ||
| ) | ||
| console.print(f"[red]Server: {e}[/red]") |
Comment on lines
+7
to
+8
| - Shell: Fix misleading "Quota exceeded" prefix shown on every 403 error | ||
|
|
Comment on lines
973
to
+974
| elif isinstance(e, APIStatusError) and e.status_code == 403: | ||
| console.print( | ||
| "[red]Quota exceeded, please upgrade your plan or retry later[/red]\n" | ||
| f"[dim]Server: {e}[/dim]" | ||
| ) | ||
| console.print(f"[red]Server: {e}[/red]") |
This was referenced May 23, 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.
Related Issue
Resolve #(issue_number)
Description
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.