DEV Community

Owen
Owen

Posted on • Originally published at ofox.ai

Gemini CLI Free Tier Shut Down: 6 Fixes That Work (2026)

TL;DR. On June 18, 2026, Gemini CLI stopped serving requests for the free "Sign in with Google" path, plus AI Pro and Ultra login. The binary is not dead: it is still Apache-2.0, still maintained (v0.49.0), and still runs on an API key. If you are staring at "This client is no longer supported for Gemini Code Assist for individuals," you have an auth problem, not a broken install. The fix is to stop logging in with a Google account and start using an API key with billing enabled. There is a second wall waiting in September 2026, when unrestricted Standard keys get retired, so set the key up correctly once instead of twice. Six fixes below, sorted from free-tier stopgap to production routing.

Google did not kill Gemini CLI on June 18. It killed the free login. The tool still runs; it just wants a key now instead of your Google account.

Is Your Gemini CLI Broken? The 30-Second Diagnosis

Three checks, in order. Most people who think the CLI is broken are one environment variable away from working.

Step What to check What it means
1 The error text "This client is no longer supported for Gemini Code Assist for individuals" means the free OAuth login is gone. "Quota exceeded … limit: 0" or 429 RESOURCE_EXHAUSTED means your key has no paid quota.
2 Which auth you use Run gemini and watch the startup. If it opens a browser to sign in with Google, you are on the retired consumer login. If it reads an env var, you are on API-key auth.
3 echo $GEMINI_API_KEY Empty output plus a browser login prompt confirms you never moved off the free tier. That is the whole problem.

If step 1 shows the "no longer supported" message, skip ahead to Fix 1. If it shows a 429 or limit: 0, you already have a key but no quota; go to Fix 3. Everything else in this guide is about doing the migration once so you do not hit the September key cutoff and have to redo it.

When to Fix in Place, and When to Switch Tools Instead

This is the decision that saves you an afternoon of poking at the wrong layer.

Fix Gemini CLI in place (Fixes 1 to 5) if

  • You have existing scripts, aliases, or CI that call gemini and you do not want to rewrite them.
  • You are fine paying per token and you want the same tool you already know.
  • You need Vertex AI or a Code Assist license path, both of which the June 18 change left untouched.

Switch to Antigravity CLI if

  • You were only ever on the free consumer login, you do not want to enable billing, and you want the path Google is actively steering consumers toward.
  • You want the newer async background agent workflow and do not care that it is a separate, closed-source binary.

Route through a gateway (Fix 6) if

  • You want one key across Gemini, GPT, Claude, and others without managing a Google Cloud project, billing tiers, and the September key migration.
  • You are building something user-facing where a single provider's policy change should never take you down again.

Stop rule. If you have re-run the Google login three times, cleared ~/.gemini, and reinstalled the CLI and still see "no longer supported," stop. Reinstalling cannot fix a server-side auth policy. The token exchange is being refused on purpose. Move to an API key and the loop ends.

What Actually Changed on June 18, 2026

Google announced this at I/O 2026 on May 19 and published it on the Developers Blog as "An important update: Transitioning Gemini CLI to Antigravity CLI." The operative sentence:

"On June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions will stop serving requests for Google AI Pro and Ultra, as well as those using it free of charge using Gemini Code Assist for individuals."

Read that carefully, because the popular "Gemini CLI is dead" framing gets it wrong. Three separate auth paths, three different outcomes:

Auth path Status after June 18, 2026 What to do
OAuth "Sign in with Google" free tier (Code Assist for individuals, AI Pro, Ultra) Shut down. Requests no longer served. Move to an API key, or move to Antigravity CLI.
Gemini API key from AI Studio Works. Free tier still exists for Flash models; paid tier fully supported. Set GEMINI_API_KEY, enable billing for real quota.
Paid Gemini / Vertex "Gemini Enterprise Agent Platform" key, or Code Assist Standard/Enterprise license Explicitly unchanged. Keep going. Nothing to do.

