LiteLLM Claude Code Proxy
Open-source LiteLLM configuration that lets Claude Code run against an Azure AI Foundry deployment instead of Anthropic's hosted API. Published by National Bank of Belgium. It's a thin wrapper: a `litellmconfig.yaml` with a wildcard model route, a `startproxy.sh` launcher, a Dockerfile, and a `.env`
Canonical version: LiteLLM Claude Code Proxy.
Open-source LiteLLM configuration that lets Claude Code run against an Azure AI Foundry deployment instead of Anthropic's hosted API. Published by National Bank of Belgium. It's a thin wrapper: a litellm_config.yaml with a wildcard model route, a start_proxy.sh launcher, a Dockerfile, and a .env template. Any model name Claude Code sends is forwarded to one Azure deployment (for instance azure/responses/gpt-5.3-codex).
Why it exists
Claude Code speaks Anthropic's /v1/messages API. Enterprises often can't use Anthropic directly but have an Azure AI Foundry tenant with approved models. LiteLLM translates between Anthropic's format and Azure's responses / Chat Completions API, so Claude Code keeps working against a corporate-approved backend.
How it works
model_name: "*"wildcard inlitellm_config.yaml— every model name is routed to a single Azure deployment- Claude Code points at the proxy via two env vars:
ANTHROPIC_BASE_URL=http://localhost:4000ANTHROPIC_AUTH_TOKEN=<LITELLM_MASTER_KEY>
LITELLM_LOCAL_MODEL_COST_MAP=trueskips the remote cost map fetch, avoiding SSL errors behind corporate proxiesstart_proxy.shusesuv runwithUV_NATIVE_TLS=trueto use the system certificate store — another corporate-proxy workaround
Three ways to configure Claude Code
- Env vars per session —
export ANTHROPIC_BASE_URL=...before launchingclaude - Persistent — add an
envblock to~/.claude/settings.json - VS Code — add a
claude-code.envblock to VS Codesettings.json
Docker
Uses the official docker.litellm.ai/berriai/litellm:main-stable image. Two options: build the included Dockerfile, or mount litellm_config.yaml directly into the upstream image. Configuration stays in .env.
Takeaways
- Clean pattern for using Claude Code with enterprise-hosted non-Anthropic models (Bring Your Own Key (BYOK) inverted: bring your own model, keep the client)
- Same pattern works for any Anthropic-compatible client — not just Claude Code
- Practical reference for corporate SSL-proxy workarounds in LiteLLM Proxy Configuration
- Complements Claude Max API Proxy, which goes the other direction (Max subscription → OpenAI-compatible API)
References
- https://github.com/NationalBankBelgium/litellm-claude-code-proxy
- https://docs.litellm.ai/docs/tutorials/claude_non_anthropic_models
- https://docs.litellm.ai/docs/proxy/docker_quick_start
Related
- LiteLLM
- LiteLLM Proxy Configuration
- Claude Code
- Claude Code via GitHub Copilot
- Claude Max API Proxy
- AI Gateway
- Anthropic
About Sébastien
I'm Sébastien Dubois, and I'm on a mission to help knowledge workers escape information overload. After 20+ years in IT and seeing too many brilliant minds drowning in digital chaos, I've decided to help people build systems that actually work. Through the Knowii Community, my courses, products & services and my Website/Newsletter, I share practical and battle-tested systems.
I write about Knowledge Work, Personal Knowledge Management, Note-taking, Lifelong Learning, Personal Organization, Productivity, and more. I also craft lovely digital products and tools.
If you want to follow my work, then become a member and join our community.
Ready to get to the next level?
If you're tired of information overwhelm and ready to build a reliable knowledge system:
- 📚 KM for Beginners — 10+ hours of structured video lessons
- 🚀 Obsidian Starter Kit — Ready-made vault with 40+ templates
- 💼 Knowledge Worker Kit — Complete guides + lifetime community
- 🦉 1-on-1 Coaching — Personalized guidance
- 🎯 Join Knowii — Community + ALL courses & tools
Found this valuable? Share it with someone who needs it.