Skip to main content

Model Configuration

Myrm uses LiteLLM for unified access to 100+ models from 28 built-in providers, with three compatibility protocols (OpenAI-like, Gemini-like, Anthropic-like) for infinite custom provider extension. Each built-in provider comes with pre-filled API URLs and supports one-click domestic/international region switching — truly zero-configuration ready.

First-Time Setup

Local and desktop installs open straight on the home page — there is no setup wizard. Until a model provider is enabled, a banner above the message box points you to it:
  • Configure: opens Settings > Models. Pick a provider (its API URL is already filled in), add your key and enable the models you want.
  • Have subscriptions? Connect in 1-Click: connects an xAI SuperGrok subscription through the official device-code flow, so you get Grok models without an API key.
  • Use Ollama: model-name: shown only when a local Ollama is running and has an installed model that can both chat and call tools. Embedding-only models and cloud-routed models are skipped, and when several models qualify the first one Ollama lists is used (only the first five local models are checked). One click enables the built-in Ollama provider at the address that was probed (so OLLAMA_HOST setups work) and fills the default model only if you have not picked one yet. Hosted workspaces never show it.
  • Local models: Settings > Models accepts a local Ollama or any OpenAI-compatible endpoint like any other provider (see Local Models).
Hosted workspaces keep a first-run wizard with two extra steps:
  • Smart Routing onboarding: When two or more models are configured, the wizard offers a one-click Smart Routing activation. It auto-classifies your models into quick/standard/reasoning tiers and shows estimated cost savings (40–70%). Enable it to automatically route simple messages to lighter models while reserving powerful models for complex tasks.
  • Workspace theme pick: As the final wizard step, choose one of three curated Theme Profiles (Official Default, Calm Readable, Ocean) or skip to keep the default. Your choice syncs via ConfigSync to chat, kanban, and settings — and Agent HTML widgets inherit the same colors automatically.
All three deployment modes (Local WebUI, Tauri Desktop, Cloud-hosted) share the same configuration UI in Settings > Models.

Cloud (Hosted): Zero-Configuration by Default

In Cloud-hosted mode you can start chatting without configuring anything. When your dedicated sandbox first boots, Myrm automatically provisions a platform-hosted lite model (routed through the control plane’s LLM Relay):
  • Type and go — a platform-hosted model is ready the moment your sandbox starts. No API key, no provider setup, no model selection required.
  • Bring Your Own Key later — connect your own provider credentials in Settings > Models at any time to use your preferred models and quotas.
  • Never overwrites your setup — the automatic provisioning is idempotent: if you (or a team admin) have already configured providers, your configuration is left untouched. You always keep full control.
  • One meter, one budget — usage of the platform-hosted model draws from the same transparent Work Unit balance as everything else.

Adding API Keys

Navigate to Settings > Models and add the provider key there. Every provider keeps its own key and Myrm stores it encrypted in the local data directory — provider credentials are not read from environment variables.

Smart Routing

The 3-dimensional complexity router automatically selects the optimal model based on task requirements, privacy sensitivity, and provider health: Phase 1 — Rule Engine (zero LLM cost): Multi-dimensional scoring across 6 signal types — keywords (30+ bilingual), code blocks, math/LaTeX, URLs/file paths, images, and message length. 99% of requests resolve instantly. Phase 2 — LLM Judge (ambiguous only): For borderline cases, a lightweight judge model classifies the query. Results are SHA-256 cached (5-min TTL, 256-entry LRU) to avoid repeated calls. Session Momentum: Short follow-ups (e.g., “ok”, “yes”) inherit the session’s complexity tier instead of being downgraded to SIMPLE. Message-length-based weight decay ensures long messages are classified independently. User Model Preference Memory (Dialectic Derivation): The Harness memory extraction engine automatically derives user model affinities and task-model associations in background passes (e.g. Claude 3.7 for coding, DeepSeek-R1 for reasoning), persisting structured model_affinity profiles. Strictly adhering to the “Explicit Config > Global Default > Preference Suggestion” hierarchy, it delivers transparent personalized recommendations while preserving 100% prompt cache stability. Fast Lane: Tasks classified as SIMPLE skip the heavy middleware pipeline and go directly to the model with minimal overhead. This reduces response latency by ~30-50% for everyday chat, greetings, and short follow-ups — the messages you send most often feel the fastest.

