Skip to content

Claude Code

Claude Code brings AI-powered coding capabilities directly to your terminal.

Terminal window
npm install -g @anthropic-ai/claude-code

Configuring Claude Code to work with DeepIntShield

Section titled “Configuring Claude Code to work with DeepIntShield”

Claude Code supports multiple authentication methods. Choose the one that matches your account type.

If you have a Claude Pro or Max subscription, Claude Code authenticates via browser-based OAuth — no API key needed.

  1. Set the DeepIntShield base URL

    Terminal window
    export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
  2. Run Claude Code and log in

    Terminal window
    claude

    A browser window opens for you to log in with your Claude.ai account. All traffic automatically routes through DeepIntShield.

Teams and Enterprise users authenticate the same way — via browser OAuth with their team Claude.ai account.

  1. Set the DeepIntShield base URL

    Terminal window
    export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
  2. Run Claude Code and log in

    Terminal window
    claude

    Log in with the Claude.ai account your team admin invited you to.

For users with Anthropic Console API keys or DeepIntShield virtual keys:

  1. Configure environment variables

    Terminal window
    export ANTHROPIC_API_KEY=your-api-key # Anthropic Console key or DeepIntShield virtual key
    export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
  2. Run Claude Code

    Terminal window
    claude

For enterprise setups where DeepIntShield handles authentication centrally, Claude Code supports additional auth mechanisms:

  • ANTHROPIC_AUTH_TOKEN — Sets the Authorization: Bearer header. Use this when your gateway requires a custom bearer token.

    Terminal window
    export ANTHROPIC_AUTH_TOKEN=your-bearer-token
    export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
  • apiKeyHelper — A script that dynamically generates credentials. Configure in Claude Code settings:

    {
    "apiKeyHelper": "/path/to/your/credential-script.sh"
    }

    Set CLAUDE_CODE_API_KEY_HELPER_TTL_MS to control the refresh interval (in milliseconds).

Now all Claude Code traffic flows through DeepIntShield, giving you access to any provider/model configured in your DeepIntShield setup, plus MCP tools and observability.

DeepIntShield can act as a gateway between Claude Code and cloud providers like Amazon Bedrock, Google Vertex AI, and Azure. This lets you route Claude Code traffic through DeepIntShield while using your cloud provider’s infrastructure.

Route Claude Code through DeepIntShield’s Bedrock endpoint, which handles AWS authentication on your behalf:

Terminal window
# Enable Bedrock mode
export CLAUDE_CODE_USE_BEDROCK=1
export ANTHROPIC_BEDROCK_BASE_URL=http://localhost:8080/bedrock
export CLAUDE_CODE_SKIP_BEDROCK_AUTH=1 # DeepIntShield handles AWS auth
export AWS_REGION=us-east-1 # This acts as a placeholder - adaptive load balancer automatically flips based on provider availability
# Pin model versions (recommended)
export ANTHROPIC_DEFAULT_SONNET_MODEL="us.anthropic.claude-sonnet-4-6"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="us.anthropic.claude-haiku-4-5-20251001-v1:0"
# Start Claude Code
claude

Route Claude Code through DeepIntShield’s Vertex AI endpoint:

Terminal window
# Enable Vertex AI mode
export CLAUDE_CODE_USE_VERTEX=1
export ANTHROPIC_VERTEX_BASE_URL=http://localhost:8080/genai
export CLAUDE_CODE_SKIP_VERTEX_AUTH=1 # DeepIntShield handles GCP auth
export ANTHROPIC_VERTEX_PROJECT_ID=your-project-id
export CLOUD_ML_REGION=us-east5
# Pin model versions (recommended)
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-6"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5@20251001"
# Start Claude Code
claude

Claude Code doesn’t have native Azure passthrough like Bedrock or Vertex. Instead, route through DeepIntShield’s Anthropic endpoint and let DeepIntShield handle routing to Azure-hosted models:

Terminal window
# Use DeepIntShield's Anthropic endpoint
export ANTHROPIC_API_KEY=your-deepintshield-virtual-key
export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
# Point model tiers to Azure-hosted models in your DeepIntShield config
export ANTHROPIC_DEFAULT_SONNET_MODEL="azure/claude-sonnet-4-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="azure/claude-haiku-4-5"
# Start Claude Code
claude

Claude Code uses three model tiers: Sonnet (default), Opus (complex tasks), and Haiku (fast, lightweight). With DeepIntShield, you can override these defaults to use any model from any provider.

Override Default Models:

Set environment variables to replace Claude Code’s default model tiers with any DeepIntShield-configured model:

Terminal window
# Replace Sonnet tier with GPT-5
export ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5"
# Replace Opus tier with Claude Opus 4.5
export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-4-5-20251101"
# Replace Haiku tier with Azure-hosted Claude
export ANTHROPIC_DEFAULT_HAIKU_MODEL="azure/claude-haiku-4-5"

Start with a Specific Model:

Launch Claude Code with a specific model using the --model flag:

Terminal window
# Start with Opus
claude --model claude-opus-4-5-20251101
# Start with Haiku for lightweight tasks
claude --model claude-haiku-4-5-20251001

Use the /model command to switch models during an active session:

Terminal window
# Using shorthand
/model opus
/model sonnet
/model haiku
# Using full model names
/model claude-opus-4-5-20251101
/model claude-sonnet-4-5-20250929
# Using different providers dynamically via DeepIntShield
/model vertex/claude-haiku-4-5
/model azure/claude-sonnet-4-5
/model bedrock/claude-sonnet-4-5
Terminal window
# Core DeepIntShield configuration
export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
# For API key users (skip for Pro/Max/Team OAuth login)
export ANTHROPIC_API_KEY=your-deepintshield-virtual-key
# Custom model tiers (optional)
export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-4-5-20250929"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="azure/claude-haiku-4-5"
# Start Claude Code
claude
Terminal window
# Bedrock via DeepIntShield
export CLAUDE_CODE_USE_BEDROCK=1
export ANTHROPIC_BEDROCK_BASE_URL=http://localhost:8080/bedrock
export CLAUDE_CODE_SKIP_BEDROCK_AUTH=1
export AWS_REGION=us-east-1
# Pin model versions
export ANTHROPIC_DEFAULT_SONNET_MODEL="us.anthropic.claude-sonnet-4-6"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="us.anthropic.claude-haiku-4-5-20251001-v1:0"
# Start Claude Code
claude

Using Non-Anthropic Models with Claude Code

Section titled “Using Non-Anthropic Models with Claude Code”

DeepIntShield automatically translates Anthropic API requests to other providers, so you can use Claude Code with models from OpenAI, Google, Mistral, and more. Use the provider/model-name format to specify any DeepIntShield-configured model.

Override default model tiers:

Terminal window
# Use OpenAI for the primary (Sonnet) tier
export ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5"
# Use Google Gemini for the Opus tier
export ANTHROPIC_DEFAULT_OPUS_MODEL="gemini/gemini-2.5-pro"
# Use Groq for the Haiku (fast) tier
export ANTHROPIC_DEFAULT_HAIKU_MODEL="groq/llama-3.3-70b-versatile"

Switch models mid-session:

Terminal window
/model openai/gpt-5
/model gemini/gemini-2.5-pro
/model mistral/mistral-large-latest
/model xai/grok-3

DeepIntShield supports the following providers with the provider/model-name format:

openai, azure, gemini, vertex, bedrock, mistral, groq, cerebras, cohere, perplexity, xai, ollama, openrouter, huggingface, nebius, parasail, replicate, vllm, sgl