Bumps [hono](https://github.com/honojs/hono) from 4.12.10 to 4.12.18. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.12.10...v4.12.18) --- updated-dependencies: - dependency-name: hono dependency-version: 4.12.18 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Claude Central Gateway
⚠️ Project Abandoned
This project is no longer maintained.
When this was started, lightweight Anthropic-to-OpenAI proxies were scarce. That's no longer true — the AI/LLM gateway ecosystem has matured rapidly and there are now many production-grade alternatives that do everything this project does and far more (routing, fallbacks, rate limiting, observability, caching, GUIs, multi-tenancy, etc.).
Please use one of the well-maintained gateways listed below instead. They are faster, more feature-complete, and actively developed.
Recommended Alternatives
Browse the full ecosystem on GitHub:
Popular choices:
| Gateway | Language | Highlights |
|---|---|---|
| LiteLLM | Python | 100+ providers, proxy server, cost tracking, virtual keys, GUI |
| Bifrost | Go | Fastest open-source LLM gateway, low-latency, multi-provider |
| New API | Go | Next-gen gateway with rich UI, billing, key management (fork of One API) |
| One API | Go | Multi-provider gateway with token/quota management |
| Portkey Gateway | TypeScript | Unified API, fallbacks, load balancing, guardrails |
| OpenRouter | Hosted | Managed gateway with 300+ models, no self-host needed |
| Claude Code Router | Node.js | Local single-machine proxy specifically for Claude Code |
Quick recommendations
- Single machine / personal use → Claude Code Router
- Self-hosted with full features (GUI, billing, keys) → New API or LiteLLM
- Performance-critical / high throughput → Bifrost
- Zero ops / hosted → OpenRouter or Portkey
Where to Find Cheap LLM Providers?
Check out penny-pincher-provider for a list of affordable OpenAI-compatible providers.
Legacy Documentation
The rest of this README is kept for historical reference only. The project is no longer updated and the code is provided as-is.
Expand legacy docs
A lightweight proxy that translated Claude API requests to OpenAI's API, enabling cost optimization through cheaper third-party providers. Deployable on Vercel, Cloudflare Workers, or any Hono-compatible platform.
Features
- Full tool use/tool result support with proper round-trip handling
- Streaming responses with Anthropic SSE format
- Image content (base64 and URLs)
- System message arrays
- Timing-safe authentication (x-api-key header)
- Stop sequences and stop reason mapping
- Token usage tracking
Environment Variables
| Variable | Required | Description | Example |
|---|---|---|---|
GATEWAY_TOKEN |
Yes | Shared token for authentication via x-api-key header |
my-secret-token-123 |
OPENAI_API_KEY |
Yes | OpenAI API key (with usage credits) | sk-proj-... |
MODEL_MAP |
No | Model name mappings (comma-separated, format: claude-model:openai-model) |
claude-sonnet-4-20250514:gpt-4o,claude-opus:gpt-4-turbo |
Deploy to Vercel
git clone https://github.com/tiennm99/claude-central-gateway
cd claude-central-gateway
npm install
vercel
Deploy to Cloudflare Workers
git clone https://github.com/tiennm99/claude-central-gateway
cd claude-central-gateway
npm install
npm run deploy:cf
Configure Claude Code
export ANTHROPIC_BASE_URL=https://your-gateway.vercel.app
export ANTHROPIC_AUTH_TOKEN=my-secret-token
claude
Project Structure
src/
├── index.js # Hono app entry point
├── auth-middleware.js # x-api-key validation with timing-safe comparison
├── openai-client.js # Cached OpenAI client, model mapping
├── transform-request.js # Anthropic → OpenAI transformation
├── transform-response.js # OpenAI → Anthropic SSE streaming
└── routes/
└── messages.js # POST /v1/messages handler