BenItBuhner

Model Proxy — AI skill for Claude Code

AI community

A model proxy to allow for multiple API key, provider, and model fallbacks, that also translates OpenAI methods to Anthropic, enabling support for the likes of Claude Code and other tools with ease.

How to install Model Proxy

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

What Model Proxy does

A model proxy to allow for multiple API key, provider, and model fallbacks, that also translates OpenAI methods to Anthropic, enabling support for the likes of Claude Code and other tools with ease.

Alternatives in AI

  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★

README

Model-Proxy

OpenAI- and Anthropic-compatible LLM proxy on **Bun** and **TypeScript**. Route logical model names to multiple upstream providers with API-key rotation, cooldowns, format conversion, streaming, optional tool-call enforcement, and a built-in admin UI.

![Model Proxy Banner](assets/github/model-proxy-banner.png)

Features

  • Logical models — config/models/.json maps a client-facing id to one or more provider routes and fallbacks
  • Multi-provider routing — OpenAI-compatible and Anthropic wire protocols (Groq, Cerebras, Gemini, OpenRouter, Nahcrof, etc.)
  • API key fallback — rotate keys and cool down failed keys per provider
  • Format conversion — OpenAI ↔ Anthropic at the proxy boundary
  • Streaming — SSE for chat completions
  • Context window metadata — GET /v1/models exposes context_window, context_length, and limit.context for harness compaction
  • Audio — OpenAI-style /v1/audio/transcriptions; one logical model transcribe-1 routes to Gemini 3.5 Transcribe (native API) with Groq Whisper fallbacks
  • Admin UI — Next.js static app served at / (models, providers, keys, test bench, bundle import/export)

Requirements

  • Bun ≥ 1.4.4 (runtime and tests; 1.4.4 fixes CVE-2026-111497)
  • Docker optional (recommended for production)

Quick start (Docker)

cp .env.example .env
# Edit .env: set CLIENT_API_KEY and provider API keys

docker compose build
docker compose up -d

curl -s http://127.0.0.1:9876/health
curl -s -H "Authorization: Bearer $CLIENT_API_KEY" http://127.0.0.1:9876/v1/models

Default listen address: `http://127.0.0.1:9876` Admin UI: `http://127.0.0.1:9876/` (old `/setup/` links redirect)

Quick start (local dev)

bun install

# Terminal 1 — API server (hot reload). On first boot an admin
# CLIENT_API_KEY is generated and printed to the console — no .env needed.
bun run dev

# Terminal 2 — admin UI (optional; or rely on Docker-built web-static)
cd