Claude Code
Claude Code brings AI-powered coding capabilities directly to your terminal.
To install Claude code
Section titled “To install Claude code”npm install -g @anthropic-ai/claude-codeConfiguring 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.
Claude Pro / Max accounts
Section titled “Claude Pro / Max accounts”If you have a Claude Pro or Max subscription, Claude Code authenticates via browser-based OAuth — no API key needed.
-
Set the DeepIntShield base URL
Terminal window export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic -
Run Claude Code and log in
Terminal window claudeA browser window opens for you to log in with your Claude.ai account. All traffic automatically routes through DeepIntShield.
Claude for Teams / Enterprise accounts
Section titled “Claude for Teams / Enterprise accounts”Teams and Enterprise users authenticate the same way — via browser OAuth with their team Claude.ai account.
-
Set the DeepIntShield base URL
Terminal window export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic -
Run Claude Code and log in
Terminal window claudeLog in with the Claude.ai account your team admin invited you to.
API key based usage
Section titled “API key based usage”For users with Anthropic Console API keys or DeepIntShield virtual keys:
-
Configure environment variables
Terminal window export ANTHROPIC_API_KEY=your-api-key # Anthropic Console key or DeepIntShield virtual keyexport ANTHROPIC_BASE_URL=http://localhost:8080/anthropic -
Run Claude Code
Terminal window claude
Custom authentication
Section titled “Custom authentication”For enterprise setups where DeepIntShield handles authentication centrally, Claude Code supports additional auth mechanisms:
-
ANTHROPIC_AUTH_TOKEN— Sets theAuthorization: Bearerheader. Use this when your gateway requires a custom bearer token.Terminal window export ANTHROPIC_AUTH_TOKEN=your-bearer-tokenexport 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_MSto 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.
Cloud Provider Passthrough
Section titled “Cloud Provider Passthrough”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.
Amazon Bedrock via DeepIntShield
Section titled “Amazon Bedrock via DeepIntShield”Route Claude Code through DeepIntShield’s Bedrock endpoint, which handles AWS authentication on your behalf:
# Enable Bedrock modeexport CLAUDE_CODE_USE_BEDROCK=1export ANTHROPIC_BEDROCK_BASE_URL=http://localhost:8080/bedrockexport CLAUDE_CODE_SKIP_BEDROCK_AUTH=1 # DeepIntShield handles AWS authexport 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 CodeclaudeGoogle Vertex AI via DeepIntShield
Section titled “Google Vertex AI via DeepIntShield”Route Claude Code through DeepIntShield’s Vertex AI endpoint:
# Enable Vertex AI modeexport CLAUDE_CODE_USE_VERTEX=1export ANTHROPIC_VERTEX_BASE_URL=http://localhost:8080/genaiexport CLAUDE_CODE_SKIP_VERTEX_AUTH=1 # DeepIntShield handles GCP authexport ANTHROPIC_VERTEX_PROJECT_ID=your-project-idexport 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 CodeclaudeAzure via DeepIntShield
Section titled “Azure via DeepIntShield”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:
# Use DeepIntShield's Anthropic endpointexport ANTHROPIC_API_KEY=your-deepintshield-virtual-keyexport ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
# Point model tiers to Azure-hosted models in your DeepIntShield configexport ANTHROPIC_DEFAULT_SONNET_MODEL="azure/claude-sonnet-4-5"export ANTHROPIC_DEFAULT_HAIKU_MODEL="azure/claude-haiku-4-5"
# Start Claude CodeclaudeModel Configuration
Section titled “Model Configuration”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:
# Replace Sonnet tier with GPT-5export ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5"
# Replace Opus tier with Claude Opus 4.5export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-4-5-20251101"
# Replace Haiku tier with Azure-hosted Claudeexport 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:
# Start with Opusclaude --model claude-opus-4-5-20251101
# Start with Haiku for lightweight tasksclaude --model claude-haiku-4-5-20251001Switching Models Mid-Session
Section titled “Switching Models Mid-Session”Use the /model command to switch models during an active session:
# 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-5Provider Compatibility
Section titled “Provider Compatibility”Example: Full DeepIntShield Setup
Section titled “Example: Full DeepIntShield Setup”Anthropic API passthrough (most common)
Section titled “Anthropic API passthrough (most common)”# Core DeepIntShield configurationexport 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 CodeclaudeBedrock passthrough
Section titled “Bedrock passthrough”# Bedrock via DeepIntShieldexport CLAUDE_CODE_USE_BEDROCK=1export ANTHROPIC_BEDROCK_BASE_URL=http://localhost:8080/bedrockexport CLAUDE_CODE_SKIP_BEDROCK_AUTH=1export AWS_REGION=us-east-1
# Pin model versionsexport 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 CodeclaudeUsing 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:
# Use OpenAI for the primary (Sonnet) tierexport ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5"
# Use Google Gemini for the Opus tierexport ANTHROPIC_DEFAULT_OPUS_MODEL="gemini/gemini-2.5-pro"
# Use Groq for the Haiku (fast) tierexport ANTHROPIC_DEFAULT_HAIKU_MODEL="groq/llama-3.3-70b-versatile"Switch models mid-session:
/model openai/gpt-5/model gemini/gemini-2.5-pro/model mistral/mistral-large-latest/model xai/grok-3Supported Providers
Section titled “Supported Providers”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