Model Routing
Configure four-slot OpenRouter model routing, local Ollama, Claude Code CLI mode, and reasoning latency controls.
MiroShark splits LLM calls across four slots so high-volume agent turns stay cheap while reasoning-heavy steps use stronger models.
Four slots, one key
Paste one OpenRouter key into LLM_API_KEY, EMBEDDING_API_KEY, and OPENAI_API_KEY (or override per slot with SMART_API_KEY, NER_API_KEY, WONDERWALL_API_KEY).
| Slot | Env var | Default | Role |
|---|---|---|---|
| Default | LLM_MODEL_NAME | inception/mercury-2:nitro | Profiles, simulation config, memory compaction. |
| Smart | SMART_MODEL_NAME | google/gemini-3-flash-preview | #1 quality lever: reports, ontology, graph reasoning, market framing. |
| Wonderwall | WONDERWALL_MODEL_NAME | deepseek/deepseek-v4-flash:nitro | #1 cost driver: the multi-turn agent simulation loop. |
| NER | NER_MODEL_NAME | google/gemini-3-flash-preview | Structured JSON entity extraction. |
| Embeddings | EMBEDDING_MODEL_NAME | text-embedding-3-large | Graph edge embeddings (OpenRouter or local Ollama). |
| Reranker | - | BGE-reranker-v2-m3 | Local cross-encoder (~1 GB download; MPS / CUDA / CPU). |
Local & low-latency options
- Claude Code mode (
#models-claude-code-mode): SetLLM_PROVIDER=claude-codeto route prompts through the localclaudeCLI with no API key. - Local Ollama (
#models-local-ollama): First-class support via Docker or manual local Ollama endpoints. - Reasoning off by default (
#models-cot-toggle):LLM_DISABLE_REASONING=truepassesreasoning: { enabled: false }on OpenRouter calls, cutting suggest latency from ~45s to ~3s.