Google's announcement is blunt about the survivors: "Gemini CLI will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys," and enterprise license and Google Cloud access "remains unchanged." A follow-up repo notice, Discussion #28017, confirmed the individual-account cutoff went live as scheduled.

The binary itself is fine. The repo is not archived, the license is still Apache-2.0, and v0.49.0 shipped on June 25, a week after the shutdown. Google said it plainly: the project "remains available to the community as an Apache 2.0 licensed repository with no changes." So when someone tells you to abandon your Gemini CLI setup, they are conflating "the free login ended" with "the tool ended." Only the first one is true.

This did not come out of nowhere. Back on March 18, 2026, Google posted a service update (Discussion #22970), with restrictions effective March 25, that already limited free OAuth users to Flash-tier models and added "more robust detection for policy-violating use cases," while recommending people "use Gemini CLI with your own paid API key from AI Studio or Vertex AI." June 18 was the hard cutoff that the March update foreshadowed.

Understanding the Errors: What Each One Means

Four error signatures cover almost every report. Match yours to the row and you know which fix applies.

Error you see Real cause Fix
This client is no longer supported for Gemini Code Assist for individuals. To continue using Gemini, please migrate to the Antigravity suite of products. You are on the retired free OAuth login. Browser step succeeds, token exchange is refused. Fix 1 (switch to API key)
You must be a named user on your organization's Gemini Code Assist Standard edition subscription ... (403) Personal account hitting an org-only entitlement gate. An earlier variant of the same lockout (issue #14934). Fix 1 or Fix 5 (license/Vertex)
Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0 and TerminalQuotaError: You have exhausted your daily quota on this model. Key is on Free Tier with zeroed quota; no paid provisioning behind it (issue #22486). Fix 3 (enable billing)
429: rate limit exceeded with limit: 0 on a paid subscriber A Google One AI Pro subscription does not auto-provision paid API quota to your key (issue #24396). Fix 3 (enable billing, set a real cap)

The pattern worth internalizing: a login error points at the auth method, a limit: 0 error points at billing. They feel similar in the terminal and need completely different fixes. Do not enable billing to solve a login error, and do not re-login to solve a quota error.

How to Keep Gemini CLI Running (Fixes for Every Tier)

Sorted from "free, works in five minutes" to "production routing." Apply the tier that matches you.

Free / Individual Tier

Fix 1: Switch from Google login to an AI Studio API key

This is the core move and it resolves the "no longer supported" message directly. Create a key at aistudio.google.com/apikey, then:

export GEMINI_API_KEY="your_ai_studio_key"
gemini "say hi"
Enter fullscreen mode Exit fullscreen mode

A working response means you are back in business. If you want to confirm the CLI is actually on the key and not silently falling back to a cached login, check the auth line at startup or print the variable first:

echo "${GEMINI_API_KEY:0:6}..."   # should show the first chars of your key, not empty
Enter fullscreen mode Exit fullscreen mode

If you would rather pick from a menu, run /auth inside the CLI and choose the Gemini API key option instead of "Login with Google." The setting is saved in ~/.gemini/settings.json so you only do it once. One caveat on precedence: the client libraries accept both GEMINI_API_KEY and GOOGLE_API_KEY, and if both are set, GOOGLE_API_KEY wins. If your key looks correct but behaves oddly, check for a stray GOOGLE_API_KEY in your shell profile left over from an old Vertex experiment.

A free key still exists for the Flash and Flash-Lite families, so Fix 1 alone gets a lot of people running again. It is best-effort, though, which is the next fix.

Fix 2: Reset a broken auth state before you blame the key

If you switched keys but the CLI still tries to log in with Google, the old selectedAuthType is cached. Clear it:

# Back up first, then reset the CLI's saved auth choice
mv ~/.gemini/settings.json ~/.gemini/settings.json.bak
gemini   # will prompt /auth again; pick the API key option
Enter fullscreen mode Exit fullscreen mode

This is also the fix for "Please set an Auth method" and for the case in issue #2111 where the CLI refuses to switch auth types while an API key is set. A stale settings file causes more "it still does not work" reports than any actual key problem.

Paid / Team Tier

Fix 3: Enable billing to escape the 429 limit: 0 trap

This is the fix for every "I added a key and still get 429" report. A raw AI Studio key sits on the Free Tier, and a Google One AI Pro subscription does not push paid quota into it. The metric comes back limit: 0, which reads like a bug but is just an unprovisioned key.

Do this once:

  1. Open AI Studio billing and link a Google Cloud Billing account to the project behind your key.
  2. Set a real spend cap. A $0 cap keeps you on Free Tier and reproduces the 429; set something you are comfortable with (even $10 is enough to move to paid Tier 1).
  3. Refresh the CLI auth: clear the cache from Fix 2 or re-export the key, then retry.

Google's tiers escalate with spend: Free, then Tier 1 (billing enabled), then Tier 2 and Tier 3 at higher paid thresholds, each raising your rate limits. Tier 1 alone carries a per-window spend allowance (on the order of $10 per 10 minutes) that is plenty for individual use.

Fix 4: Right-size the model so the paid bill stays small

You are paying per token now, so pick the model deliberately. Current standard pricing on the Gemini API, per 1M tokens (verified on the official pricing page, 2026-07-07):

Model Input / 1M Output / 1M Notes
Gemini 3.1 Flash-Lite $0.25 $1.50 Cheapest; fine for routine edits and shell tasks
Gemini 3.5 Flash $1.50 $9.00 Balanced default for coding
Gemini 3.1 Pro Preview $2.00 (prompts up to 200k) $12.00 Reserve for hard reasoning; price steps up above 200k

For most terminal work, Flash-Lite is the right default and keeps a heavy day under a dollar. Move up to Flash for real coding and only reach for Pro on the genuinely hard prompts. If you want the deeper pricing and performance breakdown, see the Gemini 3.1 Pro API pricing guide. Model names on Google's side move fast, so re-check the exact IDs at the pricing page before you hard-code them into scripts.

Enterprise / Production Tier

Fix 5: Use Vertex AI or a Code Assist license

Both of these paths were untouched by June 18, which makes them the cleanest option if you already have a Google Cloud footprint. For Vertex AI:

export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
gemini
Enter fullscreen mode Exit fullscreen mode

Vertex uses your Cloud project's billing and IAM, so quota and access are governed by the project, not by a personal account Google can reclassify. If your organization holds a Gemini Code Assist Standard or Enterprise license, the CLI and IDE extensions keep working with no change at all; that is stated directly in Google's announcement. For teams, this is usually the least fragile answer.

Fix 6: Route through one gateway and stop caring about Google's tiers

If you would rather not manage a Cloud project, a billing tier, and the September key migration, point Gemini CLI at a gateway that speaks the Gemini protocol. Through ofox.ai, the same CLI uses one key, no Google Cloud account, and gets failover and routing on top:

{
  "apiKey": "<your OFOX_API_KEY>",
  "baseUrl": "https://api.ofox.ai/gemini"
}
Enter fullscreen mode Exit fullscreen mode

Or as an environment variable, the same shape as before:

export GEMINI_API_KEY="<your OFOX_API_KEY>"
Enter fullscreen mode Exit fullscreen mode

That one key also reaches GPT, Claude, Qwen, DeepSeek, and the rest of the model marketplace through the same account, so the next time a single vendor changes its consumer policy, your CLI does not go down with it. This is the same routing idea covered in the multi-model router walkthrough, applied to Gemini CLI specifically.

The Second Wall: API Key Deadlines You Have Not Hit Yet

Fixing the login is not the end of the story, and this is the part most "just add a key" guides skip. Google is retiring old-style API keys on a separate schedule:

Date What happens
June 19, 2026 The Gemini API begins rejecting unrestricted Standard keys. Standard keys with explicit API restrictions keep working.
September 2026 The Gemini API rejects all Standard keys. You must be on auth keys, which are bound to a Cloud service account.

The practical consequence: if you dig up an old unrestricted key from 2025 to fix your login today, you may hit a wall again in September. Create a new key now, since new keys are issued as auth keys by default, or apply explicit API restrictions to the key you use. Doing the migration once, correctly, is the difference between one bad afternoon and two.

Timeline: How the Gemini CLI Free Tier Wound Down

The shutdown was gradual, and seeing the sequence explains why your setup broke when it did.

Date Event
March 18, 2026 Service update posted (restrictions effective March 25): limits free OAuth users to Flash-tier models, adds abuse detection, recommends paid API keys (Discussion #22970).
May 19, 2026 I/O 2026 announcement: Gemini CLI consumer/Pro/Ultra login transitioning to Antigravity CLI (Developers Blog + Discussion #27274).
June 18, 2026 Free, AI Pro, and Ultra logins stop serving requests. "No longer supported" errors begin.
June 19, 2026 Unrestricted Standard API keys start getting rejected (separate key-security change).
June 25, 2026 Gemini CLI v0.49.0 ships, confirming the binary is still maintained.
September 2026 Planned cutoff for all Standard keys; auth keys required.

If your CLI broke around mid-June, this is why. And if it is still working on an old key, the September row is the one to watch.

Why Google Ended the Free Login

You do not need the backstory to fix your terminal, but it explains why this is not a temporary outage you can wait out. Three forces line up.

First, cost. A free OAuth login handed real model inference to anyone with a Google account, and coding agents are token-hungry: a single long session can burn through more tokens than a month of chat. The March 18 service update said the quiet part out loud when it added "more robust detection for policy-violating use cases (e.g. using Gemini CLI OAuth with third-party software)." People were wiring the free login into scripts and wrappers it was never meant to power, and the free tier was subsidizing that at Google's expense.

Second, product consolidation. At I/O 2026 Google pulled its developer tooling under the Antigravity brand. Antigravity CLI, the desktop app, and the IDE story now share one architecture. The open-source Gemini CLI does not fit that funnel cleanly, so the consumer login got routed to the product Google actually wants to grow, while the CLI was left as the API-key and enterprise tool it started as.

Third, abuse economics. Free credentials attached to a personal account are the easiest thing in the world to farm. Moving individuals onto keys with billing (or onto Antigravity's managed login) gives Google a caller identity for every request, which is the same reason the separate September Standard-key retirement exists.

The takeaway for your setup: this is structural, not a blip. Plan for API-key auth as the permanent state, not a workaround until the free tier comes back. It is not coming back.

When the Free Login Is Gone: Alternatives That Work Now

If moving to a paid Google key is not what you want, here are the realistic options, ranked by how little ongoing management they need.

  1. ofox.ai. One key that speaks the Gemini protocol (https://api.ofox.ai/gemini) and also reaches GPT, Claude, Qwen, DeepSeek, and 100+ more through one OpenAI-compatible endpoint. No Google Cloud project, no billing-tier maze, no September key migration, and failover across providers if one vendor degrades. Best if you want the Gemini CLI workflow without being tied to one vendor's consumer policy. Setup is the same JSON file or env var you would use for Google's own key, so switching costs you a single line.

  2. Antigravity CLI. Google's official destination for consumer and Pro/Ultra logins. It is a closed-source Go binary with async background agents and a shared architecture with the Antigravity 2.0 desktop app. Best if you specifically want the free or Pro consumer path Google is now backing and you do not mind switching tools. Worth noting it is a different product, not a drop-in replacement: your existing gemini scripts and aliases will not carry over unchanged.

  3. Vertex AI (Gemini). Same models, governed by your Cloud project's billing and IAM instead of a personal account Google can reclassify. Best if you already run on Google Cloud and want enterprise controls. Higher setup cost (project, service account, roles), but the most durable of the lot because nothing about it depends on the consumer login tier.

  4. OpenRouter or similar gateways. Another multi-provider option. Slower per request than a dedicated gateway and the markup stacks up, but worth knowing as a comparison point. See the honest OpenRouter review for where the hidden cost lands.

For the broader picture of running several assistants without a per-tool billing headache, the multi-CLI setup guide covers managing Gemini CLI alongside Codex and Claude Code, and the cost-reduction playbook covers keeping the paid bill down once you are off the free tier.

How to Monitor Your Gemini CLI Auth and Quota

Three things to watch so the next change does not surprise you.

Your live rate limits. Google no longer prints exact free-tier requests-per-minute and per-day numbers in the docs; it moved them to the live AI Studio rate-limit dashboard. Check there, not a blog table, for what your key actually allows today.

Your spend cap. If you enabled billing, watch the cap. A cap set too low silently drops you back into limit: 0 territory and looks exactly like the original bug.

Your key type. Before September, confirm your key is an auth key or a restricted Standard key. An unrestricted Standard key is a scheduled outage waiting for a date.

The full Gemini CLI configuration guide covers the settings-file and endpoint options in more depth if you want the complete setup reference rather than just the recovery path.

A login error points at your auth method. A limit: 0 error points at your billing. They look the same in the terminal and need opposite fixes.

FAQ

Is Gemini CLI dead after June 18, 2026? No. The open-source binary is still Apache-2.0, still shipping (v0.49.0 landed June 25), and still runs. What ended is the free consumer login: the "Sign in with Google" path for Code Assist for individuals, plus AI Pro and Ultra sign-in. Google's own words are that the CLI "will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys." Set a key and the same tool keeps working.

Why does it say "This client is no longer supported for Gemini Code Assist for individuals"? You are logging in with the retired free personal-account flow. The browser step reports success, but the token exchange is refused server-side, which is why reinstalling never helps. Switch auth from Google login to an API key.

How do I switch from Google login to an API key? Create a key at aistudio.google.com/apikey with billing enabled, then export GEMINI_API_KEY=your_key and run gemini. For a menu, run /auth in the CLI and choose the API key option. If both GEMINI_API_KEY and GOOGLE_API_KEY are set, GOOGLE_API_KEY wins.

Why do I still get 429 "limit: 0" after adding a key? Your key is on the Free Tier with no paid quota behind it, and a Google One AI Pro subscription does not auto-provision that quota. Enable billing in AI Studio, link a Cloud Billing account, and set a real spend cap (not $0). That moves the key to paid Tier 1.

Will my key stop working in September 2026? It can, if it is an unrestricted Standard key. Google began rejecting unrestricted Standard keys on June 19, 2026, and plans to reject all Standard keys in September in favor of auth keys bound to a Cloud service account. Create a new key now or apply explicit restrictions to your existing one.

Can I keep any free tier for Gemini CLI? There is still a free tier on the AI Studio key for the Flash and Flash-Lite families, separate from the killed login. Exact per-model rate limits are no longer published in the docs; they live in the AI Studio dashboard. Treat free-key quota as best-effort and enable billing if you need reliability.

What is the difference between Gemini CLI and Antigravity CLI? Gemini CLI is the existing open-source Node tool you install with npm and drive with an API key. Antigravity CLI is a new closed-source Go binary that Google made the destination for consumer and Pro/Ultra logins. Keep Gemini CLI if you want your existing scripts and setup; move to Antigravity if you only ever used the free login and want Google's managed consumer path.

Does enterprise access still work? Yes. Organizations on a Gemini Code Assist Standard or Enterprise license, or using Google Cloud, keep access unchanged, and Vertex AI with GOOGLE_GENAI_USE_VERTEXAI keeps working. June 18 targeted individual consumer login only.

Sources Checked for This Refresh


Originally published on ofox.ai/blog.

Top comments (0)