[feature]: Gemini CLI integration
Pre-flight checks
- [x] I searched existing issues and did not find a duplicate request.
- [x] I reviewed current behavior on the production released OpenCode version.
OpenCode version reviewed
1.14.25
Problem statement
There is currently no way to review usage of the Gemini CLI plans (this is different from Google Antigravity).
Proposed change
I propose the possible integration of Gemini CLI usage tracking after the user has linked their account via the opencode-gemini-auth plugin (https://github.com/jenslys/opencode-gemini-auth), which uses the opencode auth login flow and captures OAuth from Google.
For context, usage of Gemini CLI models is split across three buckets, irrespective of model series: pro, flash, and flash-preview. Consequently, using gemini-3.1-pro-preview will also cut into available usage for gemini-2.5-pro.
opencode-gemini-auth offers a command (/gquota) that prompts the agent to use a plugin-added tool, gemini_quota, to output model usage. It would be neat to have the three buckets displayed using opencode-quota instead of requiring a tool be available 24/7.
For reference: Gemini CLI plans
Alternatives considered
No response
Acceptance criteria
- [ ]
opencode-quotasidebar displays information about at least one of the bucket's usage - [ ]
opencode-quotanotification displays information about at least one of the bucket's usage - [ ]
opencode-quotaGemini CLI integration only requires one additional plugin:opencode-gemini-auth - [ ]
opencode-quotadetects Gemini CLI integration by addinggoogle-gemini-clitoenabledProvidersarray
@capyBearista Thanks for suggestion, I'm assuming this lets people use the "bundled" api credits if they already have a Google AI plan?
@slkiser Yup! Although I believe it's usable even with the free tier. Gemini CLI offers pretty generous model usage as long as you sign in with your Google account.
Added in v3.3.0, please comment if it doesn't work. Also thanks for letting me know about Gemini CLI (google has way too many soon to be killed off products).
It really does, but hopefully this one lives on for a little longer lol.
That was so fast! By the way, may I suggest a change to how the usage buckets are shown?
Current state looks like:
It seems like some models are being repeated. Since models' usage capacities are strictly grouped by their "quality" (e.g. Gemini 3.1 Pro usage also consumes Gemini 2.5 Pro capacity while Gemini 3 Flash usage also consumes Gemini 2.5 Flash capacity), I think it would be cleaner if the quota window displayed the bars like this:
I just created a PR #61 for this.