Skip to content

Improving Pro Model Quota Handling in the CLI #7093

@JayadityaGit

Description

@JayadityaGit

What would you like to be added?

Problem

When a user exceeds their daily usage quota for a Pro model, the CLI tool currently auto-switches to a fallback model (e.g., Flash) for the rest of the session.


Why is this needed?

Previously, after hitting the quota limit:

  • The CLI would show a basic notification.
  • The user was dropped back to a state where they had to manually re-run /auth if they wanted to switch to a different API key.
  • If they continued with Flash and they had no idea about Ctrl+P, they had to retype their last prompt from scratch.

This caused unnecessary friction and confusion.


Solution

We’ve introduced a new ProQuotaDialog that appears when a Pro model quota limit is reached.
This dialog makes the situation clear and offers two direct choices:

  1. Authenticate

    • Run the /auth command directly from the dialog.
    • Switch to a different API key (e.g., a paid key with higher limits) and continue using the Pro model.
  2. Continue with Fallback (Flash)

    • Stay in the session using the designated fallback model.
    • New tip: The dialog reminds the user they can press Ctrl+P to quickly recall their recent prompt, so they don’t need to retype it again.

Benefits

This change improves the user experience by:

  • Transparency: Users are explicitly informed when they hit quota limits.
  • Control: Users can re-authenticate or continue with the fallback model directly from the dialog.
  • Efficiency: With the Ctrl+P tip, users can quickly reuse recent prompts when switching to Flash.

Why is this needed?

Previously, after hitting the quota limit:

  • The CLI would show a basic notification.
  • The user was dropped back to a state where they had to manually re-run /auth if they wanted to switch to a different API key.
  • If they continued with Flash and had no idea about ctrl+p, they had to retype their last prompt from scratch.

This caused unnecessary friction and confusion.


Solution

We’ve introduced a new ProQuotaDialog that appears when a Pro model quota limit is reached.
This dialog makes the situation clear and offers two direct choices:

  1. Authenticate

    • Run the /auth command directly from the dialog.
    • Switch to a different API key (e.g., a paid key with higher limits) and continue using the Pro model.
  2. Continue with Fallback (Flash)

    • Stay in the session using the designated fallback model.
    • New tip: The dialog reminds the user they can press Ctrl+P to quickly recall their recent prompt, so they don’t need to retype it again.

Benefits

This change improves the user experience by:

  • Control: Users can re-authenticate or continue with the fallback model directly from the dialog.
  • Efficiency: With the Ctrl+P tip, users can quickly reuse recent prompts when switching to Flash.

Additional context

No response

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