Your developers work in Claude Code. Your company wants them to try Google's Gemini 4 Argon on real repository work. A natural first try is CLAUDE_CODE_USE_VERTEX=1. It fails. One developer reported it in Claude Code issue #6653: "Trying to use vertex AI's gemini-pro-2.5 with claude code and I'm seeing a 400 error from GCP: 'Gemini cannot be accessed through Vertex Predict/RawPredict API.'"
To run Claude Code on Gemini 4 Argon, a gateway has to sit in the middle. It must accept Anthropic's Messages API from Claude Code and translate every request and stream to Google's Gemini API. That translation is easy to demo on one chat turn. It is harder to keep working across tool schemas, thought signatures, streaming events and context windows.
Why CLAUDE_CODE_USE_VERTEX=1 does not run Gemini
Claude Code has built-in support for Google Cloud, documented under Claude Code on Google Cloud's Agent Platform (formerly Vertex AI). That integration is for Anthropic's own models in the Vertex AI Model Garden. The setup guide asks you to "request access to the Claude models you want in the Google Cloud's Agent Platform Model Garden." In Claude Code issue #6653, an Anthropic team member replied: "currently, using Claude Code with non-Anthropic models is unsupported."
To call a non-Claude model, you point Claude Code at a gateway with ANTHROPIC_BASE_URL. Anthropic documents this path in Other LLM gateways and sets a limit: "Anthropic doesn't endorse, maintain, or audit third-party gateway products, and doesn't support routing Claude Code to non-Claude models through any gateway."
The same page explains what you take on when you run a translating gateway yourself: "The tradeoff is that the gateway becomes infrastructure your organization operates. Claude Code adds capabilities with each release, and a gateway that doesn't forward them breaks the corresponding features, so the gateway product needs to be kept updated as Claude Code evolves."
What actually breaks between Claude Code and a Gemini model
When you point ANTHROPIC_BASE_URL at a gateway, Claude Code does not know that Gemini is on the other side. As Anthropic's gateway compatibility guide puts it: "When the client speaks the Anthropic Messages format, Claude Code sends the full set" and "treats the gateway as the Claude API and can't tell which upstream you forward to."
Five things must work when a proxy translates those requests to Gemini:
Unrecognized model IDs and request fields. For any model ID Claude Code does not recognize as a Claude model, the gateway compatibility guide notes that on the Anthropic Messages format it sends "Everything current Claude models accept on the Claude API, including adaptive reasoning, effort, and context management, which an Amazon Bedrock or Agent Platform upstream can reject." A translating gateway must map these fields for Gemini or drop them. For some rejections (the
thinkingtype,effortorcontext_management), Claude Code retries on its own, but only when the gateway passes the upstream error body on unchanged. The guide warns: "A gateway that wraps upstream errors in its own envelope breaks the recovery path."Tool calls and tool results. Claude Code runs an agent loop. It sends its tool definitions (
Bash,Read,Editand MCP tools) in Anthropic'sinput_schemaformat. It expectstool_useblocks back. Then it runs the tool and returns atool_result. If the gateway drops an argument or changes the stop reason after a tool result, the loop stops mid-task.Streaming event order and idle watchdogs. According to the gateway compatibility guide, "Claude Code expects each response's full event sequence, in order, through the final
message_deltaandmessage_stopevents. If the body ends cleanly after a content block has started but before that finalmessage_delta, Claude Code treats the response as a dropped connection." During a long reasoning pause, the guide adds, "Claude Code aborts a streaming response once no bytes reach it for longer than its streaming idle timeout."Long prompts and the context window. For a model ID it does not recognize, "Claude Code assumes a 1M token context window by default since v2.1.323," and it compacts the conversation before it reaches that size. Gemini 4 Argon accepts 1,048,576 tokens, so the default fits. For a model with a smaller window, set
CLAUDE_CODE_MAX_CONTEXT_TOKENSto the real size (Correct the window for a gateway or custom model ID). If the model still refuses a prompt as too long, Claude Code can compact and retry only when the gateway passes on an error that Claude Code recognizes.Gemini tool schemas and thought signatures. Two parts of the translation belong to Gemini only. First, tool schemas. Claude Code sends JSON Schema in
input_schema, but Gemini function calling supports "Only a subset of the OpenAPI schema" (Gemini function calling). The gateway must convert each of Claude Code's tool schemas to that subset. Second, thought signatures. Gemini returns encrypted thought signatures, and Google says they "are required to maintain reasoning continuity across multi-turn interactions" (Gemini thinking). The gateway must keep each signature with Claude Code's thinking blocks and send it back to Gemini on the next turn.
The options you have today
Option | Where it wins | What it costs you |
|---|---|---|
Use Google's Antigravity CLI ( | Google's own coding terminal for Gemini 4 Argon. No translation layer. | Each developer needs a Google AI Pro or Ultra plan, or an eligible Gemini Enterprise subscription. Developers work in two tools and keep two setups. |
Move the team to an open multi-provider harness such as OpenCode | One open-source CLI that talks to Anthropic, Google, OpenAI and local endpoints directly. | Developers leave Claude Code. You still have to set up shared keys, per-person budgets and call logs yourself. |
Run your own LiteLLM proxy behind | Full control. Open-source LiteLLM supports Claude Code model discovery over | You own the proxy config, the parameter translation, and regression testing on every Claude Code update. |
Point Claude Code at OpenRouter | One | OpenRouter's Claude Code guide says: "Claude Code with OpenRouter is only guaranteed to work with the Anthropic first-party provider." |
Use a gateway that translates and pre-tests each harness and model pair | Developers stay in Claude Code. Only pairs that pass automated harness checks are offered, and keys, budgets and logs live in one place. | You get only the pairs that pass the gateway's checks. A model that fails a check is held back until the translation or endpoint is fixed. |
If your team only runs Gemini for a few standalone tasks, Google's Antigravity CLI next to Claude Code is the fastest path. Do not use Gemini CLI for this: Google says it is "Not tuned for the Gemini 4 series". If you already operate LiteLLM for your engineering team, its non-Anthropic tutorial documents the ANTHROPIC_BASE_URL and CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 setup: "On startup, Claude Code will call GET /v1/models against your ANTHROPIC_BASE_URL (your LiteLLM proxy) and add each returned model to the /model picker, labeled From gateway." Once your engineering team depends on the pair every day, somebody has to test every model against every Claude Code release before it reaches the picker.
Four checks to run before you roll out a Gemini model on Claude Code
Whether you run your own proxy or a managed gateway, test a non-Claude model against real Claude Code requests before you list it for your team:
Plain answer (
chat): sends a Claude Code request with its system prompt layout and thinking settings, and returns a clean assistant turn.Tool call (
tool): sends Claude Code's tool definitions, receives a validtool_usecall, returns the tool output, and confirms the model continues the turn.Streaming (
stream): streams the reply in Anthropic's server-sent event sequence throughmessage_deltaandmessage_stopwithout tripping the idle watchdog.Long prompt (
long): handles a multi-turn conversation and, when the prompt is too long, returns the refusal in the wording Claude Code recognizes, so Claude Code can compact and retry.
How it works in xpander
The xpander AI Gateway sits between your coding harnesses (Claude Code, Codex and OpenCode) and your model providers. It translates Anthropic's Messages API to the provider's API, adapts thinking, effort and system-prompt fields per model family, and records every call under the person who made it.
xpander runs an automated harness matrix (chat, tool, stream and long) against catalog models across providers. In xpander Chat, the Claude Code and Codex pickers list a model from another vendor only when all four checks pass. Gemini 4 Argon is offered on Claude Code, Codex and OpenCode through Google (google_ai_studio::gemini-4-argon) since November 1, 2026, and Gemini 4 Carbon, Gemini 4 Hydrogen and Gemini 4 Neon joined the Google list on November 21, 2026. For Codex and other models, see How to run Claude Code or Codex on a model your company approved.

