Integration · Agent
Use any model in oh-my-pi (OMP)
oh-my-pi (OMP) is a terminal coding agent that keeps provider definitions and the default model in two YAML files. AutoJev writes both as one connection: an autojev provider in models.yml and the default model role in config.yml.
- models.yml + config.yml as one connection
- All selected models and routes listed
- Chat Completions in, any protocol out
- Both files restored together
Agents
CodexResponses
~/.codex/config.toml
Claude CodeMessages
~/.claude/settings.json
Gemini CLIGemini
~/.gemini/settings.json
OpenCodeChat
~/.config/opencode/opencode.json
How AutoJev connects OMP
OMP separates provider and model definitions (models.yml) from the default model selection (config.yml). When you connect, AutoJev adds providers.autojev to models.yml — base URL http://127.0.0.1:9527/v1, api openai-completions, a placeholder key and one model per selection — and sets modelRoles.default in config.yml to your default.
Because both files make up one connection, AutoJev backs them up and restores them together. OMP then talks Chat Completions to the gateway, and AutoJev routes each request to the upstream model, converting protocols when needed.
What AutoJev configures
What OMP gains from the gateway
One place for keys
Provider keys live in AutoJev on your machine. OMP only holds a placeholder key, and requests go directly to your providers with no markup.
Failover before output
On connection errors or HTTP 401/402/403/408/429/5xx before output starts, a route retries another candidate (up to 4 attempts by default) and respects Retry-After.
Per-agent logs and cost
Every request is labeled omp, with model, route, input/output/cache tokens, latency and estimated cost. Prompts and responses are not stored.
Routing without edits
Connect a route once. Switch its strategy between load balancing and intelligent selection in AutoJev without touching OMP’s config again.
Set up OMP with AutoJev
- 1
Install AutoJev
Download the desktop app and open it; the gateway runs on http://127.0.0.1:9527.
- 2
Add providers and models
Add OpenAI, DeepSeek, OpenRouter, Ollama or any OpenAI-compatible or Anthropic-compatible endpoint with your key, then add models.
- 3
Optional: create a route
Create a route such as autojev/fast to let AutoJev choose, balance or fail over between models.
- 4
Connect OMP
On Agents, AutoJev detects the omp executable. Select models and routes, choose the default and click Connect.
- 5
Start OMP
Start a new session; requests appear in AutoJev Logs under omp.
bash
The config AutoJev writes
Example with the route autojev/fast as default. OMP model references are provider-prefixed, hence autojev/autojev/fast.
Switching models and routes
Every selection is listed under providers.autojev.models, so you can switch between them in OMP. To change the list or the default role, update the Agents page and reconnect, or use “Batch update configurations”. Restart OMP to load the change.
Connect a route once and tune it in AutoJev later if you would rather not touch OMP’s files at all.
Restoring models.yml and config.yml
Disconnect, “Stop and restore configurations” or quitting from the tray reverts both files in one step. Values you changed after connecting are kept when they don’t conflict; a file that did not exist before is removed. YAML comments may be reformatted while connected.
Frequently asked questions
Which files does AutoJev change for OMP?
models.yml (the autojev provider and its models) and config.yml (modelRoles.default), both under ~/.omp/agent or PI_CODING_AGENT_DIR.
Can OMP use DeepSeek or OpenRouter through AutoJev?
Yes. Add them as providers in AutoJev, select their models for OMP and connect.
Which protocol does OMP use with AutoJev?
The provider is written with api = openai-completions (Chat Completions). AutoJev converts for Responses or Anthropic Messages upstreams.
Are my other OMP providers affected?
No. AutoJev only adds or updates providers.autojev and the default model role.
What happens to the config when AutoJev quits?
Quitting from the tray restores both files. AutoJev reconnects OMP on the next launch unless you disconnected it manually.
Keep exploring
Updated 2026-10-14
Give every agent the right model.
Install AutoJev, add the providers you already pay for, and connect your agents in one click. Everything stays on your machine.
Free & open source · macOS · Windows · Linux