Build

Models & providers

Bring any model from any provider — no lock-in. Paste your key once (stored privately, never committed), routing is yours, cost is tracked.

Excalibur is model-agnostic. A model gateway routes each task to a provider you control — bring your own key, run locally, or mix models per task. You paste your key once; it's saved to a private local secrets file (~/.config/excalibur/secrets.env, owner-only 0600) and never written to .excalibur/ or committed.

Supported providers

The first-run picker leads with the recommended coding models, then the rest — navigate with ↑/↓ or just type to filter ("deep" → DeepSeek):

GroupProviders
RecommendedKimi K2 (Moonshot), MiniMax, GLM (Zhipu / Z.ai)
Subscription or APIAnthropic (Claude), OpenAI, Google Gemini
APIDeepSeek, OpenRouter, Groq, xAI (Grok), Cerebras, Together, Fireworks
LocalOllama (auto-detected), self-hosted (vLLM / TGI / your own endpoint)

Anything OpenAI-compatible works even if it's not listed — point the self-hosted option at your endpoint.

Connect a provider

You're usually connected already — the first excalibur run sets up a model (one key auto-pairs a good + fast model), and any command run without one prompts you on the spot. A deterministic mock runs zero-config until you connect a real model. To switch or add providers later, run models setup — or pick interactively in-shell with the /models picker (/model shows the active one):

excalibur — models setup
/model setup
which model provider? ↑/↓ · type to filter · enter
❯ Kimi K2 (Moonshot) — recommended · MiniMax · GLM · Anthropic · …
paste your API key › ••••••••••••saved to ~/.config/excalibur/secrets.env · 0600
connected · kimi-k2.7-code responded in 0.8s — the recommended default
.excalibur/ stores only the env var NAME — the key value never lands in your repo

Key already in your environment? Excalibur detects an exported provider key and offers it in one keystroke — no pasting needed.

excalibur models setup      # interactive
excalibur models list       # what's configured

One key, a good pair. From a single provider key, Excalibur auto-pairs a capable model (planning + building) and a fast one (quick turns, ghost-text, the loop evaluator) — zero extra config. Switch the active model any time with /model in the shell.

Configuration

Providers live in .excalibur/models/providers.yaml — committed and secret-free: it records only the name of the env var that holds the key (apiKeyEnv). The pasted value lives in ~/.config/excalibur/secrets.env (0600), loaded into the environment on launch:

# .excalibur/models/providers.yaml
providers:
  moonshot:
    type: openai-compatible
    baseUrl: https://api.moonshot.ai/v1
    apiKeyEnv: MOONSHOT_API_KEY          # the name, never the value
  anthropic:
    type: anthropic
    apiKeyEnv: ANTHROPIC_API_KEY
models:
  build: moonshot/kimi-k2.7-code         # the recommended default
  fast: anthropic/claude-haiku

Route models per task, path or repo:

# .excalibur/config.yaml
modelRouting:
  default: build
  byTaskType: { discovery: fast, review: build }
  byPath: { "src/payments/**": build }    # strongest model on the money path

Cost, tokens & privacy

  • Token counts (in/out/cache) and cost are tracked per task and per phase — live in the status line, summarized at the end, persisted to run.json.
  • Secrets are redacted from prompts and logs before anything is sent or stored.
  • Nothing about your code or keys is sent anywhere except the provider you chose.

Use a provider's own CLI. Prefer to drive an official provider CLI with its own subscription/auth? Use the passthrough adapter — Excalibur orchestrates workflow, autonomy and safety around it. See Extensions.

Run fully local

ollama pull qwen2.5-coder
excalibur models setup        # choose Ollama (auto-detected)

Next

  • Autonomy levels — pair the right model with the right level.
  • Extensions — add a custom provider or the passthrough adapter.