cd /news/ai-agents/pi-coding-agent-gets-official-google… · home › topics › ai-agents › article
[ARTICLE · art-177649] src=explainx.ai ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Pi Coding Agent Gets Official Google AI Plan Sign-In for Gemini Quota

Contributor David Brai opened pull request 12614 on the earendil-works/pi repository, adding a `google-ai-plan` provider that lets the Pi terminal coding agent sign in via Google OAuth and draw model calls against a user's Google AI plan quota through the Gemini Interactions API `createPerUserQuota` endpoint. The provider defaults to `gemini-4-hydrogen`, supports streaming, thinking with signed thought replay, tool calls and usage reporting, and handles daily-limit, model-not-on-plan, sign-in, eligibility and kill-switch errors; a November 28 commit keeps `google-ai-plan` out of `builtinProviders()` until integrators opt in. Contributor Ziphyrien wrote in the thread that Google approved the quota endpoint for Pi only, a claim that remains unconfirmed until Google publishes harness-specific guidance, and forks cannot reuse Pi's OAuth client without their own Google Cloud consent screen.

key takeaway

Pi's `google-ai-plan` provider signs in via loopback OAuth with PKCE and DPoP-bound refresh tokens and bills through the `createPerUserQuota` endpoint, but it stays excluded from `builtinProviders()` until integrators opt in and forks must register their own Google OAuth client.

by read7 min views4 publishedNov 28, 2026
Pi Coding Agent Gets Official Google AI Plan Sign-In for Gemini Quota
Image: Explainx (auto-discovered)

Pi is adding an official way to spend your Google AI plan subscription inside the terminal coding agent, not only in the Gemini web app. Contributor David Brai opened pull request 12614 on earendil-works/pi with a google-ai-plan provider that signs you in through Google OAuth and routes model calls through the Gemini Interactions API createPerUserQuota endpoint. The work is Google-aware billing for harnesses: the same subscription quota that buys you Gemini 4 Hydrogen on the web can power tool loops in Pi, if your plan tier includes the model and the provider ships on your install channel.

What Pi added in pull request 12614 #

The November 26–28 commits on the branch describe a full provider, not a stub.

Piece What the PR says it does
Sign-in Loopback OAuth on 127.0.0.1 withPKCE ,DPoP-bound refresh tokens , and plan-specific scopes
Billing route google-interactions client targeting**:createPerUserQuota** so usage draws fromper-user plan quota
Models Default gemini-4-hydrogen ; streaming, thinking with signed thought replay, tool calls, usage reporting
Errors Daily limit (no retry),model not on plan ,sign-in ,eligibility ,kill switch
Packaging builtinProviders() later excludes** google-ai-plan** until integrators opt in, per a November 28 commit

Pi keeps its design rule that pi-ai ships no Google client: the coding agent passes Pi's own client into googleAiPlanProvider(). Other apps must register theirs, which is why forks cannot reuse Pi's OAuth client without their own Google Cloud consent screen.

That architecture matches what nanocode and Hermes ports describe in cross-references on the same thread: third-party harnesses can target the same quota endpoint, but each needs Google approval for its OAuth client. Contributor Ziphyrien wrote that Google approved the endpoint for Pi only. Treat that as a thread claim until Google publishes harness-specific guidance; it still explains why forks were scrambling to open approval tickets on November 27–28.

Why Google picked a minimal harness #

Hacker News discussion on item 50675069 asked why Pi got the integration instead of a larger IDE.

Commenter dannyw (reply 50675523) argued Pi is popular, minimal, open source, and extensible, but still backed by Earendil, which can sign contracts. That combination is rare: many tiny agents lack a company table for OAuth review, while big IDEs already bundle their own Google billing.

Commenter mtford (50675347) read the code and thought only Google AI Ultra would work at first. Andy8647 later challenged that reading: the model catalog mixes Hydrogen (every paid tier), Neon (Pro and Ultra), Carbon (Ultra-only), and Flash-Lite. If createPerUserQuota accepts Pro accounts but gates Carbon, Pi would surface the same not-on-plan errors the API already returns rather than blocking sign-in entirely.

