Rolls back the claudification backend preference: PREFER_CLOUD_BACKEND now defaults to false, resolve_backend() picks Ollama first and uses Claude when explicitly preferred or when the new Ollama startup health check fails. The Steward retries mid-request failures on the other backend in both directions. Also hardens the fallback itself: Anthropic SDK imports are lazy so a broken anthropic package degrades to Ollama-only instead of crashing at import time (root cause of the production outage since April), anthropic is pinned to a pydantic-ai-1.27-compatible range, ANTHROPIC_MODEL defaults to claude-sonnet-5 (sonnet-4-20250514 retired 2026-06-15), sampling parameters are stripped from Claude calls (Sonnet 5 rejects them), and the Steward timeout is configurable (STEWARD_TIMEOUT, default 60s) since gemma4 needs ~35s warm for analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
64 lines
1.8 KiB
Bash
64 lines
1.8 KiB
Bash
# Application Configuration
|
|
APP_NAME="OpenAI-Compatible API"
|
|
ENVIRONMENT=development
|
|
DEBUG=false
|
|
|
|
# API Configuration
|
|
API_HOST=0.0.0.0
|
|
API_PORT=8000
|
|
API_PREFIX=/v1
|
|
|
|
# Ollama Configuration (local - primary backend)
|
|
OLLAMA_HOST=http://localhost:11434
|
|
OLLAMA_DEFAULT_MODEL=gemma4:e2b
|
|
OLLAMA_TIMEOUT=120
|
|
STEWARD_TIMEOUT=60
|
|
|
|
# Anthropic Configuration (Claude - cloud fallback)
|
|
# Set ANTHROPIC_API_KEY to keep the Claude fallback available: it is used
|
|
# automatically when Ollama is down, or exclusively when PREFER_CLOUD_BACKEND=true
|
|
# Without an API key, Tatlock uses Ollama only
|
|
# ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
|
|
ANTHROPIC_MODEL=claude-sonnet-5
|
|
PREFER_CLOUD_BACKEND=false
|
|
|
|
# SearXNG Configuration
|
|
SEARXNG_HOST=http://localhost:8087
|
|
SEARXNG_TIMEOUT=30
|
|
|
|
# Redis Configuration
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_MEMORY_DB=1
|
|
REDIS_TIMEOUT=5
|
|
|
|
# Qdrant Configuration
|
|
QDRANT_HOST=localhost
|
|
QDRANT_PORT=6333
|
|
|
|
# Logging
|
|
# LOG_LEVEL is auto-selected based on ENVIRONMENT if not set:
|
|
# - development: DEBUG (maximum verbosity)
|
|
# - production: WARNING (minimal noise)
|
|
# Uncomment to override: LOG_LEVEL=INFO
|
|
# Note: Log format is auto-selected based on ENVIRONMENT (console for dev, json for production)
|
|
|
|
# User Configuration
|
|
# DEFAULT_USER is auto-selected based on ENVIRONMENT if not set:
|
|
# - development/testing: llm_tester (isolated test scope)
|
|
# - production: jpmschweitzer (real user)
|
|
# Uncomment to override: DEFAULT_USER=your_username
|
|
|
|
# Library-Desk Configuration (The Librarian backend)
|
|
# LIBRARY_DESK_HOST=http://localhost:8089
|
|
# LIBRARY_DESK_API_KEY=your-library-desk-api-key
|
|
# LIBRARY_DESK_TIMEOUT=60
|
|
|
|
# Core-API Configuration (The Housekeeper backend)
|
|
# CORE_API_HOST=http://localhost:8090
|
|
# CORE_API_KEY=your-core-api-key
|
|
# CORE_API_TIMEOUT=30
|
|
|
|
# CORS (comma-separated list)
|
|
CORS_ORIGINS=["*"]
|