Skip to content

Providers & Secrets

Cvelio uses lightweight standard-library HTTP clients (urllib.request) with zero third-party LLM SDK dependencies.

Supported providers

Provider API key env var Default model Base URL override
anthropic ANTHROPIC_API_KEY claude-opus-5-5 ANTHROPIC_BASE_URL
gemini GEMINI_API_KEY gemini-3.8-flash GEMINI_BASE_URL
openrouter OPENROUTER_API_KEY ~openai/gpt-terra-latest OPENROUTER_BASE_URL

When you pass PROVIDER=anthropic (or gemini / openrouter), Cvelio automatically selects that provider’s default model.

Model & provider precedence

Model selection (most specific wins):

  1. Explicit MODEL= / --model argument
  2. <PROVIDER>_MODEL (e.g., OPENROUTER_MODEL, ANTHROPIC_MODEL, GEMINI_MODEL)
  3. CVELIO_MODEL
  4. Provider’s built-in default model

Provider selection (when building a single variant):

  1. Explicit PROVIDER= / --provider
  2. CVELIO_PROVIDER
  3. First available configured provider in order: anthropic → gemini → openrouter

Retry and error handling

Transient HTTP errors (429, 500, 502, 503, 529) automatically retry up to twice with backoff (4s, 8s). Invalid JSON model completions retry once automatically. Terminal HTTP errors (such as 401 invalid key or 402 insufficient credits) fail immediately without wasting retries; during multi-template builds, successful variants from healthy providers are still rendered and compared.

Storing API keys

Secrets resolve in this order:

  1. Shell environment or local .env file in the working directory (existing shell vars are never overwritten by .env)
  2. env: section in ~/.config/cvelio/config.yaml
  3. AWS Systems Manager Parameter Store (configured during make init or via CVELIO_SSM_PREFIX / CVELIO_SSM_REGION)

Example ~/.config/cvelio/config.yaml:

voice: implied
gender: neutral
watermark_fill: 0.8
aws_ssm:
prefix: /myteam/keys
region: us-east-1
names:
anthropic: anthropic
gemini: gemini
openrouter: openrouter
apify: apify
env:
OPENROUTER_MODEL: "~openai/gpt-terra-latest"