Skip to content
VerifAIer
Home / Docs / Operations / Configuration & env vars
Operations · Configuration

Configuration & environment variables

Every configuration surface in one place: the dependency baseline, the full environment-variable reference, and the provider configuration model.

Configuration reference

VerifAIer is configured entirely by environment variables (12-factor). There is no config file to edit; copy .env.example to .env and set values, or inject env vars via your platform. The runtime baseline:

.env.example · pyproject.toml · providers/config.py · auth/config.py · security/secrets.py
ItemValue
Python≥ 3.12 (container base python:3.12-slim)
Core dependenciesfastapi≥0.115, uvicorn[standard]≥0.32, anthropic≥0.40, pydantic≥2.9, pydantic-settings≥2.6, jsonschema≥4.23
Optional extrasdev (pytest/httpx/ruff), enterprise (cryptography), anchoring (web3)
Package version2.0.0-alpha (API/service version reported by /health is 1.4.2)
DatastoreSQLite by default (DB_PATH); optional PostgreSQL via DATABASE_URL
Never commit .env. _build.py excludes .env and every .env.* except .env.example from the shipped artifact. Only .env.example (placeholders) is tracked.

Environment variable reference

Every variable, its default, and what it does. Unset optional variables fall back to safe defaults; the app never crashes on a missing key.

VariableDefaultPurpose
AI providers: see provider configuration
VERIFAIER_DEFAULT_PROVIDERmockdefault provider (mock/gemini/openai/anthropic)
VERIFAIER_PROVIDER_MODEmockmock (no network) or live
VERIFAIER_ENVdevelopmentprovider-config env; production reports missing config
VERIFAIER_ENABLE_GEMINI/OPENAI/ANTHROPICfalseper-provider enable flags
VERIFAIER_PROVIDER_FALLBACKSemptyordered fallback chain (comma-separated)
GEMINI_API_KEY / GOOGLE_API_KEYn/aGemini key (GOOGLE_ as fallback)
OPENAI_API_KEY / ANTHROPIC_API_KEYn/aprovider keys (server-side only)
GEMINI_MODELgemini-2.5-flash-liteGemini model override
OPENAI_MODELgpt-4o-miniOpenAI model override
ANTHROPIC_MODELclaude-opus-4-8Anthropic model override
Application
APP_ENVproductionruntime environment label
LOG_LEVELINFOlog level (DEBUG…CRITICAL)
CORS_ORIGINS["*"]allowed origins (JSON array), restrict in prod
Database
DB_PATH<root>/vailidator.dbSQLite file path (Docker: /app/data/vailidator.db)
DATABASE_URLunset → SQLiteoptional PostgreSQL (postgresql://…)
Auth & sessions
SESSION_SECRETephemeral if unsetHMAC key, required in production
AUTH_COOKIE_NAMEvai_sessionsession cookie name
AUTH_TOKEN_TTL28800session lifetime, seconds
AUTH_COOKIE_SECUREfalseset true on HTTPS/prod
AUTH_COOKIE_SAMESITElaxlax / strict / none
Control Center & rate limit
CC_API_KEYemptypre-fill dashboard key field (never a real key in .env.example)
CC_PBKDF2_ITERATIONS100000PBKDF2 iterations (OWASP min); lower only in test
RATE_LIMIT_LOGIN_RPW20login attempts per window (per IP)
RATE_LIMIT_LOGIN_WINDOW900login window, seconds
Billing (optional)
STRIPE_SECRET_KEY / STRIPE_PUBLISHABLE_KEY / STRIPE_WEBHOOK_SECRETn/aStripe integration (webhook 503 if secret unset)
Dashboards & misc
API_URLhttp://localhost:8000backend URL as seen by Streamlit (compose: http://api:8000)
FR_SIGNING_KEYbuilt-in dev seedFlight Recorder HMAC seed, set random in prod
VERIFAIER_MEMORY_VAULT.verifaier/memoryMemory Receipt vault root
VAI_SERVER_VERBOSE0verbose sentinel server output
VAI_FUJI_RPC / VAI_FUJI_PRIVATE_KEYn/aoptional blockchain anchoring (not required)

Provider configuration

The AI provider layer is off by default and deterministic. A live provider runs only when three conditions all hold, otherwise the router skips it and falls back to the offline mock:

env

# enable a live provider (all three required)
VERIFAIER_ENABLE_OPENAI=true      # 1) enabled
OPENAI_API_KEY=sk-...             # 2) key present (read server-side only)
VERIFAIER_PROVIDER_MODE=live      # 3) live mode
VERIFAIER_DEFAULT_PROVIDER=openai
VERIFAIER_PROVIDER_FALLBACKS=gemini   # optional ordered fallback; mock is always last
  • Default is mock: deterministic, offline, zero egress, safe for local and CI.
  • Presence only: keys are read from the environment at call time; the config object stores boolean presence, never the value.
  • Production reporting: with VERIFAIER_ENV=production, missing required provider config is reported explicitly (without exposing values) rather than failing silently.

Full routing semantics are in the provider routing engineering doc; the key-safety model is in secret handling.