> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ziro-agent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Provider keys, model tiers, runtime switches, and the storage mode selector.

This page will document every environment variable Ziro reads, and where each one
is stored. Most live in the layered `.env` chain that the setup wizard writes to
`~/.ziro/.env`, so you rarely set them by hand.

**Provider credentials and defaults:** `OPENROUTER_API_KEY`, `OPENROUTER_MODEL`,
`OPENROUTER_BASE_URL`, `OPENROUTER_HEADERS`; the matching `ANTHROPIC_*` and
`OPENAI_*` pairs; and `<LABEL>_API_KEY` for a custom provider label registered in
`~/.ziro/custom_providers.json`.

**Model tiers:** `<PROVIDER>_<TIER>_MODEL` for the `planning`, `execution`, and
`fast_execution` roles (for example `OPENROUTER_EXECUTION_MODEL`). Each collapses
to `<PROVIDER>_MODEL` when unset, and a `${EXECUTION_MODEL}`-style token resolves
against whichever provider is active at build time.

**Cross-provider switches:** `ZIRO_LLM_PROVIDER` (default `openrouter`; an
unknown value degrades to it rather than crashing), `ZIRO_REASONING_EFFORT`,
`ZIRO_MAX_RETRIES`, and `ZIRO_RETRY_BASE_DELAY`. Each has an `OPENROUTER_*`
back-compat fallback.

**Runtime and storage:** `DATABASE_URL` selects prod mode (Postgres plus PGVector)
over dev mode (SQLite plus FAISS); `ZIRO_STRICT_SECURITY` forces dangerous plugin
grants inert; `ZIRO_EMBEDDINGS_OFFLINE` and `HF_HUB_OFFLINE` control Hugging Face
network checks at startup; `ZIRO_HOME` relocates the user config root; and
`ZIRO_PYPI_HOST` sets the release index `ziro upgrade` pulls from. Tracing uses the
Langfuse keys `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, and `LANGFUSE_HOST`.

<Note>
  This page is in progress. See the [providers guide](/guides/providers) for how the
  provider and model resolve as one coupled pair.
</Note>

<Columns cols={2}>
  <Card title="Providers" icon="plug" href="/guides/providers">
    Built-in providers, custom endpoints, and model tiers.
  </Card>

  <Card title="Installation" icon="rocket" href="/installation">
    Where the wizard writes these values.
  </Card>
</Columns>
