Point Liminal at OpenRouter when you want one API key, dozens of models, and per-task routing between a main ReAct model and a fast sidecar model.
Canonical guide: /liminal/guides/openrouter. Docs: docs.vireondynamics.com/liminal/.
Minimum .env
AGENT_API_KEY=sk-or-v1-...
AGENT_API_BASE_URL=https://openrouter.ai/api/v1
AGENT_MODEL=deepseek/deepseek-v4-pro
AGENT_FAST_MODEL=deepseek/deepseek-v4-flash
AGENT_API_KEY is the OpenRouter key. The harness uses the OpenAI-compatible chat completions API.
What runs on which model
| Workload | Typical model | Env |
|---|---|---|
| Full ReAct loop (tools, many rounds) | Main | AGENT_MODEL |
| Intent, distill, rewrite, safety judge, workflow summarize | Fast | AGENT_FAST_MODEL |
Embeddings for recall_relevant | Embed slug | AGENT_EMBED_MODEL |
| Vision sidecar | Separate | AGENT_VISION_MODEL |
Comparison table
Sidecar calls (AGENT_RECALL_EVERY_N, AGENT_QUERY_REWRITE, AGENT_MEMORY_AUTO_EXTRACT, AGENT_SELF_HEAL_LINT, AGENT_SAFETY_JUDGE) are off by default — each enables an extra completion per turn or pass.
Provider pinning and prompt cache
Defaults pin DeepInfra (or your chosen order) via AGENT_PROVIDER_ORDER / AGENT_PROVIDER_ORDER_FAST with AGENT_PROVIDER_ALLOW_FALLBACKS=0 so prompt cache hits stay warm on rounds 2+ of a turn (AGENT_PROMPT_CACHE=1 adds cache_control: ephemeral on the static system prefix). Cache hit rate is logged in session JSONL.
Turn on fallbacks only when you prefer availability over cache economics.
Embeddings for memory (optional but recommended)
AGENT_EMBED_MODEL=qwen/qwen3-embedding-8b
Empty string = BM25-only recall. With embeddings, note and vault indexes live under ~/.liminal/ and power hybrid ranking in recall_relevant.
Install and verify
curl -fsSL https://www.vireondynamics.com/install/install.sh | bash
cd liminal-ai # or your clone path
# add .env, then:
npm run web
Send a message that uses tools (e.g. “list git status and remember the branch name”). Check .agent_sessions/*.jsonl for provider lines and tool traces.
Why OpenRouter + Liminal (not a hosted seat)
- You pay OpenRouter directly for tokens.
- Community Edition does not require a Vireon subscription.
- Same harness works if you later point
AGENT_API_BASE_URLat OpenAI, Anthropic, or Ollama.