The routing config
Two files in ~/.omp/agent/ do it.
config.yml maps roles to models and holds fallbacks and folder
rules. models.yml adds providers omp doesn’t know. Model ids
look like provider-id/model-id, and any can take a thinking-effort
suffix such as :high or :minimal.
Roles
defaultnormal turnssmolsubagents. tiny (titles, memory) falls back to itslowdeep reasoningplanplan modecommitcommit messages and changelogs. The easiest savings.advisoroptional reviewer on every turn. It doubles your calls.Also vision, designer and task. Set
them in config.yml:
modelRoles: default: claude-opus-4-6 smol: "@default" slow: openai/gpt-5.5
"@default" reuses another role’s model. Start with frontier
on default, slow and plan, a small model
on smol and commit, and leave it for a week. Switch
with /model mid-session, cycle the active role’s model with
Ctrl+P, or pass
omp --model … --smol … --slow … --plan ….
models.yml: add an endpoint
The README’s example for an OpenAI-compatible server:
providers:
spark:
baseUrl: http://192.168.10.223:8000/v1
api: openai-completions
apiKey: dummy
models:
- id: minimax-m3
name: MiniMax M3
contextWindow: 100000
maxTokens: 32000
Check it with omp models spark, then route to it
(smol: spark/minimax-m3). Ollama, LM Studio and llama.cpp
don’t need this, since omp finds them on their default ports.
api also accepts anthropic-messages,
openai-responses, google-generative-ai and others.
Fallback chains
On by default (retry.modelFallback). A model that keeps
returning 429 hands its work to the next entry in its chain and comes back
after the cooldown. From the settings docs:
retry:
fallbackChains:
default:
- anthropic/claude-opus-4-5
- openai/gpt-5.5
- google/gemini-3-pro
smol:
- openai/gpt-5.5-mini
- anthropic/claude-haiku-4-5
Keys can be roles, exact provider/model-ids or
provider/* wildcards. google-vertex/* means the same
model through another provider. Unknown models and broken chains show up as
warnings at startup, so read them.
Rules by folder
enabledModels and disabledProviders accept
path-scoped entries, so one global config can set different rules per
folder:
enabledModels:
- claude-sonnet-4-5 # applies everywhere
- path: ~/work/high-context
models:
- anthropic/claude-opus-4-5
disabledProviders:
- paths:
- ~/clients/acme
providers:
- openai
The usual use: allow only local models in a client’s repo, so their code never leaves your machine. An entry applies when your working directory is at or below the path.
Spend
Run the @oh-my-pi/omp-stats dashboard after a week to see your
spend per role, in place of the simulator’s
toy units. If one key’s limit holds you back, omp can rotate several keys
per provider.