For builders already on Pi because of its small prompt and inspectable sessions (see explainx.ai's Pi 1.0 harness guide), plan auth is the next cost lever after local models and harness adapters (Hugging Face adapter news).

How sign-in and quota differ from an API key #

Loopback OAuth for Pi Google AI plan sign-in sits beside closed API billing, like a key in a capsule next to a folder

Most agent tutorials assume a Gemini API key on a Google Cloud project. That path meters pay-as-you-go spend and fits server deployments.

The google-ai-plan path meters consumer subscription entitlements. Google's Interactions API general availability post (covered on explainx.ai in Gemini managed agents and sandboxes) positions interactions as the primary agent surface. createPerUserQuota is the consumer bridge: the model still runs on Google infrastructure, but quota accounting ties to the signed-in user, not a shared project key.

Practical consequences for Pi users:

  1. Daily caps feel like mobile data — the provider mapsdaily limit errors tonon-retryable failures, so agents should backoff instead of hammering the API.
  2. Model pickers must respect tier — attemptingGemini 4 Carbon onGoogle AI Pro should fail fast withupgrade messaging , not silent fallback.
  3. Kill switch paths — enterprise admins can cut third-party OAuth clients; Pi must surfacesign-in andeligibility errors clearly (the PR lists both).

If your team standardizes on Decision 1 or tool retrieval on Interactions (Decision 1 coverage, tool retrieval piece), plan auth in Pi is the terminal-side mirror of the same API family.

Terms, approval, and fork risk #

The thread's sharpest disagreement was legal, not technical.

HazAT (PR comment) said Google's terms might forbid third-party harnesses even if the code works. Ziphyrien answered that Pi uses Google's official per-user quota route and Google approved Pi.

explainx.ai does not substitute GitHub comments for legal advice. From a builder risk lens:

  • Approved-client lists can be narrow — if onlyPi's client ID is blessed,oh-my-pi and corporate forks need their own review (open oh-my-pi issue referenced from the PR ).
  • OAuth desktop clients leak easily — loopback redirect URIs are standard, butDPoP andrefresh rotation matter on shared laptops.
  • Quota is not confidentiality — plan billing does not changedata handling ; treat prompts like any cloud model call.

For MCP-heavy Pi setups (MCP Codemode return), a plan-backed Gemini provider does not replace tool sandboxing or secret scanning.

What developers are saying #

Beyond HN, the GitHub thread shows global demand and install confusion.

Voice Claim (not verified by explainx.ai)
qiuhuiming Testing commit 628d2cc ,pi auth login google-ai-plan returned** Error 401: disabled_client** before consent — asked whether OAuth is intentionally off while the PR is draft
s-smits Asked whether December 2 is the rollout date (no maintainer confirmation in-thread)
PythonicNinja / ejpespa Celebrate official Gemini in Pi ; several noteUltra upsell

Treat disabled_client reports as status signals: either the client is not production-enabled yet, or testers need the exact commit that merged provider docs. After install, verify with pi auth login google-ai-plan (exact subcommand from the PR) and read stderr before wiring CI.

How to try it safely #

When the provider lands on your channel:

  1. Update Pi frompi.dev or your fork's release notes; confirm**google-ai-plan** appears in provider docs.
  2. Run plan login once on a machine you control; store tokens where your fork documents (never commit OAuth JSON).
  3. Pick a default model matching your subscription — start with**gemini-4-hydrogen** unless you confirmedNeon orCarbon on your tier.
  4. Set fallbacks — keepAnthropic orlocal Qwen providers configured; daily limits will bite long agent jobs (Inkling on Pi adapter context ).
  5. Re-read Google AI plan perks — explainx.ai'sGoogle AI Pro Colab claimed-vs-verified guide shows how easy it is to over-read GPU marketing; apply the same skepticism towhich Gemini models each tier includes.

Teams rolling agents to dozens of laptops should pair this with corporate AI training on explainx.ai workshops so engineers know when subscription quota beats project API keys.

What to log before you switch billing paths

If you migrate a team from shared API keys to per-user plan login, capture a week of baseline metrics first: tokens per task, tool-call failure rate, and how often daily limits fire. Plan quota errors are user-visible by design; a single developer burning Ultra quota on a loop can block everyone else on a family plan. Pi session files help because the harness already exposes usage objects in-thread, but finance still needs a policy: who pays when Ultra is required for Carbon. Document fallback providers in agents.md or your internal Pi config so CI and headless runners do not depend on OAuth flows that need a browser. Server jobs should stay on API keys or Vertex contracts until Pi documents a service account path, which this pull request does not claim.

How Pi compares with other harness Google plan ports #

Different API pipes meeting through one adapter mirrors how Pi and forks share the Google AI plan quota pattern

The PR became a template the same week:

  • fitchmultz/pi merged a port of the provider.
  • nanocode commit messages describe**--google-auth google-ai-plan** waiting onits own approved client .
  • Hermes Agent andPsi issues reference upstream12614 .

That ecosystem split matters: Pi may ship first, but your org might run OpenCode, Claude Code, or a fork. Each path needs Google's OAuth approval, not just copying Pi's source.

For a wider harness map, see the June Pi minimal harness primer and GLM Coding Plan harness guide — different vendors, same question of who owns the billing relationship.

Bottom line #

Pull request 12614 is the first open, code-level proof that Google will let a third-party coding agent spend consumer Google AI plan quota through Interactions, with explicit error types and fork-level OAuth requirements. Whether that is Ultra-only, Pro-inclusive, or disabled until December was still contested in comments on November 28.

Watch pi.dev, the default branch on GitHub, and disabled_client reports before you reorganize spend away from API keys. If you need Gemini in production agents today, the Gemini API CLI agent shell piece remains the documented API-key path while plan auth rolls out.

── more in #ai-agents 4 stories · sorted by recency
── more on @pi 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/pi-coding-agent-gets…] indexed:0 read:7min 2026-11-28 · —