MINARA

LLM providers

LLM providers (required — at least one must be set, unless you use an OAuth profile via `minara auth login`)

The default model is NOT read from .env — it persists to settings.json#model. Change it with minara config model use <id>, /model <id> in the REPL, or the web UI Provider & Model page.

ANTHROPIC_API_KEY

primary LLM provider.

  • What it controls: authenticates every Claude completion the agent loop makes (src/core/agent-loop.ts → src/llm/anthropic-*.ts).
  • Consumed by: src/llm/select-provider.ts when choosing the Anthropic client path (also honoured by ops tooling under src/llm/anthropic-api-key.ts / anthropic-oauth.ts).
  • When to set: you're running the agent with a raw API key instead of a stored OAuth profile. Get one at https://console.anthropic.com.
  • When unset: the agent falls back to (a) the device-flow OAuth profile saved by minara auth login claude, then (b) OPENROUTER_API_KEY. If none of the three are available the agent refuses to start.
  • Format: opaque string, typically prefixed sk-ant-....
  • Setting home: LLM provider credential (Settings → Provider & Model)

OPENROUTER_API_KEY

alternative LLM router covering many models.

  • What it controls: authenticates completions routed through OpenRouter (src/llm/openrouter.ts) when Anthropic credentials are not present or when AGENT_MODEL names an OpenRouter model.
  • Consumed by: src/llm/select-provider.ts (secondary provider).
  • When to set: you want to run the agent against a non-Anthropic model (Llama, DeepSeek, Gemini, etc.) via OpenRouter.
  • When unset: only Anthropic / OAuth paths are tried.
  • Format: opaque string starting with sk-or-....
  • Setting home: LLM provider credential (Settings → Provider & Model)

XAI_API_KEY

native xAI (Grok) LLM provider key.

  • What it controls: direct calls to https://api.x.ai/v1 via the xai-api-key LLM provider — bypasses OpenRouter for lower latency and no router markup. The native xAI client is OpenAI-compatible at the wire level (src/llm/xai-api-key.ts reuses openai-wire.ts).
  • Consumed by: src/llm/select-provider.ts (xAI is lowest-precedence in auto-select; the env var triggers xai-api-key only when no other provider profile or env var is present).
  • When to set: you have an xAI console key and want native Grok routing.
  • When unset: Grok is still reachable via OpenRouter (x-ai/grok-4).
  • Format: opaque string from https://console.x.ai/.
  • Setting home: LLM provider credential (Settings → Provider & Model)

KIMI_API_KEY

KIMI_API_KEY: native Kimi LLM provider key.

  • What it controls: authenticates direct Kimi chat and model-catalog requests through https://api.moonshot.ai/v1.
  • Consumed by: src/llm/select-provider.ts, the kimi-api-key loader in src/llm/v2/custom-loaders.ts, and the Kimi model-catalog fetcher.
  • When to set: you have a Kimi API platform key and want to use Kimi models directly instead of routing them through OpenRouter.
  • When unset: the direct Kimi provider is unavailable; Kimi models may still be available through another configured aggregator.
  • Format: opaque string created at https://platform.kimi.ai/.
  • Setting home: LLM provider credential (Settings → Provider & Model)

XAI_BASE_URL

optional override for the xAI API base URL.

  • What it controls: where xai-api-key + xai-oauth clients send requests.
  • Default: https://api.x.ai/v1
  • When to set: targeting a staging endpoint or a proxy.
  • When unset: official api.x.ai endpoint is used.
  • Setting home: Not a user-facing setting

MINARA_XAI_OAUTH_CLIENT_ID

override the xAI OAuth client_id.

  • What it controls: which OAuth public client_id Minara sends to auth.x.ai when running minara auth login xai (OAuth browser flow).
  • Default: xAI's official Grok-CLI public client_id, also used by Hermes Agent and shared openly per their public source. RFC 8252 §8.4 permits reusing public clients across native apps, but xAI may revoke without notice.
  • When to set: xAI has minted Minara its own registered client_id.
  • When unset: shared Grok-CLI id is used and a one-time stderr warning is emitted on first minara auth login xai.
  • Format: UUID-style string.
  • Setting home: Not a user-facing setting

Ollama Cloud

OLLAMA_API_KEY

Ollama Cloud LLM provider key.

  • What it controls: authenticates the agent against Ollama Cloud (https://ollama.com), which serves open models (gpt-oss, deepseek, qwen3-coder, kimi-k2, ...) over an OpenAI-compatible endpoint.
  • Consumed by: src/llm/v2/custom-loaders.ts (the ollama loader), src/gateway/auth-cli.ts (minara auth login ollama), and src/gateway/model-registry.ts (the /api/tags catalog fetch).
  • When to set: you want Ollama Cloud models. Create a key at https://ollama.com/settings/keys.
  • When unset: the ollama provider is unavailable; the agent uses another configured provider.
  • Format: opaque string from ollama.com/settings/keys.
  • Setting home: LLM provider credential (Settings → Provider & Model)

OLLAMA_BASE_URL

optional override for the Ollama host.

  • What it controls: where the ollama loader + catalog fetch send requests. Point it at a self-hosted / enterprise Ollama server, or a local instance (http://localhost:11434).
  • Default: https://ollama.com (Ollama Cloud).
  • When to set: targeting a non-cloud Ollama host.
  • When unset: Ollama Cloud is used.
  • Format: absolute URL, no trailing slash.
  • Setting home: Not a user-facing setting

On this page