Gemini 4 Neon in Coding Tools: Antigravity CLI, Grok Build (formerly Cursor), Cline, OpenCode and Claude Code Setup (Dec 2026)
As of 2026-12-02, gemini-4-neon runs natively in Google Antigravity and its agy CLI, works in Cline, Roo Code, Continue and OpenCode through Google's OpenAI-compatible layer, and reaches Claude Code only through a translation proxy such as LiteLLM. In Grok Build (formerly Cursor), selecting it depends on the Google BYOK provider listing the model, which was not verified on 2026-12-02. The model ID is gemini-4-neon, it accepts thinking levels LOW, MEDIUM, HIGH and XHIGH (default HIGH), and both thinking_budget and thinking_level="MINIMAL" return HTTP 400. It costs $3 per million input tokens and $15 per million output tokens on the paid tier, with a unified 1,048,576-token context; the setup errors that dominate are that 400 and User location is not supported for the API use.
QCode is an independent third-party API service, not affiliated with Google, Anthropic or OpenAI. Facts were checked on 2026-12-02 against the official Google pages linked below; items taken from developer reports are labelled as such.
Updated 2026-12-03
Key facts
gemini-4-neonbecame generally available on 18 November 2026. It is paid-tier only: Google's pricing page states Neon is not available on the free tier.- List price is $3.00 per million input tokens, $15.00 per million output tokens including thinking, and $0.15 per million cached input tokens (a 95% discount), per Google's developer pricing page checked on 2026-12-02.
- The context is a unified 1,048,576 tokens shared by input, thinking and output; a single synchronous request generates up to 65,536 output tokens by default.
- Neon supports
LOW,MEDIUM,HIGHandXHIGH, defaulting toHIGH; Hydrogen also has XHIGH, while Carbon and Argon stop at HIGH and default to MEDIUM. - Native surfaces are the Gemini API in AI Studio, Gemini for business, Android Studio and Antigravity on paid Pro and Ultra plans. Gemini CLI is different: its npm page (0.72.0, published 2 December 2026) says it is "Not optimized for Gemini 4+".
- Antigravity CLI takes a custom Gemini-compatible endpoint through
GOOGLE_GEMINI_BASE_URL; API-key mode ismodelProvider: "gemini"in~/.gemini/antigravity-cli/settings.jsonplus aGEMINI_API_KEY. - The API and AI Studio allowlist excludes mainland China, Hong Kong, Macau, Russia, Belarus and Iran; requests from there return HTTP 400 with
User location is not supported for the API use.
Model ID and thinking levels: the cheat sheet
Everything in a coding tool starts with one string, gemini-4-neon, and one number, the thinking level you allow it to spend. Get those right and most client setup is a base URL and a key.
| Field | Value as of 2026-12-02 |
|---|---|
| API model ID | gemini-4-neon |
| Access | Paid Gemini API; not on the free tier |
| Input / output per 1M tokens | $3.00 / $15.00 (output includes thinking) |
| Cached input per 1M tokens | $0.15 (95% off, implicit caching only) |
| Context window | 1,048,576 tokens, unified across input and output |
| Default synchronous output cap | 65,536 tokens |
| Thinking levels | LOW, MEDIUM, HIGH, XHIGH; default HIGH |
| Rejected parameters | thinking_budget, thinking_level="MINIMAL" (HTTP 400) |
Two things surprise people. Thinking tokens bill as output tokens, so XHIGH on a long agent run costs more than the input price suggests. And Google's Gemini 4 tables have no long-context surcharge tier: the input price is the same across the whole 1M window, unlike older Gemini models that split at 200K.
Caching is implicit only; explicit cachedContents is unsupported. The 95% rate applies when a request repeats a prefix, so two identical agent runs can cost different amounts.
Antigravity CLI: native Neon with your own API key
Antigravity is the Google surface built around agent loops, and the agy CLI is the version you can script on a dev box. Install it from Antigravity's official CLI install page, then choose how it authenticates: your paid Google AI Pro or Ultra plan, or an API key from Google AI Studio.
For API-key mode, put the provider setting in ~/.gemini/antigravity-cli/settings.json:
{
"modelProvider": "gemini"
}
Then export the key in the shell that starts the CLI:
export GEMINI_API_KEY="your-google-ai-studio-key"
agy
To point the CLI at a different Gemini-compatible endpoint, set the one environment variable Google documents for it:
export GOOGLE_GEMINI_BASE_URL="https://your-endpoint.example.com"
Leave GOOGLE_GEMINI_BASE_URL unset to use Google's own service. The install page describes it plainly: "To send model requests to a different Gemini-compatible endpoint, set the GOOGLE_GEMINI_BASE_URL environment variable."
Model and effort selection is passed at launch. Forum staff posted --model gemini-4-neon-xhigh and --effort xhigh in November 2026; treat that as a user-facing report and check agy --help, because CLI flags move between releases.
One number to keep separate: the API window is 1,048,576 tokens, but a Google developer forum post on 18 November 2026 cites up to 512K tokens inside Antigravity. A harness that truncates earlier looks like a model quality problem when it is not.
Cline, Roo Code, Continue and OpenCode: use the OpenAI-compatible provider
Apart from Grok Build, these editors can call Neon today, but the reliable route is Google's OpenAI-compatible layer, not a client's native Google provider. Setup guides published between 19 and 26 November 2026 report that the native Google provider in Cline and Roo Code returns a 404 for gemini-4-neon.
| Client | Provider to select | Values to enter |
|---|---|---|
| Grok Build (formerly Cursor) | BYOK lists a Google provider for chat models (Premium and above); whether gemini-4-neon is selectable there is not verified |
your Google AI Studio key |
| Cline | OpenAI Compatible | base URL, key, model ID |
| Roo Code | OpenAI Compatible | base URL, key, model ID |
| Continue | OpenAI-compatible model entry | base URL, key, model ID |
| OpenCode | its Google/Neon catalog entry, or a custom OpenAI-compatible provider | model gemini-4-neon |
Grok Build (formerly Cursor) is the exception. Its BYOK page lists Google for chat models only and documents no custom OpenAI-compatible base URL, and whether gemini-4-neon appears in its model list was not verified on 2026-12-02; check the picker.
The base URL used in those guides is:
https://generativelanguage.googleapis.com/v1beta/openai/
That path comes from Google's OpenAI compatibility guide as quoted in third-party setup guides; re-check it in Google's documentation before pasting it into a config, because compatibility paths change without a blog post.
A minimal client that proves the key, URL and model ID together:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_GEMINI_API_KEY",
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
)
resp = client.chat.completions.create(
model="gemini-4-neon",
messages=[{"role": "user", "content": "Reply with the word ready."}],
reasoning_effort="high",
)
print(resp.choices[0].message.content)
reasoning_effort is how OpenAI-shaped clients ask for a thinking level. A third-party guide dated 19 November 2026 describes the mapping, but it was not re-checked against Google's page, so send one request at low, one at high and one at xhigh before wiring it into an agent.
A 24 November 2026 report said OpenCode had added Neon as a default coding model, listing opencode/gemini-4-neon at $3 / $15 / $0.15. With your own Google key, use its OpenAI-compatible provider with the base URL above.
Claude Code: only through a translation proxy
Claude Code speaks the Anthropic Messages API, so it cannot call gemini-4-neon directly. The pattern that works is a local proxy that accepts Anthropic-shaped requests, translates them to Gemini, and returns Anthropic-shaped responses; LiteLLM is the one most guides use, with a Neon route documented on 1 December 2026.
Our LiteLLM proxy guide covers the setup: register a model such as gemini/gemini-4-neon with your Google key, start the proxy on port 4000, and point Claude Code at it.
export ANTHROPIC_BASE_URL=http://127.0.0.1:4000
export ANTHROPIC_AUTH_TOKEN=sk-litellm-local
claude
Two caveats before rebuilding a workflow around this. Claude Code's prompts, tool-call format and permission classifier are tuned for Claude models, so a translated Gemini backend behaves differently from the same model in a native harness. Developers discussing the setup in late November 2026 also reported that many keep Claude Code on Claude and run Neon in Antigravity instead. To keep that split, QCode serves Claude Opus 5.5 and Sonnet 5.5 on the Anthropic protocol with one cr_ key.
The errors people actually hit
Most failed Neon setups produce one of the messages below, each with a specific cause rather than a generic "model unavailable".
| Error / symptom | Cause | Fix |
|---|---|---|
HTTP 400 after sending thinking_budget |
Neon rejects thinking_budget; only thinking levels are accepted |
Remove the field and send thinking_level with LOW, MEDIUM, HIGH or XHIGH |
HTTP 400 after sending thinking_level="MINIMAL" |
MINIMAL is not a Gemini 4 level | Use LOW as the cheapest level |
FAILED_PRECONDITION: User location is not supported for the API use. (HTTP 400) |
The request's location is outside Google's API allowlist | Check the official regions page; there is no supported workaround |
| 404 or "model not found" in Cline or Roo | The native Google provider in that client does not know gemini-4-neon |
Switch the provider to OpenAI Compatible and use the base URL above |
| Cache appears not to help | Gemini 4 has implicit caching only; there is no explicit cache to create | Keep a stable prefix at the start of the prompt; verify spend in the billing console |
| Rate limit or "high demand" during peak hours | Capacity, not configuration | Retry later or fall back to gemini-4-hydrogen |
The location error deserves its own note. Google's available-regions page, fetched on 2026-12-02, covers 200-plus places and omits mainland China, Hong Kong, Macau, Russia, Belarus, Iran, North Korea, Cuba, Afghanistan and Myanmar; the 400 is the official signal that a request came from outside it. Developer reports in late November and early December 2026 also describe the same 400 appearing intermittently on ordinary US, Japanese and Singapore sessions in Antigravity, which needs a report to Google rather than a client setting. A 2 December 2026 developer report described Pro users being moved from Neon to Hydrogen under a "high demand" notice; that is a single user report, not a published scheduling rule.
Gemini CLI: not the tool for Neon
Gemini CLI is no longer the place to run Gemini 4 models as an individual developer. Its npm page for 0.72.0, published on 2 December 2026, states that free individual access and Google AI Pro/Ultra access moved to Antigravity CLI on 18 June 2026, and quotes "Not optimized for Gemini 4+: Not tuned for the Gemini 4 series (for example, Gemini 4 Argon)". A GitHub issue opened on 20 November 2026 was still asking for gemini-4-neon in the CLI's model list.
So the practical rule is: Antigravity CLI for a native agent loop, an OpenAI-compatible editor for chat and inline work, a proxy only when you need Claude Code's interface. Do not spend a day debugging Gemini CLI model IDs.
FAQ
Can I use Gemini 4 Neon in Claude Code?
Only through a translation proxy. Claude Code speaks the Anthropic Messages API, and gemini-4-neon is served by Google's Gemini API, so a proxy such as LiteLLM must translate both directions. It works for experimentation, but Claude Code's tool-call format and prompts are tuned for Claude models, so expect different behavior than Neon in Antigravity.
Does Gemini CLI support Gemini 4 Neon?
Not usefully, as of 2026-12-02. The npm page for @google/gemini-cli 0.72.0 says the CLI is not optimized for the Gemini 4 series, and a GitHub issue from 20 November 2026 was still requesting the model ID. Google moved individual and Google AI plan access to Antigravity CLI on 18 June 2026.
Why do I get "User location is not supported for the API use"?
Google's API and AI Studio allowlist does not include your request's location. The allowlist, fetched on 2026-12-02, omits mainland China, Hong Kong, Macau, Russia, Belarus, Iran, North Korea, Cuba, Afghanistan and Myanmar, and the HTTP 400 is the official signal. No supported client-side workaround exists.
Why does thinking_budget return HTTP 400 on Neon?
Because Gemini 4 replaced token budgets with thinking levels. Neon's model page states that setting thinking_budget, or thinking_level="MINIMAL", returns an HTTP 400. Use thinking_level with LOW, MEDIUM, HIGH or XHIGH instead, and remember that thinking tokens are billed as output.
Is Gemini 4 Neon on the free tier?
No. Google's pricing page states that Neon is not available on the free tier. Hydrogen is the Gemini 4 model with free-tier access; Neon, Carbon and Argon are paid only, so a free API key cannot reach Neon.
What is the Gemini 4 Neon context window?
1,048,576 tokens, unified across input, thinking and output, with up to 65,536 output tokens per synchronous request by default. The price does not change at 200K or any other threshold on Google's Gemini 4 tables. Antigravity's in-app window has been reported as lower.
Can I use Gemini 4 Neon in Grok Build (formerly Cursor)?
Grok Build's BYOK page (23 November 2026) lists Google among the providers, but for chat models only, and the key is routed through Grok Build's servers on every request. Third-party models need Premium or above. Whether gemini-4-neon appears in its model list was not verified on 2026-12-02 — check the picker, and see Cursor is now Grok Build for the 30 November rename.
Evaluate Neon without moving your Claude stack
Neon is worth a week of testing, but it does not have to replace the agent you trust. A common approach reported by developers in late November 2026 is Neon in Antigravity for exploration and Claude Code on Claude for the work that ships. QCode keeps the Claude side unchanged: one cr_ key covers Claude Opus 5.5 and Sonnet 5.5 on the Anthropic protocol at official API price ×1.0, and GPT models on the OpenAI protocol, with pay-as-you-go packs starting at $4. See /pricing for monthly plans.