Skip to content

[Error Handling] Provide specific feedback for "Insufficient Quota" or Payment errors #520

@MXD66

Description

@MXD66

Is your feature request related to a problem? Please describe.
Yes. Currently, when the underlying model provider (e.g., OpenAI, DeepSeek) refuses a request due to insufficient funds, quota limits, or account arrears, the chat interface fails silently or returns a generic error. This makes it impossible for the user to distinguish between a temporary network connection issue, a bug, or an actual payment issue with their API provider.

Describe the solution you'd like
I would like the system to parse error responses from the model provider more granularly.

  1. Error Detection: Specifically catch payment-related error codes (such as HTTP 402 Payment Required or provider-specific codes like insufficient_quota).
  2. User Feedback: Instead of a generic failure, display a specific, actionable error message in the chat interface: "Current model quota is insufficient or the account is in arrears. Please check your provider balance."

Describe alternatives you've considered
None.

Additional context
This is particularly important for API-based usage (like OpenAI or DeepSeek) where users manage their own billing, as running out of credits is a common occurrence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions