gemini-claude-bridge banner
weijiafu14 weijiafu14

gemini-claude-bridge

Development community intermediate

Description

Production-grade **Gemini ↔ Anthropic Claude** protocol converter.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

gemini-claude-bridge

Production-grade **Gemini ↔ Anthropic Claude** protocol converter.

Two ways to use it:

  1. Claude Code Proxy — drop-in replacement, ANTHROPIC_BASE_URL=http://localhost:8082 claude
  2. Python Librarypip install gemini-claude-bridge, convert requests/responses in your own app

Why this exists

LiteLLM has 3 open bugs in Gemini↔Claude conversion that break real-world tool calling:

Problem LiteLLM Issue This library
Multi-turn tool calling + thinking crashes #17949 (3+ months) thoughtSignature file persistence + missing-signature recovery
tool_result images silently dropped #23712 Image separation + functionResponse.parts nesting
No streaming tool arguments #22206 partialArgs state machine + incremental JSON delta

Usage 1: Claude Code Proxy

Quick start

pip install "gemini-claude-bridge[proxy]"

# Start proxy (default port 8082)
GEMINI_API_KEY=your-key python -m examples.proxy_server

# In another terminal — use Claude Code with Gemini backend
ANTHROPIC_BASE_URL=http://localhost:8082 ANTHROPIC_API_KEY=dummy claude

Docker

# .env file
GEMINI_API_KEY=your-key
BIG_MODEL=gemini-2.5-pro
SMALL_MODEL=gemini-2.5-flash

docker compose up -d

ANTHROPIC_BASE_URL=http://localhost:8082 claude

Configuration

Env var Default Description
GEMINI_API_KEY (required) Google AI Studio API key
GEMINI_API_BASE_URL https://generativelanguage.googleapis.com Gemini API base URL (for custom endpoints / Vertex)
BIG_MODEL gemini-2.5-flash Model for opus/sonnet requests
SMALL_MODEL gemini-2.5-flash Model for haiku requests

...