Oh My Pi

Use Kourier's flat-rate DeepSeek V4 Flash plan as a model provider in Oh My Pi (omp) with one models.yml entry.

Oh My Pi (omp) is a terminal coding agent. It accepts any OpenAI-compatible provider through models.yml, so Kourier plugs in with one provider entry and no extra software.

You need a Kourier API key from a Pro or Max plan. See Get an API key; no invite is needed.

1. Export your key

export KOURIER_API_KEY="sk-bf-..."

Add it to your shell profile so every omp session sees it.

2. Add the provider

Add a kourier provider to ~/.omp/agent/models.yml (create the file if it does not exist):

providers:
  kourier:
    baseUrl: https://api.kourier.sh/v1
    api: openai-completions
    apiKey: KOURIER_API_KEY
    authHeader: true
    models:
      - id: DSV4-Flash-0731
        name: DeepSeek V4 Flash (Kourier)
        reasoning: true
        input: [text]
        contextWindow: 278528
        maxTokens: 16384
        cost:
          input: 0
          output: 0
          cacheRead: 0
          cacheWrite: 0
  • apiKey: KOURIER_API_KEY is read as an environment variable name, so the key never lives in the file.
  • contextWindow and maxTokens match Kourier's limits: 278,528 tokens in total, with up to 262,144 input tokens when a response may run to 16,384 tokens. See Models.
  • Costs are 0 because Kourier plans are flat monthly prices with no per-token billing.

3. Select the model

Start a session on Kourier:

omp --model kourier/DSV4-Flash-0731

To make it the default for every session, set the model role in ~/.omp/agent/config.yml:

modelRoles:
  default: kourier/DSV4-Flash-0731

You can also point other roles, such as smol or task, at the same model so subagents run on your plan too.

Concurrency and subagents

Kourier limits simultaneous requests, not tokens: Pro allows 3 concurrent requests and Max allows 7. Oh My Pi can run several subagents at once, and each one holds a request slot while it streams. If you see 429 Too many concurrent requests, lower the number of parallel subagents or move to Max.

Troubleshooting

SymptomFix
401 Invalid or missing API keyCheck that KOURIER_API_KEY is exported in the shell that launched omp.
Model not foundThe model id must be exactly DSV4-Flash-0731, the string your key is granted.
429 with a Retry-After headerYou hit your plan's concurrency limit; wait or reduce parallel subagents.

On this page