Model Speed Test

Before committing to a model, test its real-world performance right from Settings. Go to Settings > Model Service and click the speed test button in the top-right corner. What it measures:
  • TTFT (Time to First Token) — How quickly the model starts responding
  • TPS (Tokens per Second) — Sustained generation throughput
  • Total tokens — Full response length for the test prompt
How to use:
  • Click Run All to benchmark every enabled model in sequence
  • Click the retry icon on any individual model to retest it
  • Results show success/error status with color-coded badges
Speed test results reflect your actual network conditions and API key quotas — not synthetic benchmarks. Combined with Smart Routing’s automatic model selection, you get data-driven confidence that the right model is handling each task.

Thinking Intensity Control

For reasoning-capable models (Claude 3.7+, o1/o3/o4-mini, Gemini 2.5, DeepSeek R1, DeepSeek-Reasoner, Qwen3, etc.), Myrm provides fine-grained control over how deeply the model “thinks” alongside intelligent multi-tier onboarding routing. Hybrid Open/Closed-Source Smart Routing (Onboarding): In the Smart Routing step of a hosted workspace’s setup wizard, Myrm natively reuses the rigorously tested single source of truth (isReasoningModelByName) to accurately identify official deepseek-reasoner and front-line thinking models. When both self-hosted local endpoints (Ollama / split-stack LAN) and commercial cloud models are detected, the system heuristically recommends the local model for zero-marginal-cost routine throughput (lite) and the cloud frontier model for complex fallback reasoning (reasoning), reducing overall API expenses by 75%+ out of the box. 6 preset levels: Off / Low / Medium / High / Extra High / Max — covering everything from quick answers to deep multi-step reasoning. Custom token budget: Enter any value (e.g. 16384) to set a precise thinking budget for providers that support it (like Claude’s budget_tokens). Per-model memory: Your intensity preference is automatically saved per model. Switch between Claude and GPT — each remembers its own last setting. No re-configuration needed. Auto-detection: The thinking intensity button only appears when the current model supports reasoning. Non-reasoning models (e.g. GPT-4o-mini) show no button — zero clutter. Detection uses a dual-layer approach: API-reported capability takes priority, with regex fallback covering 25+ model families. The selected intensity is passed through the full pipeline — frontend model_kwargs → server passthrough → harness extra_body → LiteLLM → provider API — with zero framework coupling. Thinking Headroom (automatic): All major reasoning models (Claude 4.6+, DeepSeek R1, OpenAI o-series, Gemini 2.5+) count thinking tokens against the max_tokens budget. If max_tokens is too small, the thinking phase exhausts the budget before the response starts — causing truncation. Myrm automatically raises max_tokens to a safe floor based on the selected thinking intensity (8K for low, 16K for medium, 32K for high, 65K for xhigh/max). When no intensity is explicitly set, a conservative 16K default floor is applied since all thinking models default to thinking-on. This works alongside stream recovery as a dual-layer defense — proactive prevention plus reactive fallback. The adjustment is completely transparent and does not increase API costs (providers bill actual tokens used, not the max_tokens ceiling).

Reasoning Model Answer Extraction

DeepSeek-R1, Qwen-QwQ, OpenAI o-series, minimax M3 and other reasoning models put their final answer in reasoning_content instead of content. For most agent frameworks this is a silent trap — generated scripts, tool results, and UI output end up empty or printing None. Myrm extracts the user-visible answer through a model-agnostic extraction layer that automatically:
  • Falls back to reasoning_content when content is empty — reasoning models work out of the box, no per-model whitelist to wait for
  • Strips <think>…</think> blocks everywhere in the pipeline — answers stay clean, no raw thinking leaking into scripts, wiki articles, or structured results
  • Tolerates Anthropic block lists and plain-string responses — one extraction path for every provider
Judge-style outputs (task completion verdicts, semantic comparisons, goal evaluations) go through the same robust parsing: markdown fences, prose framing around JSON, and unescaped newlines inside string literals are all handled, so reasoning models can’t break your kanban or goal pipeline either. The result: new models just work — plug in any OpenAI-compatible or Anthropic-compatible reasoning model and the whole product (chat, agents, kanban, wiki, scripts) keeps returning clean, stable answers.

