Oh My Pi
Connect Oh My Pi to Yolo Router with a custom OpenAI-compatible provider.
- Oh My Pi is installed and available as
omp. - A working Yolo Router endpoint, for example
https://api.yolorouter.com. - A Yolo Router API Key generated from the console.
- The model ID you want to use, for example
deepseek-v4-pro. It must exactly match the model ID in the Yolo Router console.
Oh My Pi adds custom model providers through
~/.omp/agent/models.yml. For Yolo Router, setbaseUrlto the OpenAI-compatible/v1endpoint and useopenai-completions.
Setup
Install and check Oh My Pi
macOS / Linux:
curl -fsSL https://omp.sh/install | shBun users can install the npm package:
bun install -g @oh-my-pi/pi-coding-agentWindows PowerShell:
irm https://omp.sh/install.ps1 | iexVerify:
omp --versionSet the API Key environment variable
The examples below use YOLOROUTER_API_KEY; models.yml will read this variable.
export YOLOROUTER_API_KEY="sk-yolo-..."$env:YOLOROUTER_API_KEY = "sk-yolo-..."set YOLOROUTER_API_KEY=sk-yolo-...Do not write the real API Key into config files or commit it to your repository.
Create models.yml
Create or edit:
~/.omp/agent/models.ymlOn Windows this is usually:
%USERPROFILE%\.omp\agent\models.ymlWrite:
providers:
yolorouter:
baseUrl: https://api.yolorouter.com/v1
api: openai-completions
apiKey: YOLOROUTER_API_KEY
authHeader: true
models:
- id: deepseek-v4-pro
name: deepseek-v4-pro
reasoning: true
thinking:
minLevel: high
maxLevel: xhigh
mode: effort
input: [text]
contextWindow: 200000
maxTokens: 128000
compat:
supportsDeveloperRole: false
supportsReasoningEffort: true
maxTokensField: max_tokens
reasoningEffortMap:
high: high
xhigh: max
supportsToolChoice: false
requiresReasoningContentForToolCalls: true
requiresAssistantContentForToolCalls: true
extraBody:
thinking:
type: enabled
- id: deepseek-v4-flash
name: deepseek-v4-flash
reasoning: true
thinking:
minLevel: high
maxLevel: xhigh
mode: effort
input: [text]
contextWindow: 200000
maxTokens: 128000
compat:
supportsDeveloperRole: false
supportsReasoningEffort: true
maxTokensField: max_tokens
reasoningEffortMap:
high: high
xhigh: max
supportsToolChoice: false
requiresReasoningContentForToolCalls: true
requiresAssistantContentForToolCalls: true
extraBody:
thinking:
type: enabledField notes:
baseUrl: your Yolo Router OpenAI-compatible endpoint, with/v1api: always useopenai-completionsapiKey: the environment variable nameYOLOROUTER_API_KEY, not the raw KeyauthHeader: true: sendsAuthorization: Bearer $YOLOROUTER_API_KEYsupportsDeveloperRole: false: avoids sending thedeveloperrole to models that reject itmaxTokensField: max_tokens: uses the common OpenAI Chat Completions output token fieldrequiresReasoningContentForToolCalls: true: preservesreasoning_contentduring tool-call conversationsrequiresAssistantContentForToolCalls: true: ensures assistant tool-call history messages have non-emptycontent
The compat block is a full replacement, not a merge with built-in defaults. Put every compatibility field you need directly in models.yml.
Launch and select the model
Open your project directory and run:
omp --model yolorouter/deepseek-v4-proFor a faster model:
omp --model yolorouter/deepseek-v4-flashInside Oh My Pi, press Ctrl+L or type /model to switch models at any time.
Test the connection
Send:
Introduce the model you are using in one sentence.If Oh My Pi returns a normal response, the integration is working. You can also check the Yolo Router console for the corresponding request log.
Troubleshooting
Provider not found
Confirm that ~/.omp/agent/models.yml exists and the YAML format is valid. Restart Oh My Pi after changing config.
401 Unauthorized
Make sure YOLOROUTER_API_KEY is exported in the current shell and has no extra spaces.
Reasoning-model tool calls fail
Check that the model config includes requiresReasoningContentForToolCalls: true, requiresAssistantContentForToolCalls: true, and supportsToolChoice: false. These fields are important for reasoning-model tool calls.
The model behaves strangely after switching
For non-reasoning models, remove reasoning: true, thinking, and extraBody.thinking.
Model not found
Confirm that models[].id exactly matches the model ID in the Yolo Router console. Launch arguments use <provider>/<model> format, for example yolorouter/deepseek-v4-pro.