-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.env.example
More file actions
91 lines (71 loc) · 4.38 KB
/
Copy path.env.example
File metadata and controls
91 lines (71 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Claude Code Proxy Configuration
#
# RECOMMENDED LOCATION: ~/.claude/proxy.env
#
# Alternative locations (checked in order):
# 1. ./.env (local project override)
# 2. ~/.claude/proxy.env (recommended)
# 3. ~/.claude-code-proxy
# ============================================================================
# Provider Configuration (Choose ONE)
# ============================================================================
# ─────────────────────────────────────────────────────────────────────────────
# OPTION 1: OpenRouter (Recommended - 200+ models)
# ─────────────────────────────────────────────────────────────────────────────
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_API_KEY=sk-or-v1-your-openrouter-key
# Model routing examples for OpenRouter:
ANTHROPIC_DEFAULT_SONNET_MODEL=x-ai/grok-code-fast-1
ANTHROPIC_DEFAULT_HAIKU_MODEL=google/gemini-2.5-flash
# ANTHROPIC_DEFAULT_OPUS_MODEL=openai/gpt-5
# Optional: Better rate limits and dashboard tracking
# OPENROUTER_APP_NAME=Claude-Code-Proxy
# OPENROUTER_APP_URL=https://github.com/yourname/claude-code-proxy
# ─────────────────────────────────────────────────────────────────────────────
# OPTION 2: OpenAI Direct (o1/o3 reasoning models supported)
# ─────────────────────────────────────────────────────────────────────────────
# OPENAI_BASE_URL=https://api.openai.com/v1
# OPENAI_API_KEY=sk-proj-your-openai-key
# Model routing examples for OpenAI:
# ANTHROPIC_DEFAULT_SONNET_MODEL=gpt-4o
# ANTHROPIC_DEFAULT_HAIKU_MODEL=gpt-4o-mini
# ANTHROPIC_DEFAULT_OPUS_MODEL=o1-preview
# ─────────────────────────────────────────────────────────────────────────────
# OPTION 3: Ollama (Local - Free and Private)
# ─────────────────────────────────────────────────────────────────────────────
# OPENAI_BASE_URL=http://localhost:11434/v1
# No API key needed for Ollama! (localhost auth is skipped)
# Model routing examples for Ollama:
# ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-r1:70b
# ANTHROPIC_DEFAULT_HAIKU_MODEL=llama3.1:8b
# ANTHROPIC_DEFAULT_OPUS_MODEL=qwen2.5-coder:32b
# ============================================================================
# Optional - Model Routing Overrides
# ============================================================================
# Override pattern-based routing with specific models
# If not set, uses intelligent pattern matching
# Opus tier (default: gpt-5)
# ANTHROPIC_DEFAULT_OPUS_MODEL=gpt-5
# Sonnet tier (default: version-aware - sonnet-4→gpt-5, sonnet-3→gpt-4o)
# ANTHROPIC_DEFAULT_SONNET_MODEL=gpt-5
# Haiku tier (default: gpt-5-mini)
# ANTHROPIC_DEFAULT_HAIKU_MODEL=gpt-5-mini
# ============================================================================
# Optional - Security
# ============================================================================
# Client API key validation (optional)
# If set, clients must provide this exact key
# ANTHROPIC_API_KEY=your-validation-key
# ============================================================================
# Optional - Server Settings
# ============================================================================
# Server host (default: 0.0.0.0)
# HOST=0.0.0.0
# Server port (default: 8082)
# PORT=8082
# ============================================================================
# Optional - Advanced
# ============================================================================
# Passthrough mode - directly proxy to Anthropic API without conversion (default: false)
# Useful for debugging or when you want to use Anthropic API directly
# PASSTHROUGH_MODE=false