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
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
/v1at the end. Oh My Pi adds/chat/completionsto it.A model ID exactly as
GET /v1/modelslists it, for examplez-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.
curl -fsSL https://omp.sh/install | shbrew install can1357/tap/ompbun install -g @oh-my-pi/pi-coding-agentirm https://omp.sh/install.ps1 | iexThe 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
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 startingomp.Windows PowerShell [Environment]::SetEnvironmentVariable("REALRELAY_API_KEY", "sk-***", "User")Close and reopen the terminal before starting
omp. - 2
Add RealRelay.ai to models.yml
Create
~/.omp/agent/models.yml, or add therealrelayentry underprovidersif 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
Make it the default model
Add this to
~/.omp/agent/config.yml. You can also runomp setupand pick the model in its default-model step.~/.omp/agent/config.yml modelRoles: default: realrelay/z-ai/glm-5.2
apiKey: REALRELAY_API_KEYis 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: falsemakes Oh My Pi send its instructions with the standardsystemrole instead of the newerdeveloperrole, which many models on RealRelay.ai reject.contextWindowandmaxTokenstell 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 forz-ai/glm-5.2.compaton the provider applies to every model under it; a model's owncompatis merged on top.With a named profile (
omp --profile), the files live under~/.omp/profiles/<name>/agent/.omp config pathprints the folder in use.
Verify
- 1
Call the endpoint directly
Run this with your key. A JSON reply with a
choicesarray 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
Check that Oh My Pi sees the model
omp models realrelayshould 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
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.
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: 32768For 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.
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: trueWhich models suit an agent is covered under Choosing a model.
Troubleshooting
401 or "Invalid token".
REALRELAY_API_KEYis not set in the terminal that startedomp, or its name is misspelled inmodels.yml. In both cases the variable name is sent as the key.The provider or model is missing.
models.ymlfailed validation, and Oh My Pi fell back to its built-in models. Look for the error notice at startup. A custom provider needsbaseUrl,apiKeyandapi.404.
baseUrlis missing/v1, or already ends in/chat/completions.400 mentioning the
developerrole. AddsupportsDeveloperRole: falseunder the provider'scompat.400 mentioning
reasoning_effort. The model does not accept that field. Remove the reasoning settings from its entry.A warning about an unknown
compatkey. The key is misspelled or not used by this version. The file still loads; fix or remove the key.Context errors on long sessions.
contextWindowis larger than the model's real limit. Lower it to the value on the model's catalog page.
