google-gemini / google-gemini/gemini-cli

Let users specify priority methods for Gemini usage

Open
#5,127 9 comments 3 reactions 0 assignees View on GitHub
🔒 maintainer only area/agent kind/bug priority/p2 Stale status/bot-triaged
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

### What would you like to be added?

A problem today is that users who go over their limit of the per-user allotment (either via free tier or the paid subscription) then face limits. If you want to increase those limits, you need to switch auth methods to an API key, then switch back to the subscription. This seems silly.

Let's give users the ability to configure priorities for their entitlements so they can control which method is used when. I imagine this is probably just a separate config, not sure if we want to expose it in the UI.

1. Users specify a list of authentication method in priority order
2. When one method encounters a 429 resource exhausted (or just any error??), we fall back to the next in priority
3. We alert users in the UI this has happened (and that there may be billing implications)
4. This fallback persists per session for simplicity - if you want to revert up the stack you can do it manually
5. New sessions start with the top priority method

### Why is this needed?

Gives users the ability to use free tier (or paid subscription) in addition to usage-based billing offered from an API key.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.