Diagram. Claude Code uses a personal xpander key or session token. The xpander AI Gateway holds your Google or OpenRouter key in the organization vault, translates the call to Gemini 4 Argon, and writes the log record.
1. Turn on Google Gemini (or OpenRouter). In Platform > AI governance > Models, connect Google Gemini with your own key (Enterprise plan) or use xpander's built-in provider on xpander cloud. Tick Gemini 4 Argon. Then use Who may use it… to choose the groups that may use it.
2. Pick Gemini 4 Argon in Claude Code. In any agent conversation in xpander Chat, open the Harness and model picker in the composer. Keep Claude Code selected on the left rail, choose Google, and click Gemini 4 Argon. You can switch models in a conversation. The new model answers from the next turn and gets the conversation history.

The composer's Harness and model picker: Claude Code on the left rail, Google as the provider (10 models, including the Gemini 4 series), and Gemini 4 Argon selected.
3. Or run it from Claude Code on your laptop. In xpander Chat, open Settings > AI models & keys, choose Claude Code, pick your OS, and select Copy. Copy creates a key for that client and computer. Run the copied command in your terminal. The command writes these lines to ~/.claude/settings.json (%USERPROFILE%\.claude\settings.json on Windows):
Then start Claude Code, run /model, and pick Gemini 4 Argon.
4. See every call in Logs. In Platform > AI governance > Logs, each request shows the person, Claude Code as the source, Gemini 4 Argon as the model, token counts, estimated cost and status. No developer laptop or agent container ever holds the Google API key.

