Google adding official Google AI plan support to Pi coding agent
Pi coding agent pull request 12614 adds official Google AI Ultra plan support with Gemini 4 models running through the createPerUserQuota endpoint.
By Dillip Chowdary • Nov 29, 2026 • Source: github.com

At a glance
- Product
- Pi coding agent
- PR number
- 12614
- Default model
- gemini-4-hydrogen
- Auth protocol
- PKCE and DPoP loopback OAuth
- Endpoint
- :createPerUserQuota
- Date
- November 26, 2026
In this post
The developers of the Pi coding agent opened pull request 12614 to introduce an official Google AI Ultra plan provider, as detailed in github.com's report. The integration allows subscribers to authenticate using their personal Google accounts and route model interactions through Google's dedicated endpoint instead of relying on Vertex AI project billing.
This article covers the architecture of the proposed provider, the authentication protocol, error-handling mechanisms, and downstream fork policies for developers using the Pi CLI ecosystem. The changes target software engineers looking to run Gemini foundation models directly inside terminal-based agentic workflows under existing consumer or enterprise subscriptions.
01Loopback OAuth and the Interactions API
Developer davidbrai committed the initial google-ai-plan provider implementation on November 26, 2026. Authentication connects through a local loopback OAuth flow using Proof Key for Code Exchange (PKCE) alongside Demonstrating Proof-of-Possession (DPoP) bound refresh tokens. This handshake verifies client integrity without exposing static long-lived client secrets inside local environments.
Once authorized, requests route through the Interactions API using the createPerUserQuota endpoint. The provider package handles streaming generation, signed thought replay during extended thinking sequences, tool calls, and real-time usage telemetry. It sets gemini-4-hydrogen as the baseline default model.
The network layer isolates its timeout configuration to track only the initial wait for response headers. This prevents premature connection resets while the underlying model processes prolonged reasoning traces before generating initial tokens.
02Client registration rules for forks
The core pi-ai package deliberately excludes bundled Google OAuth credentials to preserve security isolation across distributed tools. The upstream coding-agent application passes Pi's approved client configuration to the provider function at runtime. Upstream documentation updates specify that third-party distributions cannot inherit this configuration automatically.
Independent forks and downstream derivatives, including projects like FineCode, Psi, PiG, and oh-my-pi, must register their own dedicated OAuth credentials with Google. Contributor Ziphyrien noted in the pull request discussion that the specific endpoint was approved directly by Google for Pi. Testing commit 628d2cc with pi auth login google-ai-plan initially produced Error 401: disabled_client prior to consent, indicating client-side authorization gates remain active during testing.
Note: Downstream forks and third-party tools must register an independent Google OAuth client and receive explicit approval before signing in against the Google AI Ultra plan provider.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Error handling and plan validation
The provider implements explicit handlers for plan validation failures rather than allowing generic API disconnects. Dedicated logic flags non-retriable daily quota exhaustion, missing subscription tiers, account sign-in invalidation, general eligibility issues, and administrative kill-switch flags. Scope-related authorization errors fall back to pattern-matching against raw error message strings whenever structured ErrorInfo payloads are absent.
Subsequent commits refined account privacy and time formatting. Commit 37f495b removed persistent account email storage from local plan credential files, reducing residual profile traces on disk. Another fix resolved a calculation bug where the daily limit reset countdown displayed as one hour and sixty minutes.
04Subscription tier mapping and model access
The catalog maps four primary foundation models across the provider configuration: Gemini 4 Hydrogen, Gemini 4 Neon, Gemini 4 Carbon, and Gemini 3.5 Flash-Lite. While login screens label the interface as Sign in with Google (AI Ultra), discussion focused on how the endpoint evaluates lower subscription levels like Google AI Pro.
| Model | Tier availability | Quota status |
|---|---|---|
| Gemini 4 Hydrogen | Free, Pro, Ultra | Full quota |
| Gemini 4 Neon | Pro, Ultra | Full quota |
| Gemini 4 Carbon | Ultra only | Zero limit on Pro |
| Gemini 3.5 Flash-Lite | Free, Pro, Ultra | Full quota |
Community analysis highlighted that the underlying createPerUserQuota endpoint differentiates accounts by per-model quotas rather than universal subscription blocks. When a non-Ultra account requests an excluded model like Carbon, the interface triggers a not-on-plan response with a prompt directing users to upgrade at one.google.com/ai.
05Downstream adoption across coding agents
External projects integrated the pull request commits immediately after publication. Repository mizorewww cut fork release v1.7.0-fork.1 by combining upstream main with the commits from pull request 12614, while chunyoupeng merged the commits into a local branch. Related pull requests tracking the implementation appeared across the FineCode, Psi, and PiG codebases.
Developer zchee referenced the implementation to build Gemini routing into claude-code-proxy for subscribers using Google AI Ultra plans. Related tickets in repositories like Mercury and stablyai/orca evaluated how the plan provider interacts with external agent harnesses and the Antigravity CLI over ACP.
Frequently asked questions
What models are supported by the Google AI plan provider in Pi?
The catalog includes Gemini 4 Hydrogen, Gemini 4 Neon, Gemini 4 Carbon, and Gemini 3.5 Flash-Lite, with Hydrogen configured as the default model.
Can forks of the Pi coding agent use the default Google login client?
No, third-party forks must register their own approved Google OAuth client because Pi does not ship shared credentials in the pi-ai library.
How does the integration handle accounts that exceed their usage quota?
The provider recognizes daily limit exhaustion as a non-retriable plan error and displays the remaining reset time without automatic retries.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement