Skip to content

fix(shell): Fix misleading "Quota exceeded" prefix shown on every 403 error#2342

Open
liruifengv wants to merge 1 commit into
mainfrom
fix-403
Open

fix(shell): Fix misleading "Quota exceeded" prefix shown on every 403 error#2342
liruifengv wants to merge 1 commit into
mainfrom
fix-403

Conversation

@liruifengv
Copy link
Copy Markdown
Collaborator

@liruifengv liruifengv commented May 22, 2026

Related Issue

Resolve #(issue_number)

Description

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open in Devin Review

Copilot AI review requested due to automatic review settings May 22, 2026 07:30
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 APIStatusError with status_code == 403 to 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]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants