# Construct Environment Variables
# Copy this file to `.env` and fill in your local values.
# Never commit `.env` or any real secrets.

# ── Core Runtime ──────────────────────────────────────────────
# Provider key resolution at runtime:
# 1) explicit key passed from config/CLI
# 2) provider-specific env var (OPENROUTER_API_KEY, OPENAI_API_KEY, ...)
# 3) generic fallback env vars below

# Generic fallback API key (used when provider-specific key is absent)
API_KEY=your-api-key-here
# CONSTRUCT_API_KEY=your-api-key-here

# Default provider/model (can be overridden by CLI flags)
PROVIDER=openrouter
# CONSTRUCT_PROVIDER=openrouter
# CONSTRUCT_MODEL=anthropic/claude-sonnet-4-6
# CONSTRUCT_TEMPERATURE=0.7

# Workspace directory override
# CONSTRUCT_WORKSPACE=/path/to/workspace

# Reasoning mode (enables extended thinking for supported models)
# CONSTRUCT_REASONING_ENABLED=false
# REASONING_ENABLED=false

# ── Provider-Specific API Keys ────────────────────────────────
# OpenRouter
# OPENROUTER_API_KEY=sk-or-v1-...

# Anthropic
# ANTHROPIC_OAUTH_TOKEN=...
# ANTHROPIC_API_KEY=sk-ant-...

# OpenAI / Gemini
# OPENAI_API_KEY=sk-...
# GEMINI_API_KEY=...
# GOOGLE_API_KEY=...

# Other supported providers
# VENICE_API_KEY=...
# GROQ_API_KEY=...
# MISTRAL_API_KEY=...
# DEEPSEEK_API_KEY=...
# XAI_API_KEY=...
# TOGETHER_API_KEY=...
# FIREWORKS_API_KEY=...
# PERPLEXITY_API_KEY=...
# COHERE_API_KEY=...
# MOONSHOT_API_KEY=...
# GLM_API_KEY=...
# MINIMAX_OAUTH_TOKEN=...
# MINIMAX_API_KEY=...
# MINIMAX_OAUTH_REFRESH_TOKEN=...
# MINIMAX_OAUTH_REGION=global   # optional: global|cn
# QIANFAN_API_KEY=...
# DASHSCOPE_API_KEY=...
# ZAI_API_KEY=...
# SYNTHETIC_API_KEY=...
# OPENCODE_API_KEY=...
# OPENCODE_GO_API_KEY=...
# VERCEL_API_KEY=...
# CLOUDFLARE_API_KEY=...

# ── Gateway ──────────────────────────────────────────────────
# CONSTRUCT_GATEWAY_PORT=3000
# CONSTRUCT_GATEWAY_HOST=127.0.0.1
# CONSTRUCT_ALLOW_PUBLIC_BIND=false

# ── Storage ─────────────────────────────────────────────────
# Backend override for persistent storage (default: sqlite)
# CONSTRUCT_STORAGE_PROVIDER=sqlite

# ── Proxy ──────────────────────────────────────────────────
# Forward provider/service traffic through an HTTP(S) proxy.
# CONSTRUCT_PROXY_ENABLED=false
# CONSTRUCT_HTTP_PROXY=http://proxy.example.com:8080
# CONSTRUCT_HTTPS_PROXY=http://proxy.example.com:8080
# CONSTRUCT_ALL_PROXY=socks5://proxy.example.com:1080
# CONSTRUCT_NO_PROXY=localhost,127.0.0.1
# CONSTRUCT_PROXY_SCOPE=construct          # environment|construct|services
# CONSTRUCT_PROXY_SERVICES=openai,anthropic

# ── Optional Integrations ────────────────────────────────────
# Pushover notifications (`pushover` tool)
# PUSHOVER_TOKEN=your-pushover-app-token
# PUSHOVER_USER_KEY=your-pushover-user-key

# ── Docker Compose ───────────────────────────────────────────
# Host port mapping (used by docker-compose.yml)
# HOST_PORT=3000

# ── Z.AI GLM Coding Plan ───────────────────────────────────────
# Z.AI provides GLM models through OpenAI-compatible endpoints.
# API key format: id.secret (e.g., abc123.xyz789)
#
# Usage:
#   construct onboard --provider zai --api-key YOUR_ZAI_API_KEY
#
# Or set the environment variable:
# ZAI_API_KEY=your-id.secret
#
# Common models: glm-5, glm-4.7, glm-4-plus, glm-4-flash
# See docs/zai-glm-setup.md for detailed configuration.

# ── Web Search ────────────────────────────────────────────────
# Web search tool for finding information on the internet.
# Enabled by default with DuckDuckGo (free, no API key required).
#
# WEB_SEARCH_ENABLED=true
# WEB_SEARCH_PROVIDER=duckduckgo
# WEB_SEARCH_MAX_RESULTS=5
# WEB_SEARCH_TIMEOUT_SECS=15
#
# Optional: Brave Search (requires API key from https://brave.com/search/api)
# WEB_SEARCH_PROVIDER=brave
# BRAVE_API_KEY=your-brave-search-api-key
#
# Optional: SearXNG (self-hosted, requires instance URL)
# WEB_SEARCH_PROVIDER=searxng
# SEARXNG_INSTANCE_URL=https://searx.example.com
