{"id":51454023,"url":"https://github.com/iannil/llmproxy","last_synced_at":"2026-07-05T23:01:28.365Z","repository":{"id":368154768,"uuid":"1283761315","full_name":"iannil/llmproxy","owner":"iannil","description":"统一模型 API 桥接代理，任意 AI 工具无缝对接任意模型供应商，协议自动转换。","archived":false,"fork":false,"pushed_at":"2026-06-29T08:12:10.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-29T10:11:46.178Z","etag":null,"topics":["agent","ai","claude-code","codex","gemini-cli","proxy"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iannil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-29T08:03:24.000Z","updated_at":"2026-06-29T08:13:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iannil/llmproxy","commit_stats":null,"previous_names":["iannil/llmproxy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iannil/llmproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iannil%2Fllmproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iannil%2Fllmproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iannil%2Fllmproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iannil%2Fllmproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iannil","download_url":"https://codeload.github.com/iannil/llmproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iannil%2Fllmproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35171814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","claude-code","codex","gemini-cli","proxy"],"created_at":"2026-07-05T23:01:27.146Z","updated_at":"2026-07-05T23:01:28.351Z","avatar_url":"https://github.com/iannil.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llmproxy\n\n\u003e **Unified model API bridge** — route any AI tool to any model provider with seamless protocol conversion.\n\n[中文](README.zh-CN.md)\n\n[![Crates.io](https://img.shields.io/crates/v/llmproxy.svg)](https://crates.io/crates/llmproxy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![Rust](https://img.shields.io/badge/rust-1.85.0+-blue.svg)\n[![中文](https://img.shields.io/badge/README-中文-blue.svg)](README.zh-CN.md)\n\n```bash\n# Claude Code → DeepSeek\nexport ANTHROPIC_BASE_URL=http://localhost:8880\nclaude --model deepseek-chat\n\n# Codex → Claude\ncodex --model claude-sonnet-4-20250514\n\n# Any OpenAI client → Gemini\ncurl http://localhost:8880/v1/chat/completions \\\n  -d '{\"model\":\"gemini-2.5-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n```\n\nllmproxy sits between your AI CLI tools and upstream model APIs, translating requests and streaming responses on the fly. No database, no sessions — just a lightweight YAML-configured proxy.\n\n---\n\n## Features\n\n- **Multi-protocol**: Anthropic Messages, OpenAI Chat, OpenAI Responses, Google Gemini\n- **Bidirectional streaming**: SSE conversion between Anthropic ↔ OpenAI (production-ready)\n- **Single YAML config**: no database, no GUI, no complexity\n- **Model routing**: exact match + prefix matching across multiple upstreams\n- **Model mapping**: rewrite model names per upstream\n- **Env-var injection**: `${API_KEY}` references in config\n- **Security**: model name injection guard, no authentication layer (transparent proxy)\n\n### Protocol Matrix\n\n| Inbound → Outbound | Anthropic | OpenAI Chat | Responses | Gemini |\n|-------------------|-----------|-------------|-----------|--------|\n| Anthropic Messages | ✅ pass-through | ✅ + streaming | ✅ | ⚠️ basic |\n| OpenAI Chat | ✅ + streaming | ✅ pass-through | ✅ | ⚠️ basic |\n| OpenAI Responses | ✅ | ✅ | ✅ pass-through | ⚠️ basic |\n| Gemini | ✅ simplified | ✅ simplified | ✅ simplified | ✅ pass-through |\n\n---\n\n## Quick Start\n\n```bash\n# 1. Build\ncargo build --release\n\n# 2. Configure\ncp config.example.yaml config.yaml\n# Edit config.yaml with your API keys\n\n# 3. Run\ncargo run --release\n```\n\nDefault listen address: `127.0.0.1:8880` (override with `--listen`).\n\n### Configuration\n\n```yaml\nlisten: \"127.0.0.1:8880\"\n\nupstreams:\n  - name: deepseek\n    base_url: https://api.deepseek.com\n    api_key: \"${DEEPSEEK_API_KEY}\"    # supports env var references\n    type: openai                       # anthropic | openai | openai_responses | gemini\n    models:\n      - deepseek-chat\n```\n\n### CLI\n\n```text\nUsage: llmproxy [OPTIONS]\n\nOptions:\n  -c, --config \u003cFILE\u003e  Path to YAML configuration [default: config.yaml]\n  -l, --listen \u003cADDR\u003e  Listen address (overrides config file)\n  -h, --help           Print help\n  -V, --version        Print version\n```\n\n---\n\n## Use Cases\n\n### Claude Code with DeepSeek\n\n```bash\nexport ANTHROPIC_BASE_URL=http://localhost:8880\nexport ANTHROPIC_API_KEY=not-needed\nclaude --model deepseek-chat\n```\n\n### Codex / OpenAI SDK with Claude\n\n```python\nfrom openai import OpenAI\nclient = OpenAI(base_url=\"http://localhost:8880\", api_key=\"not-needed\")\nresponse = client.chat.completions.create(\n    model=\"claude-sonnet-4-20250514\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n```\n\n### Any CLI with Gemini\n\n```bash\ncurl -X POST http://localhost:8880/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"gemini-2.5-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":100}'\n```\n\n---\n\n## Routes\n\n| Method | Path | Protocol |\n|--------|------|----------|\n| POST | `/v1/messages` | Anthropic Messages |\n| POST | `/v1/chat/completions` | OpenAI Chat |\n| POST | `/v1/responses` | OpenAI Responses |\n| GET | `/v1/models` | Model listing |\n| ANY | `/v1beta/*` | Google Gemini |\n| GET | `/health` | Health check |\n\n---\n\n## Documentation\n\n| Doc | Description |\n|-----|-------------|\n| [docs/usage-guide.md](docs/usage-guide.md) | Step-by-step tutorial with real scenarios |\n| [docs/config-format.md](docs/config-format.md) | YAML configuration reference |\n| [docs/api-routes.md](docs/api-routes.md) | Full API reference |\n| [docs/conversion-paths.md](docs/conversion-paths.md) | Protocol conversion details |\n| [docs/architecture.md](docs/architecture.md) | Architecture \u0026 design decisions |\n\n---\n\n## Why llmproxy?\n\n- **~2,300 lines of Rust** — small, auditable, no bloat\n- **No external database** — configuration is a single file\n- **No state** — restart any time, no session to lose\n- **Transparent** — your API keys never leave your network\n\n---\n\n## License\n\nMIT © 2026\n\n---\n\n\u003e *llmproxy — bridge any model, any tool, any protocol.*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiannil%2Fllmproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiannil%2Fllmproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiannil%2Fllmproxy/lists"}