Providers

Caravan speaks the OpenAI chat-completions dialect to every backend through one engine (CaravanProviders.Openai_compatible), configured by a single data table (CaravanProviders.Registry). Run caravan providers to see this table live, with key status for your environment.

NameKindKey env varDefault model
ollamalocal—llama3.2
llama_cpplocal—default (whatever is loaded)
vllmlocal—default
lmstudiolocal—default
openaicloudOPENAI_API_KEYgpt-4o-mini
anthropiccloudANTHROPIC_API_KEYclaude-sonnet-5
groqcloudGROQ_API_KEYllama-3.3-70b-versatile
openroutercloudOPENROUTER_API_KEYmeta-llama/llama-3.3-70b-instruct
togethercloudTOGETHER_API_KEYmeta-llama/Llama-3.3-70B-Instruct-Turbo
deepseekcloudDEEPSEEK_API_KEYdeepseek-chat
mistralcloudMISTRAL_API_KEYmistral-small-latest
geminicloudGEMINI_API_KEYgemini-2.0-flash
xaicloudXAI_API_KEYgrok-3-mini
cerebrascloudCEREBRAS_API_KEYllama-3.3-70b
github_modelscloudGITHUB_TOKENopenai/gpt-4o-mini
nvidiacloudNVIDIA_API_KEYmeta/llama-3.3-70b-instruct

Model names drift faster than any table: caravan models (live, per provider) is authoritative, and the free-tier guide covers the zero-cost entries in detail.

Key resolution order

  1. The provider's environment variable (ANTHROPIC_API_KEY, …) — preferred;
  2. [api_keys] <provider> = "…" in ~/.caravan/config.toml (file is 0600);
  3. legacy openai_api_key top-level key (openai only).

A model for every weight class

caravan providers --ladder prints a curated pick per size:

ClassSuggestionNote
tiny ~1Bollama / llama3.2:1bruns on a laptop CPU
small ~4Bollama / qwen3:4bfast local reasoning
medium ~20Bollama / gpt-oss:20bstrong local, ~16 GB
large ~70Bgroq / llama-3.3-70b-versatileopen weights, hosted fast
frontieranthropic / claude-sonnet-5, openai / gpt-4o, gemini / gemini-2.5-pro

Notes and caveats

  • Anthropic and Gemini are reached through their official OpenAI-compatible endpoints, so tool calling and streaming work through the same code path as everyone else. A few provider-specific parameters (e.g. Anthropic's fine-grained thinking controls) are not exposed through that compatibility surface; if you need them, add a bespoke provider module — the PROVIDER signature is four functions.
  • Any other OpenAI-compatible server (text-generation-inference, llamafile, a lab-internal gateway): use --base-url (or base_url in the config) together with -p openai, plus OPENAI_API_KEY if the gateway wants auth.
  • TLS: certificates are verified against the system CA store, with hostname checking. CARAVAN_TLS_INSECURE=1 disables verification for self-signed lab endpoints (a warning is printed).