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

# --- Provider Aliases (model shortcuts: cheap, balanced, premium, free) ---
# Format: provider:model-name or just provider (uses default)
# These are used by the proxy router and VS Code: Roo Code integration
PROXYM_ALIAS_CHEAP=anthropic:claude-3-5-haiku-20241022
PROXYM_ALIAS_BALANCED=anthropic:claude-3-5-sonnet-20241022
PROXYM_ALIAS_PREMIUM=anthropic:claude-3-opus-20240229
PROXYM_ALIAS_FREE=google:gemini-1.5-flash

# --- 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

# --- VS Code Web (profil: docker compose --profile vscode up -d) ---
# Port VS Code Web
VSCODE_PORT=8080
# Hasło do VS Code Web (domyślnie: proxym-vscode)
VSCODE_PASSWORD=proxym-vscode
# Katalog projektu montowany do kontenera
VSCODE_PROJECT_PATH=./
# Nazwa workspace
VSCODE_WORKSPACE_NAME=proxym
# Aliasy modeli proxym dla trybów Roo Code
VSCODE_MODEL_CODE=balanced
VSCODE_MODEL_ARCHITECT=free
VSCODE_MODEL_DEBUG=cheap
VSCODE_MODEL_ASK=free
VSCODE_MODEL_OPUS=premium

# --- Open WebUI (profil: docker compose --profile webui up -d) ---
OPEN_WEBUI_PORT=3000

# --- Observability & Self-healing ---
# Watchdog interval (seconds, 0 = disabled)
PROXYM_WATCHDOG_ENABLED=true
PROXYM_WATCHDOG_INTERVAL=60
# Self-healing (opcjonalne)
PROXYM_REPAIR_ENABLED=false
PROXYM_REPAIR_MODE=suggest       # suggest | apply | auto
PROXYM_REPAIR_API_KEY=           # OpenRouter key (lub pusty = użyj OPENROUTER_API_KEY)
PROXYM_REPAIR_MODEL=anthropic/claude-sonnet-4-20250514
PROXYM_REPAIR_BUDGET_DAILY=2.0   # max $/dzień na auto-naprawy

# --- 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

# --- Tools Configuration ---
# Force tool availability (useful for containerized deployments)
# Comma-separated list of tool names, or "*" for all tools
# Available tools: aider, claude-code, windsurf, cursor, vscode, roo-code, cline, browser
PROXYM_TOOLS_AVAILABLE=
# Example: PROXYM_TOOLS_AVAILABLE=claude-code,vscode,cursor,windsurf,browser
# Example: PROXYM_TOOLS_AVAILABLE=*  # Force all tools to be available
