{"slug": "pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota", "title": "Pi Coding Agent Gets Official Google AI Plan Sign-In for Gemini Quota", "summary": "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.", "body_md": "**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](https://github.com/earendil-works/pi/pull/12614?ref=explainx) 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.\n\n## What Pi added in pull request 12614\n\nThe November 26–28 commits on the branch describe a full provider, not a stub.\n\n| Piece | What the PR says it does | \n|---|---|\n| Sign-in | Loopback OAuth on `127.0.0.1` with**PKCE** ,**DPoP-bound refresh tokens** , and plan-specific scopes | \n| Billing route | **`google-interactions`** client targeting**`:createPerUserQuota`** so usage draws from**per-user plan quota** | \n| Models | Default **`gemini-4-hydrogen`** ; streaming, thinking with signed thought replay, tool calls, usage reporting | \n| Errors | **Daily limit** (no retry),**model not on plan** ,**sign-in** ,**eligibility** ,**kill switch** | \n| Packaging | **`builtinProviders()`** later excludes**` google-ai-plan`** until integrators opt in, per a November 28 commit | \n\nPi 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.\n\nThat 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.\n\n## Why Google picked a minimal harness\n\nHacker News discussion on [item 50675069](https://news.ycombinator.com/item?id=50675069&ref=explainx) asked why **Pi** got the integration instead of a larger IDE.\n\n**Commenter dannyw** ([reply 50675523](https://news.ycombinator.com/item?id=50675523&ref=explainx)) 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.\n\n**Commenter mtford** ([50675347](https://news.ycombinator.com/item?id=50675347&ref=explainx)) 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.\n\nFor builders already on **Pi** because of its **small prompt and inspectable sessions** (see explainx.ai's [Pi 1.0 harness guide](https://explainx.ai/blog/earendil-pi-1-durable-minimal-harness-2026)), plan auth is the next cost lever after **local models** and **harness adapters** ([Hugging Face adapter news](https://explainx.ai/blog/hugging-face-harness-adapters-qwen38-27b-super-adapter-pi-hermes-opencode-2026)).\n\n## How sign-in and quota differ from an API key\n\nLoopback OAuth for Pi Google AI plan sign-in sits beside closed API billing, like a key in a capsule next to a folder\n\nMost agent tutorials assume a **Gemini API key** on a **Google Cloud project**. That path meters **pay-as-you-go** spend and fits **server** deployments.\n\nThe **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](https://explainx.ai/blog/google-gemini-managed-agents-self-hosted-sandboxes-november-2026)) 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.\n\nPractical consequences for Pi users:\n\n1. **Daily caps feel like mobile data** — the provider maps**daily limit** errors to**non-retryable** failures, so agents should backoff instead of hammering the API.\n2. **Model pickers must respect tier** — attempting**Gemini 4 Carbon** on**Google AI Pro** should fail fast with**upgrade messaging** , not silent fallback.\n3. **Kill switch paths** — enterprise admins can cut third-party OAuth clients; Pi must surface**sign-in** and**eligibility** errors clearly (the PR lists both).\n\nIf your team standardizes on **Decision 1** or **tool retrieval** on Interactions ([Decision 1 coverage](https://explainx.ai/blog/google-gemini-decisions-api-decision-1-november-2026), [tool retrieval piece](https://explainx.ai/blog/gemini-api-tool-retrieval-defer-loading-tool-search-interactions-api-november-2026)), plan auth in Pi is the **terminal-side mirror** of the same API family.\n\n## Terms, approval, and fork risk\n\nThe thread's sharpest disagreement was legal, not technical.\n\n**HazAT** ([PR comment](https://github.com/earendil-works/pi/pull/12614?ref=explainx)) 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**.\n\nexplainx.ai does not substitute GitHub comments for legal advice. From a **builder risk** lens:\n\n- **Approved-client lists can be narrow** — if only**Pi's client ID** is blessed,**oh-my-pi** and corporate forks need their own review ([open oh-my-pi issue referenced from the PR](https://github.com/can1357/oh-my-pi/issues/20891?ref=explainx) ).\n- **OAuth desktop clients leak easily** — loopback redirect URIs are standard, but**DPoP** and**refresh rotation** matter on shared laptops.\n- **Quota is not confidentiality** — plan billing does not change**data handling** ; treat prompts like any cloud model call.\n\nFor MCP-heavy Pi setups ([MCP Codemode return](https://explainx.ai/blog/pi-adds-mcp-codemode-earendil-reversal-2026)), a plan-backed Gemini provider does not replace **tool sandboxing** or **secret scanning**.\n\n## What developers are saying\n\nBeyond HN, the GitHub thread shows **global demand** and **install confusion**.\n\n| Voice | Claim (not verified by explainx.ai) | \n|---|---|\n| **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 | \n| **s-smits** | Asked whether **December 2** is the rollout date (no maintainer confirmation in-thread) | \n| **PythonicNinja / ejpespa** | Celebrate **official Gemini in Pi** ; several note**Ultra** upsell | \n\nTreat **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.\n\n## How to try it safely\n\nWhen the provider lands on your channel:\n\n1. **Update Pi** from[pi.dev](https://pi.dev/?ref=explainx) or your fork's release notes; confirm**`google-ai-plan`** appears in provider docs.\n2. **Run plan login** once on a machine you control; store tokens where your fork documents (never commit OAuth JSON).\n3. **Pick a default model** matching your subscription — start with**`gemini-4-hydrogen`** unless you confirmed**Neon** or**Carbon** on your tier.\n4. **Set fallbacks** — keep**Anthropic** or**local Qwen** providers configured; daily limits will bite long agent jobs ([Inkling on Pi adapter context](https://explainx.ai/blog/inkling-2-mini-pi-adapted-preview-harness-adapter-fewer-tokens-claimed-vs-verified-2026) ).\n5. **Re-read Google AI plan perks** — explainx.ai's[Google AI Pro Colab claimed-vs-verified guide](https://explainx.ai/blog/google-ai-pro-colab-a100-h100-200-compute-units-claimed-vs-verified-2026) shows how easy it is to over-read GPU marketing; apply the same skepticism to**which Gemini models** each tier includes.\n\nTeams rolling agents to dozens of laptops should pair this with **corporate AI training** on [explainx.ai workshops](https://explainx.ai/workshops) so engineers know when **subscription quota** beats **project API keys**.\n\n### What to log before you switch billing paths\n\nIf 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**.\n\nDocument **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.\n\n## How Pi compares with other harness Google plan ports\n\nDifferent API pipes meeting through one adapter mirrors how Pi and forks share the Google AI plan quota pattern\n\nThe PR became a **template** the same week:\n\n- **fitchmultz/pi** merged a port of the provider.\n- **nanocode** commit messages describe**`--google-auth google-ai-plan`** waiting on**its own approved client** .\n- **Hermes Agent** and**Psi** issues reference upstream**12614** .\n\nThat 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.\n\nFor a wider harness map, see the [June Pi minimal harness primer](https://explainx.ai/blog/pi-minimal-agent-harness-mario-zechner-guide-2026) and [GLM Coding Plan harness guide](https://explainx.ai/blog/how-to-run-glm-5-2-coding-plan-agent-harnesses-2026) — different vendors, same question of **who owns the billing relationship**.\n\n## Bottom line\n\n**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.\n\nWatch **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](https://explainx.ai/blog/gemini-api-cli-gemini-api-command-google-agents-shell-image-video-deep-research-2026) remains the documented **API-key path** while plan auth rolls out.", "url": "https://wpnews.pro/news/pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota", "canonical_source": "https://explainx.ai/blog/pi-google-ai-plan-official-gemini-ultra-sign-in-november-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-11-28 00:00:00+00:00", "updated_at": "2026-11-28 09:11:52.448571+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["Pi", "Google", "David Brai", "earendil-works/pi", "Gemini Interactions API", "gemini-4-hydrogen", "Ziphyrien", "Earendil"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota", "markdown": "https://wpnews.pro/news/pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota.md", "text": "https://wpnews.pro/news/pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota.txt", "jsonld": "https://wpnews.pro/news/pi-coding-agent-gets-official-google-ai-plan-sign-in-for-gemini-quota.jsonld"}}