Keep Claude Code.
Switch your models.

NeoSwitch lets Claude Code run on Gemini 4 Neon. Your commands, permissions, tools, skills, MCP servers and hooks stay exactly as they are; a small local proxy translates requests for the model behind them.

claude
> /plugin marketplace add yldm-ai/neon-switch
> /plugin install neoswitch@neoswitch
> /neoswitch:login

Only the model changes

Claude Code still owns the session, permissions, tool execution and CLAUDE.md. NeoSwitch sits on loopback and speaks the Anthropic Messages API on one side and Gemini on the other.

client

Claude Code

Same CLI, slash commands, skills, MCP servers, hooks and /resume.

127.0.0.1

NeoSwitch proxy

Anthropic-compatible endpoint. Random access token, no prompt or credential logging, no remote relay.

upstream

Gemini 4 Neon

Through the official genai SDK, or the unmodified local agy acp process.

Why NeoSwitch

A model switch for people who already like how Claude Code works.

Keep your workflow

You still run Claude Code. Nothing to relearn, nothing to migrate.

Per project

Route one project to Gemini and leave the rest on Anthropic.

Local first

Loopback only. OAuth tokens stay inside agy; NeoSwitch never reads them.

Honest compatibility

What works, what is partial and what is missing is listed below. No silent fallback.

Get started

Requires Claude Code. Go is optional: with it the plugin builds its binary from source on first use, without it the plugin downloads the matching release binary and verifies its checksum. For Antigravity OAuth you also need the official agy CLI on your PATH.

Install the plugin

Inside Claude Code:

claude
> /plugin marketplace add yldm-ai/neon-switch
> /plugin install neoswitch@neoswitch

Sign in and enable routing

In the project that should use Neon. To use a Gemini API key instead, set it under /plugin → neoswitch → Gemini API key and run /neoswitch:on.

claude
> /neoswitch:login

Restart and check the route

Reopen Claude Code in that project. The session header may still show a Claude model label; the status command shows the real upstream.

claude
> /neoswitch:status
  NeoSwitch ... -> gemini-4-neon

Choose a credential path

Run neoswitch doctor on any path. It looks the model up, runs a one-line generation and names the failing step if something is wrong.

PathHow it signs inNotes
Antigravity OAuthGoogle account through the official agy CLIThe plugin's default flow. Read the warning below first.
Gemini Developer APIGEMINI_API_KEYAccess to Gemini 4 Neon depends on your key.
Vertex AIGoogle Cloud Application Default CredentialsAccess depends on your project and region.
Antigravity terms. The Google Antigravity Terms of Service (section 6) treat accessing Antigravity through third-party software as a breach, and Google may suspend or terminate the Antigravity and Gemini CLI accounts involved. Routing Claude Code through Antigravity OAuth falls under that rule. Use it only if you accept that risk for the account you sign in with; otherwise use a Gemini API key or Vertex AI.

Compatibility

How well Claude Code's features work depends on how well the model follows its tool protocol. This has been exercised in everyday coding use, not by an automated end-to-end suite.

CapabilityGemini API / Vertex AIAntigravity OAuth (ACP)
Streaming textSupportedSupported
Tool calls, incl. parallelNative Gemini function callingPartial: tool-call JSON arrives whole, not streamed
Multi-turn tools, /resumeSupportedSupported
ImagesSupportedWhen agy offers image input
PDFsSupportedNot supported
/effortNot applied yetMapped to agy's thought level
Token usage, count_tokensReported; estimated on the Developer APIReported, incl. ~14k tokens of agy instructions

Not supported on either path: server tools such as web search and code execution, URL image and document sources, and Claude thinking blocks. Full contract in docs/protocol-contract.md.

Plugin commands

Routing changes apply to new sessions; the current session keeps its connection.

/neoswitch:loginSign in with Antigravity OAuth and enable this project's route
/neoswitch:onEnable routing for this project
/neoswitch:statusShow the route and daemon state
/neoswitch:offDisable routing for this project

Prefer a standalone binary? Builds for macOS, Linux and Windows are on the Releases page, and neoswitch serve works with any Anthropic-compatible client.