https://github.com/sydasif/litellm-proxy
Claude, Opencode and Zed Proxy to use Gemma 4 models via Gemini API
https://github.com/sydasif/litellm-proxy
claude claude-code gemini-api gemma4 litellm opencode opencode-ai zed zed-editor
Last synced: 12 days ago
JSON representation
Claude, Opencode and Zed Proxy to use Gemma 4 models via Gemini API
- Host: GitHub
- URL: https://github.com/sydasif/litellm-proxy
- Owner: sydasif
- Created: 2026-04-28T17:27:28.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-06T15:39:02.000Z (15 days ago)
- Last Synced: 2026-06-06T17:20:07.822Z (15 days ago)
- Topics: claude, claude-code, gemini-api, gemma4, litellm, opencode, opencode-ai, zed, zed-editor
- Homepage:
- Size: 24 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# AI Proxy Gateway
[](https://github.com/BerriAI/litellm)
[](https://claude.com/product/claude-code)
[](https://deepmind.google/technologies/gemini/)
[](https://opencode.ai)
[](https://open.bigmodel.dev/)
[](https://www.docker.com/)
A proxy gateway that routes Claude Code through LiteLLM to multiple backends — Gemini, OpenCode Zen, and Zhipu AI.
---
## Features
- **Docker Native**: Official images, no build step.
- **Secure**: Environment-based API key management.
- **Flexible**: Single-proxy deployment for Claude Code.
---
## Project Structure
```
litellm-proxy/
├── docker-compose.yml
├── .env # API keys
├── .gitignore
├── AGENTS.md
├── README.md
└── litellm/
└── config.yaml # Model mappings
```
---
## Prerequisites
- [Docker Desktop](https://docs.docker.com/get-docker/) or Docker Engine
- [Docker Compose](https://docs.docker.com/compose/install/)
- API keys for the backends you plan to use (see `.env.example` for required keys)
---
## Quick Start
### 1. Configure Environment
```bash
cp .env.example .env
# Edit .env and add your API keys (GEMINI_API_KEY, OPENAI_API_KEY, ZAI_API_KEY)
```
### 2. Fix Config File Permissions
The container runs as UID 1000, so the config file must be readable by that user:
```bash
sudo chown 1000:1000 litellm/config.yaml
```
### 3. Deploy Proxy
```bash
docker compose up -d
```
LiteLLM proxy is now running at `http://localhost:4000`.
---
---
## Model Mappings
All model-to-backend mappings live in `litellm/config.yaml`. That file is the source of truth — see it for the full list of exposed models and their backend routes.
---
## Using with Claude Code
To redirect `claude` to your local LiteLLM proxy, update your global `settings.json` file:
> Model names in `ANTHROPIC_DEFAULT_*` must match a `model_name` entry in `litellm/config.yaml`.
```json
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:4000/",
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gemma-4-31b-it",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-3.1-flash-lite-preview",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemma-4-26b-a4b-it"
}
}
```
---
## Docker Customization
If you need to change the default port, modify the `ports` section in `docker-compose.yml`:
```yaml
services:
litellm:
ports:
- "4001:4000"
```
After changing the port, restart:
```bash
docker compose down
docker compose up -d
```
---
## Reference
| Action | Command |
| :---------------------- | :-------------------------------------------- |
| **Start** | `docker compose up -d` |
| **Stop** | `docker compose down` |
| **View Logs** | `docker compose logs -f` |
| **View Logs (LiteLLM)** | `docker compose logs -f litellm` |
| **Restart** | `docker compose restart` |
| **Update** | `docker compose pull && docker compose up -d` |
| **Health Check** | `curl http://localhost:4000/health` |
---
## License
MIT