AI governance > Logs: every call records the person, the harness (Claude Code), the model (Gemini 4 Argon), tokens, cost and status.
Other models tested on Claude Code today. On Google: gemini-4-neon, gemini-4-hydrogen, gemini-4-carbon, gemini-3.8-flash, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-flash-lite and gemini-3-flash-preview. From other providers: OpenAI (such as gpt-6-astra and gpt-5-mini), Amazon Bedrock, Z.ai (glm-5.2 and glm-5.3), Nebius, Cerebras and OpenRouter.
What this does not cover
Image inputs are not part of the automated harness check. xpander's four-check harness test verifies plain answers, tool calls, streaming and long prompts (
chat,tool,streamandlong). It does not run an automated image check.Personal Claude subscriptions cover only Claude models. If a developer connects a personal Claude Pro or Max plan in xpander, that plan serves only Claude models from Anthropic. Switching Claude Code to Gemini 4 Argon routes the turn through your organization's Google or OpenRouter provider and counts against organization budgets.
Frequently asked questions
Does picking Gemini 4 Argon change the agent's default model for everyone?
No. On Claude Code and Codex, a model from another vendor never becomes the agent's default. Your pick stays in your own settings for this agent. Your new conversations on that harness start on Gemini 4 Argon, and everyone else keeps the agent's default. If you can edit the agent, a model from the harness's own vendor (Anthropic or Claude on Bedrock for Claude Code, OpenAI for Codex) or from your own custom provider becomes the agent's default for that harness. On OpenCode, a model from any provider can become the default (Create and customize an agent).
What about Gemini 4 Carbon, Hydrogen and Neon?
All three pass the same four checks and are offered on Claude Code, Codex and OpenCode through Google (gemini-4-carbon, gemini-4-hydrogen and gemini-4-neon) since November 21, 2026. Pick them the same way in the Harness and model picker under Google, or through /model on a laptop once an admin enables them in Platform > AI governance > Models.
How do we test a model on our own endpoint before offering it in Claude Code?
In Platform > AI governance > Models, open your connected provider, click the model's menu, and choose Test model. On the Agent checks tab, select Claude Code and click Run checks. A check marked Fixed means the gateway now adjusts that request for the model. The gateway saves the fix to the model's request settings as Learned by Test model. When the result reads Ready for Claude Code, the model appears in the Claude Code picker (Model testing docs).
Can we lock developer laptops so Claude Code only calls our gateway?
Yes. Distribute a Claude Code managed settings file that sets ANTHROPIC_BASE_URL to your xpander AI Gateway address and sets allowedProviders to ["customEndpoint"] (requires Claude Code v2.1.285 or later). Claude Code then refuses sessions pointed at any other endpoint.



