Before you begin
Create a key on the API Keys page, confirm the model ID on the Models page, and export the key in the shell where you start Claude Code or its local proxy.1
Install LiteLLM
LiteLLM bridges the Anthropic Messages API to Chat
Completions.
2
Configure the proxy
These model entries are examples, not the full LithosAI catalog. For other models
or tiers, copy an entry and replace the ID after
hosted_vllm/ with one from
Models. Use the corresponding model_name
aliases in the Claude Code environment settings below.Give each model the hosted_vllm/ prefix. It translates /v1/messages requests into
Chat Completions requests for LithosAI.LiteLLM proxy configuration
LiteLLM proxy configuration
claude-code.litellm.yaml
3
Start the proxy
127.0.0.1 and do not expose it to a network.4
Point Claude Code at it
ANTHROPIC_DEFAULT_HAIKU_MODEL handles background work such as session titles. Without it,
those requests fail against a model the proxy does not serve.Check the Models console page for each model’s
context window.
Troubleshooting
Issues common to every agent are listed under Common issues.