Antigravity Claude Code Proxy banner
v2.11.0 Conformance suite, resilience, hardening, metrics and Docker

Run Claude Code on 20+ models.

A local proxy at localhost:8080 that speaks the Anthropic Messages API, so Claude Code can use Gemini, GPT, Grok, Claude, Kimi and Perplexity search models, with managed sessions, automatic failover, a live dashboard and a status bar in your IDE.

How it works

Claude Code sends Anthropic Messages requests to the proxy. The proxy validates them, picks a model and a signed-in account, translates the request for the upstream and streams the reply back as Anthropic server-sent events. Transient upstream failures are retried with backoff before the first event reaches the client; after that, the stream is never replayed.

Step through the same path, with links to the code behind each step, in the interactive streaming-request diagram.

Features

Multi-provider

Gemini, GPT, Grok, Claude, Kimi and more through one Anthropic-compatible endpoint.

Session failover

Keeps requests on a stable signed-in session and moves to another when one is unavailable.

Live dashboard

Accounts, usage and one-click model switching at localhost:8080/dashboard.

IDE status bar

Current model and quotas with reset times, right in VS Code or Antigravity.

Agentic fallback

Chat-only models switch to an agentic model automatically when tools are needed.

Runs anywhere

Node.js 22.13+ or a non-root Docker image with a healthcheck, probes and Prometheus metrics.

What v2.11.0 verifies

Every claim below is checked in CI on Node 22 and 24 against a scripted mock upstream with synthetic fixtures. No provider accounts, keys or network access are involved, so these checks show protocol behaviour, not live model access.

AreaWhat is checkedEvidence
Anthropic conformanceRequest and response mapping, SSE event order, tool_use and tool_result round-trips, system prompts, stop reasons, usage fields, thinking models37 JSON fixtures
Error mapping400, 401, 403, 404, 413, 429, 502, 504 and 529 as Anthropic error types, with retry-after when the reset is known, including on streaming requestserror-mapper.js
ResilienceExponential backoff with jitter, Retry-After, bounded timeouts, no replay of a started stream, cancellation on client disconnect, account cooldown and rotation, graceful shutdown that drains streamsunit and integration tests
HardeningRequest validation, body size limit, routing-header allow-list, credentials never forwarded upstream, secrets redacted from logs, security headers, rate limiting, linear-time parsing of prompt texthardening tests
Quality gates222 offline tests, coverage gate of 80% for lines, statements, functions and branches, tsc --noEmit, ESLint, Prettier, CodeQL with zero open alerts, gitleaks, npm auditCI runs

Showcase

Dashboard showing session health and usage
Dashboard: session health and usage
Quota popup with reset times
Quotas with reset times
One-click model switcher
One-click model switching

Quick start

With Node.js 22.13+

git clone https://github.com/muhib-karim/Antigravity-Claude-Code-Proxy.git
cd Antigravity-Claude-Code-Proxy/Antigravity-Claude-Code-Proxy
npm install
export GOOGLE_OAUTH_CLIENT_SECRET="<your OAuth client secret>"
npm run accounts:add          # Google sign-in in your browser
npm start                     # proxy on http://localhost:8080

With Docker

docker build -t antigravity-claude-code-proxy \
  Antigravity-Claude-Code-Proxy
docker run --rm -p 127.0.0.1:8080:8080 \
  -v agp-data:/data antigravity-claude-code-proxy
# accounts live in the volume at /data/accounts.json

Point Claude Code at it

export ANTHROPIC_BASE_URL="http://localhost:8080"
export ANTHROPIC_API_KEY="antigravity-proxy"
claude                        # Claude Code now goes through the proxy

Operations

GET /livez

The process is up. Stays 200 while a shutdown drains.

GET /readyz

At least one account can serve requests; 503 otherwise or while draining.

GET /metrics

Prometheus text: requests, latency, upstream retries and account states.

Docs

Quick start

The shortest path to a working setup.

Step-by-step setup

Every step, with checks along the way.

Multiple accounts

Add more Google AI accounts for failover.

Security

How credentials are stored and what never leaves your machine.

Changelog

What changed in each release.

API reference

Endpoints the proxy exposes.