BlazeInferDocs
Integrations

Claude Code

Use BlazeInfer models in Claude Code through the LiteLLM proxy.

SupportedTested with: Through LiteLLM 1.108.4

Claude Code is Anthropic's coding agent for the terminal. Use it with BlazeInfer models through LiteLLM: set up the LiteLLM proxy with your BlazeInfer models, then point Claude Code at the proxy.

Prerequisites

  • The LiteLLM proxy running with your BlazeInfer models, as in the LiteLLM guide. This page assumes it runs on http://localhost:4000 with a model named deepseek-v4.1-flash.
  • Your LiteLLM key: the proxy's master_key or a virtual key. If the proxy has no master_key, any value works. Your BLAZE_API_KEY stays on the proxy.

Point Claude Code at the proxy

Set these environment variables, then start Claude Code:

export ANTHROPIC_BASE_URL="http://localhost:4000"
export ANTHROPIC_AUTH_TOKEN="sk-your-litellm-key"
export ANTHROPIC_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"

claude
  • ANTHROPIC_AUTH_TOKEN is sent as Authorization: Bearer. Use it instead of ANTHROPIC_API_KEY.
  • ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL are model_name values from your LiteLLM config. Claude Code uses the Haiku model for background tasks, so point it at the proxy too.

To keep the settings for every session, put them under env in ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:4000",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-litellm-key",
    "ANTHROPIC_MODEL": "deepseek-v4.1-flash",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4.1-flash"
  }
}

Choose a model with a large context window; coding agents send long prompts.

On this page