# ============================================================================= # Web Module — Environment Configuration # ============================================================================= # Copy this file to .env and fill in the values marked with CHANGE_ME. # All variables use the WEB_ prefix. # ============================================================================= # ----------------------------------------------------------------------------- # REQUIRED — Search (SearXNG metasearch) # ----------------------------------------------------------------------------- # SearXNG base URL (internal Docker hostname or LAN IP). # If you already have a SearXNG running elsewhere, point to it here. WEB_SEARXNG_BASE_URL=http://didiAI-web-searxng:8080 # ----------------------------------------------------------------------------- # REQUIRED — External URL for OpenAPI spec (Swagger / catalog) # ----------------------------------------------------------------------------- # The publicly reachable URL where this web-api is exposed. WEB_EXTERNAL_URL=http://localhost:51100 # ----------------------------------------------------------------------------- # REQUIRED — Remote LLM inference (runs on the GPU machine) # ----------------------------------------------------------------------------- # URL of your llm-inference router (Qwen3.5-35B vLLM or similar). # Used by the free tier for context detection + evidence extraction. WEB_LLM_BASE_URL=CHANGE_ME_http://your-gpu-host:14011 # Text model name served by the LLM endpoint WEB_TEXT_MODEL=qwen3.5 # Vision model — usually same endpoint + model (Qwen3.5 is multimodal) WEB_VISION_BASE_URL=CHANGE_ME_http://your-gpu-host:14011 WEB_VISION_MODEL=qwen3.5 # Optional API key if your LLM endpoint enforces auth # WEB_LLM_API_KEY= # ----------------------------------------------------------------------------- # OPTIONAL — Paid search providers (used by premium tier) # ----------------------------------------------------------------------------- # Leave blank if you don't have a subscription. If all are blank, # premium tier returns no search results. # WEB_SERPAPI_API_KEY=CHANGE_ME_or_leave_blank # WEB_TAVILY_API_KEY=CHANGE_ME_or_leave_blank # WEB_BRAVE_API_KEY=CHANGE_ME_or_leave_blank # WEB_LINKUP_API_KEY=CHANGE_ME_or_leave_blank # WEB_EXA_API_KEY=CHANGE_ME_or_leave_blank # ----------------------------------------------------------------------------- # OPTIONAL — OpenRouter (premium tier LLM) # ----------------------------------------------------------------------------- # When set, premium tier routes all context + evidence LLM calls to # OpenRouter instead of your local Qwen. Model is runtime-configurable # via the dashboard. # WEB_OPENROUTER_API_KEY=CHANGE_ME_sk-or-v1-... WEB_OPENROUTER_MODEL=google/gemini-3.1-flash-lite-preview # ----------------------------------------------------------------------------- # OPTIONAL — Dashboard event sink # ----------------------------------------------------------------------------- # When set, web-api forwards every request event (tier, duration, cost, # results) to the dashboard and polls /api/config every 30s for runtime # overrides. Leave blank to run without the dashboard. WEB_DASHBOARD_URL=http://didiAI-dashboard:51300 # WEB_DASHBOARD_TOKEN= # optional if dashboard ingest requires auth # ----------------------------------------------------------------------------- # OPTIONAL — External LLM fallback (used when local is down) # ----------------------------------------------------------------------------- # WEB_OPENAI_API_KEY= # WEB_ANTHROPIC_API_KEY= # ----------------------------------------------------------------------------- # OPTIONAL — Server settings # ----------------------------------------------------------------------------- # WEB_HOST=0.0.0.0 # WEB_PORT=51100 # ----------------------------------------------------------------------------- # OPTIONAL — Search defaults # ----------------------------------------------------------------------------- # WEB_SEARCH_DEFAULT_MAX_RESULTS=10 # WEB_SEARCH_DEFAULT_LANGUAGE=en # WEB_SEARCH_DEFAULT_COUNTRY=US # ----------------------------------------------------------------------------- # OPTIONAL — Fetch & Browse tuning # ----------------------------------------------------------------------------- # WEB_FETCH_TIMEOUT=30.0 # WEB_FETCH_MIN_TEXT_LENGTH=200 # WEB_BROWSE_TIMEOUT=30000 # WEB_BROWSE_VIEWPORT_WIDTH=1280 # WEB_BROWSE_VIEWPORT_HEIGHT=720 # WEB_BROWSE_BLOCK_RESOURCES=true # WEB_BROWSE_EXTRA_WAIT_MS=500 # ----------------------------------------------------------------------------- # OPTIONAL — Vision / Evidence tuning # ----------------------------------------------------------------------------- # WEB_VISION_MAX_TOKENS=2000 # WEB_VISION_SCREENSHOT_QUALITY=80 # WEB_EVIDENCE_MAX_ITEMS=30 # WEB_EVIDENCE_MAX_SNIPPET_LENGTH=500 # WEB_EVIDENCE_DEDUPE_THRESHOLD=0.9 # ----------------------------------------------------------------------------- # OPTIONAL — Rate limiting & concurrency # ----------------------------------------------------------------------------- # WEB_RATE_LIMIT_RPS=10.0 # WEB_RATE_LIMIT_BURST=20 # WEB_MAX_CONCURRENT_REQUESTS=10 # ----------------------------------------------------------------------------- # OPTIONAL — Timeouts & retries # ----------------------------------------------------------------------------- # WEB_REQUEST_TIMEOUT=30.0 # WEB_CONNECT_TIMEOUT=10.0 # WEB_MAX_RETRIES=3 # ----------------------------------------------------------------------------- # OPTIONAL — Logging # ----------------------------------------------------------------------------- # WEB_LOG_LEVEL=INFO # WEB_LOG_JSON=false # ----------------------------------------------------------------------------- # OPTIONAL — Authentication (comma-separated Bearer tokens) # ----------------------------------------------------------------------------- # If set, all /v1/* endpoints require Authorization: Bearer . # Leave blank to run open (fine for VPN-internal deployments). # WEB_API_TOKENS=token1,token2