# ============================================================
# AI Proxy — Environment Configuration
# Copy to .env and fill in your API keys
# ============================================================

# --- Server ---
AI_PROXY_HOST=0.0.0.0
AI_PROXY_PORT=4000
AI_PROXY_MASTER_KEY=sk-proxy-local-dev
AI_PROXY_LOG_LEVEL=info

# --- Redis (cache + semantic search) ---
REDIS_URL=redis://localhost:6379/0

# --- Provider API Keys (fill only those you use) ---
# Anthropic — Opus 4.6, Sonnet 4.6, Haiku 4.5
ANTHROPIC_API_KEY=

# OpenAI — GPT-5.4, GPT-4.1, GPT-4o
OPENAI_API_KEY=

# OpenRouter — 300+ models, single key
OPENROUTER_API_KEY=

# Google AI Studio — Gemini 2.5 Pro/Flash (free tier)
GOOGLE_AI_KEY=

# DeepSeek — V3, R1 (cheapest cloud)
DEEPSEEK_API_KEY=

# Groq — ultra-fast inference (free tier available)
GROQ_API_KEY=

# Together AI — open-source models
TOGETHER_API_KEY=

# Mistral — Codestral, Mistral Large
MISTRAL_API_KEY=

# Fireworks AI — fast open-source inference
FIREWORKS_API_KEY=

# Cerebras — fastest inference (free tier)
CEREBRAS_API_KEY=

# --- Local Models (Ollama) ---
# Where Ollama runs — localhost for same machine, IP for Jetson/RPi
OLLAMA_BASE_URL=http://localhost:11434
# Secondary Ollama instance (e.g., Jetson Orin on LAN)
OLLAMA_SECONDARY_URL=

# --- Delta Context Buffer ---
# Directory watched for code2llm output
WATCH_DIR=./project
# Max context window tokens to send
MAX_CONTEXT_TOKENS=120000
# Delta sensitivity (0.0–1.0, lower = more diffs sent)
DELTA_THRESHOLD=0.15

# --- Budget Limits ---
# Monthly budget cap in USD (0 = unlimited)
MONTHLY_BUDGET_USD=60
# Daily budget cap
DAILY_BUDGET_USD=5
# Per-request max cost
MAX_REQUEST_COST_USD=2.0

# --- Dashboard & Client Configuration ---
# Dashboard API URL (for frontend)
DASHBOARD_API_URL=http://localhost:4000
# Default proxy URL for CLI tools
DEFAULT_PROXY_URL=http://localhost:4000
# Default API key for CLI tools
DEFAULT_API_KEY=sk-proxy-local-dev

# --- Development & Testing ---
# Development server port (can be different from production)
DEV_PORT=4001
# Enable debug mode
DEBUG=false
# Enable hot reload for development
HOT_RELOAD=false
