Agent Tools

Oh My Pi

Connect Oh My Pi to Yolo Router with a custom OpenAI-compatible provider.

iBefore you start
  • 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, set baseUrl to the OpenAI-compatible /v1 endpoint and use openai-completions.

Setup

Install and check Oh My Pi

macOS / Linux:

curl -fsSL https://omp.sh/install | sh

Bun users can install the npm package:

bun install -g @oh-my-pi/pi-coding-agent

Windows PowerShell:

irm https://omp.sh/install.ps1 | iex

Verify:

omp --version

Set 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.yml

On Windows this is usually:

%USERPROFILE%\.omp\agent\models.yml

Write:

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: enabled

Field notes:

  • baseUrl: your Yolo Router OpenAI-compatible endpoint, with /v1
  • api: always use openai-completions
  • apiKey: the environment variable name YOLOROUTER_API_KEY, not the raw Key
  • authHeader: true: sends Authorization: Bearer $YOLOROUTER_API_KEY
  • supportsDeveloperRole: false: avoids sending the developer role to models that reject it
  • maxTokensField: max_tokens: uses the common OpenAI Chat Completions output token field
  • requiresReasoningContentForToolCalls: true: preserves reasoning_content during tool-call conversations
  • requiresAssistantContentForToolCalls: true: ensures assistant tool-call history messages have non-empty content

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-pro

For a faster model:

omp --model yolorouter/deepseek-v4-flash

Inside 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.

On this page