Coding agents

Oh My Pi

Connect Oh My Pi (omp) to RealRelay.ai as a custom provider in models.yml: install it, add the provider, set the default model and check the connection.

Protocol
OpenAI Chat Completions
Base URL
https://www.realrelay.ai/v1
Official docs
github.com
Checked against the tool’s docs
2026-10
Experimental. Not yet run end to end against RealRelay.ai. The steps follow the tool’s own documentation; if one fails, contact support with the error.

Overview

Oh My Pi is a terminal coding agent; its command is omp. It started from Pi but is a separate project with its own config files. You connect it to RealRelay.ai by adding a custom provider to models.yml. That provider uses the OpenAI Chat Completions API (/v1/chat/completions).

  • An API key from the API keys page of the console.

  • The base URL with /v1 at the end. Oh My Pi adds /chat/completions to it.

  • A model ID exactly as GET /v1/models lists it, for example z-ai/glm-5.2. Pick one that supports tool calling.

This setup follows Oh My Pi's documentation but has not yet been run end to end against RealRelay.ai. Oh My Pi releases often, so check its models.yml reference if a field behaves differently. If you use Pi itself, follow the Pi guide instead; the two config formats are not interchangeable.

Install

Use one of the project's own install methods.

macOS · Linux
curl -fsSL https://omp.sh/install | sh
Homebrew
brew install can1357/tap/omp
Bun 1.3.14+
bun install -g @oh-my-pi/pi-coding-agent
Windows PowerShell
irm https://omp.sh/install.ps1 | iex

The Bun route needs Bun 1.3.14 or newer. When Bun is not available, the install scripts download a prebuilt binary and check its checksum. If omp is not found afterwards, open a new terminal.

Configure

  1. 1

    Put the key in an environment variable

    Replace sk-*** with your key.

    ~/.zshrc · ~/.bashrc
    export REALRELAY_API_KEY="sk-***"

    Run source ~/.zshrc, or open a new terminal, before starting omp.

    Windows PowerShell
    [Environment]::SetEnvironmentVariable("REALRELAY_API_KEY", "sk-***", "User")

    Close and reopen the terminal before starting omp.

  2. 2

    Add RealRelay.ai to models.yml

    Create ~/.omp/agent/models.yml, or add the realrelay entry under providers if the file already exists.

    ~/.omp/agent/models.yml
    1providers:2  realrelay:3    baseUrl: https://www.realrelay.ai/v14    api: openai-completions5    apiKey: REALRELAY_API_KEY6    compat:7      supportsDeveloperRole: false8    models:9      - id: z-ai/glm-5.210        name: z-ai/glm-5.211        contextWindow: 20000012        maxTokens: 32768
  3. 3

    Make it the default model

    Add this to ~/.omp/agent/config.yml. You can also run omp setup and pick the model in its default-model step.

    ~/.omp/agent/config.yml
    modelRoles:  default: realrelay/z-ai/glm-5.2
  • apiKey: REALRELAY_API_KEY is the name of the variable, with no $. Oh My Pi first looks for a variable with that name. If none is set, it sends the text itself as the key, which fails with 401.

  • supportsDeveloperRole: false makes Oh My Pi send its instructions with the standard system role instead of the newer developer role, which many models on RealRelay.ai reject.

  • contextWindow and maxTokens tell Oh My Pi how much the model can take and return. RealRelay.ai does not report these, so set them from the model's catalog page. The values shown are safe for z-ai/glm-5.2.

  • compat on the provider applies to every model under it; a model's own compat is merged on top.

  • With a named profile (omp --profile), the files live under ~/.omp/profiles/<name>/agent/. omp config path prints the folder in use.

Verify

  1. 1

    Call the endpoint directly

    Run this with your key. A JSON reply with a choices array means the address, key and model work.

    Terminal
    1curl -sS "https://www.realrelay.ai/v1/chat/completions" \2  -H "Authorization: Bearer sk-***" \3  -H "content-type: application/json" \4  -d '{"model": "z-ai/glm-5.2", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'
  2. 2

    Check that Oh My Pi sees the model

    omp models realrelay should print a table with your model. The second command sends one prompt, prints the answer and exits.

    Terminal
    omp models realrelayomp --model realrelay/z-ai/glm-5.2 -p "Reply with OK"
  3. 3

    Start a session in a project

    Send a short message. A reply confirms the whole path, and the request appears in the console's usage logs.

    Terminal
    cd /path/to/your/projectomp --model realrelay/z-ai/glm-5.2

Models

Inside a session, /model opens the model hub. Choose a model there for the current session, or assign it to the default role to keep it. On the command line, --model takes the provider name, a slash, then the full model ID.

Oh My Pi only offers the RealRelay.ai models you list under the provider. Add one entry per model, each with its own limits. Without limits, it assumes 128,000 tokens of context and 32,768 of output.

~/.omp/agent/models.yml → providers.realrelay.models
1      - id: z-ai/glm-5.22        name: z-ai/glm-5.23        contextWindow: 2000004        maxTokens: 327685      - id: deepseek/deepseek-v4-pro6        name: deepseek/deepseek-v4-pro7        contextWindow: 2000008        maxTokens: 32768

For a model that thinks before it answers, mark it as a reasoning model and list the effort levels it accepts, lowest first. Oh My Pi then sends reasoning_effort with the level you pick.

~/.omp/agent/models.yml → providers.realrelay.models
1      - id: z-ai/glm-5.22        name: z-ai/glm-5.23        contextWindow: 2000004        maxTokens: 327685        reasoning: true6        thinking:7          mode: effort8          efforts: [low, medium, high]9        compat:10          supportsReasoningEffort: true

Which models suit an agent is covered under Choosing a model.

Troubleshooting

  • 401 or "Invalid token". REALRELAY_API_KEY is not set in the terminal that started omp, or its name is misspelled in models.yml. In both cases the variable name is sent as the key.

  • The provider or model is missing. models.yml failed validation, and Oh My Pi fell back to its built-in models. Look for the error notice at startup. A custom provider needs baseUrl, apiKey and api.

  • 404. baseUrl is missing /v1, or already ends in /chat/completions.

  • 400 mentioning the developer role. Add supportsDeveloperRole: false under the provider's compat.

  • 400 mentioning reasoning_effort. The model does not accept that field. Remove the reasoning settings from its entry.

  • A warning about an unknown compat key. The key is misspelled or not used by this version. The file still loads; fix or remove the key.

  • Context errors on long sessions. contextWindow is larger than the model's real limit. Lower it to the value on the model's catalog page.