Per-Model Prompt Adaptation

Different AI models have different behavioral tendencies. Every model runs on the same core rules; Myrm adds model-specific text only where the model vendor’s own prompting guide prescribes it:
  • GPT / Codex: A one-line persistence reminder — keep going until the request is completely resolved before ending the turn
  • Claude Opus 5+: Automatic behavioral tuning for three Anthropic-documented issues — scope expansion (doing more than asked), self-correction narration (unnecessary “I was wrong” statements), and default verbosity (responses longer than needed)
All other models, including Gemini, DeepSeek, Qwen, Grok and the rest of the Claude line, run on the core rules alone. Failure modes such as a tool call written out as plain text are handled in code, not by per-model prompts. All prompt adaptations are fixed at agent initialization and cached in the system prompt, ensuring zero impact on KV Cache hit rates. You don’t need to configure anything — Myrm detects the model family from the model name and applies the appropriate discipline automatically.

In-Chat Model Transparency

Every assistant message shows a Token Economics badge in the action bar. Click it to see exactly which model handled the request, how it was routed, what it cost, and how fast it ran:
  • Model name & routing tier — see the exact model (e.g. gpt-4o, claude-sonnet-4) and its routing classification (Simple / Standard / Reasoning)
  • Prompt cache hit rate — percentage of cached tokens, estimated dollar savings, and cache-break attribution when the cache is invalidated
  • Cost breakdown — per-message cost with actual/estimated badge, multi-model breakdown when routing uses multiple models, and per-tool token consumption
  • Performance baseline — TTFT, tokens-per-second, and latency compared to your session average, with color-coded delta indicators
  • Context budget ring — circular progress showing context window usage with healthy/warning/critical thresholds
  • Privacy level — data sensitivity classification (S1 Public / S2 Internal / S3 Confidential) and routing path (local / cloud)
No black boxes — every routing decision is visible and verifiable directly in the chat.

Key Rotation

Add multiple API keys per provider and Myrm automatically rotates them with smart failover. When you have 2+ active keys, a strategy selector appears in the pool status bar — pick the rotation mode that best fits your setup: On rate-limit errors, the pool applies exponential backoff with ±15% jitter and automatically switches to the next available key — users never notice the switch.

Privacy Routing

With a local model configured, Myrm’s Privacy Routing automatically selects cloud or local models based on data sensitivity — no manual switching required: Privacy Routing wraps the model behind a standard interface. Agents, middlewares, and the execution loop are completely unaware of the routing — they interact with a normal model. Combined with Ollama, LM Studio, or vLLM for local backends, this enables fully air-gapped operation for sensitive workloads.

Model Orchestration Playbook

To help users understand multi-model specialization and token economics, Myrm provides an interactive Model Orchestration Playbook on the empty chat landing page and in Settings:
  • Brain & Hands Synergy: Employs reasoning models (e.g., Claude 3.7 Sonnet, DeepSeek-R1) as the “Brain” for planning and architecture, while utilizing lightweight, high-throughput models (e.g., GPT-4o-mini, Gemini Flash) as the “Hands” for frequent tool execution and verification.
  • Three Golden Recipes:
    1. Frugal: 100% lightweight models for high-frequency queries and monitoring, reducing token costs by 85%+;
    2. Balanced Brain & Hands: Top-tier reasoning planning paired with swift tool execution, achieving a 4x token economic advantage;
    3. Consensus (MoA): Multi-model cross-validation to eliminate single-model hallucinations for security-sensitive workflows.
  • In-Place Subscription Discovery: Instant authorization with an existing xAI SuperGrok subscription, without needing separate API credits.

Vercel AI Gateway & Spend Observability

Myrm natively integrates Vercel AI Gateway as a first-class provider preset:
  • Zero Vendor-Prefix Hijacking: Composite model IDs (e.g., anthropic/claude-3-5-sonnet) automatically receive an internal openai/ protocol shield, guaranteeing communication via the OpenAI-compatible wire protocol and preventing SDK routing conflicts.
  • Automatic Attribution Headers: Requests sent to ai-gateway.vercel.sh automatically inject HTTP-Referer: https://myrmagent.ai and X-Title: Myrm Agent headers for transparent attribution in the Vercel dashboard.
  • Dashboard Deep Links: Quick access links directly to the official Vercel AI Gateway metrics page right from the provider card.

