Anthropic Proxy Litellm — Development skill for Claude Code
In-process LiteLLM proxy for Python — use as a context manager to route Anthropic API requests to any LiteLLM-supported backend.
How to install Anthropic Proxy Litellm
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open CJHwong/anthropic-proxy-litellm and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Anthropic Proxy Litellm does
In-process LiteLLM proxy for Python — use as a context manager to route Anthropic API requests to any LiteLLM-supported backend.
Alternatives in Development
- Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
- Openclaw Billing Proxy — Route OpenClaw API requests through Claude Code subscription billing instead of Extra Usage 460 ★
- Litellm Skills — Agent Skills for managing live LiteLLM proxy deployments — users, teams, keys, orgs, models, MCP servers, agen 99 ★
README
anthropic-proxy-litellm
In-process LiteLLM proxy for Anthropic-compatible API access to any LLM.
Wraps [LiteLLM](https://github.com/BerriAI/litellm)'s proxy server in a Python context manager (`LiteLLMProxy`), so you can spin up an Anthropic-compatible endpoint in a single `with` block — no separate process, no shell scripts, no port management.
Works with any LiteLLM-supported backend: **AWS Bedrock**, **GitHub Copilot**, **Ollama**, **OpenAI**, **Azure**, and [many more](https://docs.litellm.ai/docs/providers).
Install
uv pip install -e .
Quickstart
With Claude Agent SDK
from anthropic_proxy_litellm import LiteLLMProxy
with LiteLLMProxy(config="config.yaml", model="my-model") as proxy:
async for msg in proxy.query("Say hello"):
print(msg)
With Claude Code CLI
Write a script that starts the proxy and prints env vars:
# start_proxy.py
from anthropic_proxy_litellm import LiteLLMProxy
models = [
{"model_name": "gpt-4.1", "litellm_params": {"model": "github_copilot/gpt-4.1"}},
]
with LiteLLMProxy(model_list=models, model="gpt-4.1") as proxy:
for key, value in proxy.env.items():
print(f"{key}={value}", flush=True)
print("", flush=True) # blank line = ready
import signal, threading
stop = threading.Event()
signal.signal(signal.SIGTERM, lambda *_: stop.set())
try:
stop.wait()
except KeyboardInterrupt:
pass
Then drive it from a shell script:
#!/usr/bin/env bash
set -euo pipefail
PIPE=$(mktemp -u); mkfifo "$PIPE"
cleanup() { kill "$PROXY_PID" 2>/dev/null; rm -f "$PIPE"; }
trap cleanup EXIT
uv run start_proxy.py > "$PIPE" &
PROXY_PID=$!
while IFS= read -r line; do
[ -z "$line" ] && break
export "$line"
done < "$PIPE"
claude -p "Say hello"
See [`examples/copilot/`](examples/copilot/) for a complete working version.
API
`LiteLLMProxy`
| Parameter | Env var fallback | Description
Related Skills
Claude Proxy Router
Route Claude Code's API requests through the logged-in Claude account with the most usage headroom — a small m
Alan Code Agent
Open-source Python implementation of a Claude-Code-like agent (Gemini CLI, Codex, Copilot...). Usable in CLI,
Tokentrimmer
Local proxy that losslessly shrinks tool output in Claude Code / Anthropic / OpenAI requests before they're se
Kvguard
Local proxy & TUI that catches 1-token prompt/KV cache prefix misses and auto-heals requests for Anthropic, Op
New Route
Scaffold a new API route end-to-end in the Go backend.
Aurora Travel Backend
A warm, playful travel-agent chatbot with procedurally-generated ambient soundscapes. Backend keeps your Anthr
Related Agents
FastAPI Backend Developer
Use this agent when the user requests changes to the FastAPI backend, REST API endpoints, Python services, or
Cma Operator
Headless operator for Claude Managed Agents (CMA). Assembles context, shells out to the anthropic Python SDK (
Glm Agent
Runs Z.AI GLM on the user's GLM Coding Plan. Three modes - consult (direct API call, 1M context, for inputs to