Oh My Pi

Use Kourier's flat-rate DeepSeek V4.1 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 Starter or Pro plan. See Get an API key.

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: deepseek-v4.1-flash
        name: DeepSeek V4.1 Flash (Kourier)
        reasoning: true
        input: [text]
        contextWindow: 262144
        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: 262,144 tokens in total for prompt plus output combined, with up to 16,384 tokens per response. 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/deepseek-v4.1-flash

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

modelRoles:
  default: kourier/deepseek-v4.1-flash

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: Starter allows 1 concurrent request and Pro allows 3. 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 from Starter to Pro.

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 deepseek-v4.1-flash, the string your key is granted.
429 with a Retry-After headerYou hit your plan's concurrency limit; wait or reduce parallel subagents.