Local Models

Myrm works with a local Ollama for a low-friction local AI experience: Ollama integration: Settings > Models accepts an Ollama endpoint (http://localhost:11434/v1) like any other provider, and lists the models installed on that host. The home banner can also connect an already-installed model in one click: it offers only models that can both chat and call tools, enables the built-in Ollama provider, points it at the probed address (so OLLAMA_HOST setups work), and fills the default model only if you have not picked one yet. Hosted workspaces never show it. Adaptive Stall Detection for Local Endpoints: When your API URL points to a local address (localhost, 192.168.x.x, 10.x.x.x, or any private network), Myrm automatically relaxes internal timeout thresholds. Large local models (70B+) can take minutes for initial token generation with big contexts — cloud-optimized 60-second timeouts would kill these requests prematurely, triggering futile retry loops. Myrm detects local endpoints via RFC1918/IPv6 address analysis and extends timeouts to 5–30 minutes, ensuring your local inference completes successfully. Remote API behavior remains unchanged. No configuration needed — it just works.

Config Auto-Healing

All model configuration values are automatically sanitized on save, preventing common copy-paste errors from causing connection failures:
  • API URL — trailing slashes and whitespace removed (prevents 404 errors)
  • API Key — leading/trailing spaces and newlines stripped (prevents auth failures)
  • Model name — extra whitespace removed (prevents model-not-found errors)
  • Empty values — converted to unset state gracefully (prevents crashes)
  • Legacy providerType values — old exports that used bare ids like openai instead of openai-like are auto-normalized on load; routing falls back to the provider id instead of crashing the app
  • Developer System Health — the context bundle health panel calls /context-bundle under the API base URL (never double-prefixes /api, which would 404)
This means when pasting from docs or terminal, even if your input has extra spaces, slashes, or newlines, the system works correctly. You never need to worry about formatting.

Multi-Device Config Sync

Myrm keeps settings consistent across browser tabs, desktop app, and SaaS — without nagging you on every refresh. What you get:
  • Change language, TTS, or model defaults on your phone — your desktop picks it up automatically
  • Open multiple tabs or hard-refresh — no false “Configuration Conflict” dialogs
  • Work offline — changes queue locally and sync when you’re back online
  • Break something? Config Time Machine rolls back any key to a previous version
How it works (user-facing):
  • Smart merge — if two devices edit different fields, both changes apply automatically
  • Honest conflicts — if two devices edit the same field, you choose which version to keep
  • Same-device silence — your own tab refreshing never triggers a conflict prompt
  • Idempotent sync — identical content never bumps version numbers or creates noise
vs file-based agents (OpenClaw, Hermes CLI): settings live in scattered files with no merge UI; multi-device use means manual copy or git conflicts. Myrm is the only agent workstation with enterprise-grade config sync and a full GUI.

Network Proxy (For Restricted Networks)

Myrm automatically respects your system’s proxy settings — if you already have a VPN or proxy (e.g., ClashX, V2Ray) configured at the OS level, all LLM API calls will route through it with zero additional configuration. How it works:
  • The HTTP client (httpx) defaults to trust_env=True, automatically reading HTTP_PROXY/HTTPS_PROXY/ALL_PROXY environment variables
  • System-level proxy settings (macOS Network Preferences, Windows Internet Options) are automatically applied
  • No restart required — proxy changes take effect on the next API call
Alternative: Custom Base URL: If you prefer a relay/forwarding service (e.g., one-api, new-api), simply set each provider’s Base URL to your relay endpoint. Myrm supports this per-provider — you can mix direct connections and relays as needed. Cloud users: In SaaS mode, the control plane’s LLM Relay handles all provider connections — no proxy configuration needed.

Vision Fallback

When your main model does not support vision, set a Vision Fallback model in Settings → Models. Myrm automatically converts attached images into text descriptions before sending them to the main model — with live progress in chat and session-level caching for duplicate images. GUI tools (2026-07-31):
  • Test vision chain — probes the full ordered provider chain and shows which model answered (or which step failed).
  • Use this model — when your main model is text-only, one-click recommend from enabled vision-capable providers.
  • Chat attach warning — if vision is missing, a toast with Go to Settings deep-links to the Default Models tab.
See the Vision & Image Understanding guide for setup and usage.

Multi-Model Advisor Overlay (MoA)

Lightweight reference models advise your acting model before each tool-loop iteration — without changing the main model binding. Ideal for contract review, architecture decisions, and cross-checking high-stakes answers. Setup (one time per Agent Profile): Settings → Agent → Capabilities → Agent-Loop Advisor Overlay — enable, add 1+ reference models, tune fan-out / privacy / output limits. Per chat session: Open the model picker next to the input → Mixture of Agents group → choose Standard, Deep Review, or Fast (or click again to turn off). MoA runs only when a preset is selected — no extra ref calls otherwise. Selection persists to chats.active_moa_preset_id (survives refresh and cross-device sync); incognito chats never read or write MoA preference. Preset intensity (same reference pool, different runtime params):
  • Standard — profile defaults
  • Deep Review — higher reference reasoning effort
  • Fast — lower effort + tighter reference output cap
Key parameters (Settings):
  • Fan-out Policy — Once per user turn (default), Every model call, or Every N model calls
  • Advisor Privacy Filter — Off / Display only / Full
  • Reference Output Limit — default 600 tokens (cost control)
Safeguards:
  • No reference models → overlay skipped (amber warning, no silent fake MoA)
  • Budget pressure / unattended runs → overlay auto-skipped
  • ConsensusThinkingPanel shows each advisor via SSE moa_ref_done
  • Prompt Cache safe — advisors inject transient context only (no SystemMessage mutation)
Note: Standalone Consensus ActionMode was removed; legacy API action_mode=consensus returns 400 — use action_mode=agent with active_moa_preset_id instead.
Hermes migration: On wizard confirm, default moa.presets reference models are written to the target Agent overlay (hermes_moa_migrator). See Data Migration — Hermes MoA Reference Import. Verified (2026-08-03, rerun 189): MoA picker 54 targeted unit tests (11 FE vitest + 43 server pytest, 0 failures) — PATCH rollback, org-policy MoA refs, consensus 400 reject, active_moa_preset_id serialization. Chrome MCP / API overlay E2E is still pending. Complete token economics visualization pipeline from backend to frontend:

Tool Schema Auto-Normalization

When you switch between models (e.g., GPT-4o → Gemini → Claude), each provider has different requirements for tool schemas. Myrm automatically normalizes all tool schemas before sending them to the model — no manual configuration required. What it fixes automatically:
  • Orphan required entries (fields listed as required but not defined in properties) — causes 400 errors on Gemini/Vertex AI
  • Nested nullable patterns (anyOf: [{type: X}, {type: null}]) — causes errors on strict OpenAI function calling
  • $ref/$defs inline definitions — most providers don’t support JSON Schema references
  • Missing type annotations on nested objects — strict providers reject them
  • Anthropic-unsupported keywords (minimum, maxItems, pattern, etc.) — constraints are folded into description
Why this matters: MCP tools come from third-party servers with varying schema quality. Without normalization, switching your agent from one model to another often breaks tool calling entirely. Myrm ensures every tool works on every model, transparently. Third-party gateways and strict validators: If you route Myrm through a self-hosted gateway or aggregator (LiteLLM proxy, one-api, or any OpenAI-compatible forwarder) instead of calling providers directly, Myrm adapts automatically: requests rejected for schema-shape reasons are retried once without the optional constraint, remembered per endpoint so later calls go straight through, and tool-call ids plus thinking-model reasoning are replayed exactly as issued. No configuration needed — incompatible requests heal themselves instead of failing with cryptic 400 errors.

Fault Tolerance

The 14-layer error recovery system handles failures automatically:
  • Rate limit errors (4-strategy key rotation + credential pool + ManagedLLM/KeyPool in-agent failover)
  • Provider outages (Circuit Breaker with 3-tier cooldown + fallback presets)
  • Stream interruptions (stall detection + jittered-backoff retry + backup-model failover)
  • Response truncation (progressive output budget boost 2x → 3x → 4x)
  • Oversized images (automatic re-encoding and compression)
  • Model thinking mode errors (automatic mode adjustment and retry)
  • Empty responses (parameter adjustment and retry)
  • Iteration limits (grace-call summary — users never see a blank response)
See Error Recovery for the full 14-layer architecture.