Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

omp (Oh My Pi) + JoinGonka Gateway: an agent with model roles

omp (Oh My Pi) is a terminal coding agent, a fork of the minimalist Pi, that adds everything needed for serious work: language servers (LSP) for each file entry, control over a real debugger, subagents in isolated working copies, and persistent Python and JavaScript cells. The core is written in Rust, and the same binary runs on macOS, Linux, and Windows.

Providers in omp are described declaratively: any endpoint speaking OpenAI Chat Completions can be added with a dozen lines in ~/.omp/agent/models.yml. JoinGonka Gateway is exactly that, so connection boils down to a single installer command or two short YAML files. After that, the agent runs on the decentralized Gonka network models — DeepSeek V4 Flash, GLM-5.3 Flash, and MiniMax M2.7 — at a unified price: $0.0069 per million input tokens.

The main difference between omp and its predecessor is model roles: standard moves, deep analysis, planning mode, and background tasks can be assigned to different models, with a backup chain for support. Below is the quick start path, manual configuration, a "which model for which role" table, and error troubleshooting. Commands and messages were verified via a live run of omp 18.2.8 through the gateway on September 21, 2026. After confirming your address, 3M free tokens will be credited to your account — enough to repeat all this yourself.

Quick start: installation and one command

Step 1: install omp. Official methods from the project README:

# macOS and Linux
curl -fsSL https://omp.sh/install | sh

# Homebrew
brew install can1357/tap/omp

# via Bun (requires Bun 1.3.14 or newer)
bun install -g @oh-my-pi/pi-coding-agent

# Windows (PowerShell)
irm https://omp.sh/install.ps1 | iex

Step 2: get a key. Register at gate.joingonka.ai/register, confirm your address, and create a key with the jg- prefix in the "API keys" section. One key and one balance work for all models on the network.

Step 3: run the installer.

npx @joingonka/setup --tool omp

The installer will ask for your key — it isn't passed as a command-line argument so it doesn't end up in your shell history — and it does four things:

  • writes the joingonka provider into ~/.omp/agent/models.yml: gateway address, openai-completions protocol, the key as a literal, and three network models with real context windows and response ceilings; the file gets 600 permissions;
  • sets the default model — modelRoles.default in ~/.omp/agent/config.yml — to DeepSeek V4 Flash, but only if the role is empty or points to a model that has left the network: it doesn't override someone else's choice, it just suggests how to switch;
  • backs up the previous file before writing, and leaves other providers, roles, and comments as they were;
  • finally, sends a live request to the gateway and tells you directly whether the key, address, and model were accepted.

Set a different default model with the --model flag using the shorthand deepseek, glm, or minimax — an explicitly specified model is always written. For dotfiles and servers, there's a non-interactive mode where the key is taken from an environment variable:

JOINGONKA_API_KEY=jg-your-key npx @joingonka/setup --tool omp --model glm --non-interactive

The installer handles non-standard config locations on its own: named profile (OMP_PROFILE) and relocated agent directory (PI_CODING_AGENT_DIR). It migrates the legacy models.json to models.yml the same way omp itself would — previous providers won't be lost. And if there's an old settings.json nearby without a config.yml, the installer won't create config.yml, so omp doesn't skip its own settings migration: it will ask you to run omp once and repeat the command.

Manual configuration: two YAML files

Everything the installer does can be done by hand. There are two files, and each has its own job: models.yml describes providers and models, config.yml holds settings — including which model sits on which role.

# ~/.omp/agent/models.yml
providers:
  joingonka:
    baseUrl: https://gate.joingonka.ai/v1
    api: openai-completions
    apiKey: jg-your-key
    models:
      - id: deepseek-ai/DeepSeek-V4-Flash-0731
        name: DeepSeek V4 Flash (Gonka)
        input: [text]
        contextWindow: 380000
        maxTokens: 32768
        reasoning: true
      - id: zai-org/GLM-5.3-Flash
        name: GLM-5.3 Flash (Gonka)
        input: [text]
        contextWindow: 390000
        maxTokens: 8192
        reasoning: true
      - id: MiniMaxAI/MiniMax-M2.7
        name: MiniMax M2.7 (Gonka)
        input: [text]
        contextWindow: 200000
        maxTokens: 8192
# ~/.omp/agent/config.yml
modelRoles:
  default: joingonka/deepseek-ai/DeepSeek-V4-Flash-0731
FieldValueWhat matters
baseUrlhttps://gate.joingonka.ai/v1Must end with /v1: omp appends the /chat/completions path itself
apiopenai-completionsThe Chat Completions transport — this whole guide has been tested on it
apiKeyyour jg-… keyomp first looks for an environment variable with that name and, if it doesn't find one, takes the string as the key itself. A value that starts with ! is a command whose output becomes the key
contextWindow, maxTokensas in the model list aboveWithout them omp substitutes 128000 and 16384 — which doesn't match the network's models. The agent uses the context window to decide when it's time to compact the history
input[text]The network's models accept text
reasoningtrueMarks a reasoning model: the installer sets it for DeepSeek V4 Flash and GLM-5.3 Flash, while the MiniMax M2.7 entry does without it

A literal key is the most trouble-free option: omp starts from any environment, and all you have to do is lock down the file with chmod 600 ~/.omp/agent/models.yml. If you'd rather keep the key out of the file, put the name of an environment variable in apiKey, for example JOINGONKA_API_KEY, and export it in the shell you launch omp from: that's exactly the key resolution order described in the project's documentation.

The optional cost field (price per million tokens) is only needed to estimate session cost in the omp interface. The installer writes in the gateway's live price at the moment of installation; in a manual config you can leave the field out — that estimate has nothing to do with your bill, and actual usage is shown in your account dashboard.

A model selector is written as provider/model-id. The provider name is split off at the first slash, so network identifiers that contain their own slash are written as-is: joingonka/deepseek-ai/DeepSeek-V4-Flash-0731. Instead of editing config.yml, you can assign a role from the interface — with the /model command inside a session or in the omp setup wizard.

Model roles: assigning models to jobs

In omp, the model is not chosen as a single option for everything, but by roles — this is the main tuning lever. Built-in roles for dialogue: default, smol, slow, plan, commit, task, tiny, memory, advisor, and vision. You do not need to assign all of them: unassigned smol and slow default to the default role model, sub-agents without the task role run on the current session model, and commit and tiny follow smol. A single-line default configuration is fully functional.

Distributing roles among network models is done not for savings — DeepSeek V4 Flash, GLM-5.3 Flash, and MiniMax M2.7 have the same price — but for behavior and capacity: a reasoning model plans better, a long-response model writes better, and background trifles do not need to be queued with the main task.

RoleExecutionNetwork ModelWhy
defaultroutine agent moves: reading, edits, commandsDeepSeek V4 Flash380K context and 32768 response cap — capacity for long sessions with tools; set by default by the installer
smol, task, commitquick sub-tasks, sub-agents, diff analysis for commitsdo not set — inherits from DeepSeek V4 FlashThey all call tools, and a separate "cheap" model saves nothing at a flat price
slowdeep analysis: complex logic, root cause searchGLM-5.3 FlashReasons before answering; 8192 response cap, and part of it is used for reasoning — for long text, revert to DeepSeek V4 Flash
planplanning modeGLM-5.3 FlashA plan is a short text where the train of thought is more important than volume
tinysession headers and service classification — short requests without toolsMiniMax M2.7Has the largest capacity in the network, so background tasks do not compete for slots with the main task
advisora second model that reads every move of the main one and inserts notesGLM-5.3 Flash, optionalIt is useful for the advisor to differ from the executor; enabled with the /advisor on command
visionimage tasksdo not setNetwork models are text-based: leave this role to a provider with a vision model
# ~/.omp/agent/config.yml
modelRoles:
  default: joingonka/deepseek-ai/DeepSeek-V4-Flash-0731
  slow: joingonka/zai-org/GLM-5.3-Flash
  plan: joingonka/zai-org/GLM-5.3-Flash
  tiny: joingonka/MiniMaxAI/MiniMax-M2.7

retry:
  fallbackChains:
    default:
      - joingonka/zai-org/GLM-5.3-Flash

The retry.fallbackChains block is a safeguard for peak hours: when the main model persistently returns 429, omp passes the remainder of the turn to the next entry in the chain, and after a pause, returns to the main one. The chain key can be a role, a specific model, or an entire provider (joingonka/*).

For a single run, a role can be overridden via a flag: omp --model slow launches a session on the slow role model, while --smol, --slow, and --plan substitute the model of the role itself. Inside a session, Ctrl+P scrolls through role models, and /model opens the selector; in the Roles tab, you can assign roles and their backups.

You can append a reasoning level to the role value — :low, :medium, :high. This is omp syntax, and how a specific model interprets the level depends on the model itself: GLM-5.3 Flash, for example, uses it as a binary switch — details in the model overview. One more useful detail: roles can be overridden for a single repository using a <repo>/.omp/config.yml file with the same modelRoles block. Providers and keys remain in the home directory, so the key will not leak into the repository.

Verification: what should happen

First, make sure omp can see the provider:

omp models joingonka

The response is a three-row table with context windows and output ceilings from models.yml, rounded to the nearest thousand (output trimmed: omp also has thinking and images columns):

joingonka (3)
model                                context  max-out
deepseek-ai/DeepSeek-V4-Flash-0731      380K      33K
MiniMaxAI/MiniMax-M2.7                  200K     8.2K
zai-org/GLM-5.3-Flash                   390K     8.2K

Next, a one-off headless run. Drop a file with an obvious bug into an empty directory and ask it to find the bug:

omp -p "Read calc.py and tell me in one sentence whether it has a bug."

The agent should call the read tool on its own and give a substantive answer — naming the expression where the bug is. In our run on September 21, 2026, this loop — request, tool call, result, answer — was completed cleanly by DeepSeek V4 Flash and GLM-5.3 Flash; for MiniMax M2.7, see the last row of the table below.

The third check is from the gateway side: in your dashboard under "Usage," the request will show up in the "By model" breakdown, and the "By key" section will update the last request time. If it's empty there, omp is talking to a different provider: check what's assigned to the roles with omp config get modelRoles.

If something went wrong, the diagnosis can usually be read straight from the message:

What you seeWhat it meansWhat to do
Bun runtime must be >= 1.3.14omp was installed via Bun, and Bun itself is oldUpdate Bun (bun upgrade) or install the prebuilt binary: curl -fsSL https://omp.sh/install | sh -s — --binary
401 Invalid API keyThe gateway rejected the keyCheck apiKey: the whole key, no spaces or stray quotes. If it holds a variable name, that variable must be exported in the shell omp was launched from
405 Not Allowed and an nginx HTML pageThe baseUrl is missing its suffixThe address must end with /v1
404 Invalid URL (POST /v1/v1/chat/completions)The baseUrl has an extra tailLeave exactly https://gate.joingonka.ai/v1 — omp appends the rest itself
400 Model … not found. Available: …A typo in the model idThe gateway lists the available identifiers itself; the full list is at GET https://gate.joingonka.ai/v1/models
Warning: models.yml validation failed — custom providers disabled, followed by No models matching "joingonka"The file failed validation: a typo in a required field name, or broken YAML. omp keeps working on built-in models regardlessThe reason is named on the line below the warning; fix the field and rerun omp models joingonka
429The key has hit its per-minute request limit, or the model ran out of capacity during peak hoursomp retries on its own with increasing backoff. If it drags on, switch models via /model or set up retry.fallbackChains; network status is on the status page
402The balance has run out of fundsTop up in the "Billing" section; the key itself still works
The turn finished but there's no visible answer (an empty string in -p mode)Observed on September 21, 2026 with MiniMax M2.7 on turns after a tool call: the answer arrived inside the reasoning block, and omp displayed it as thinkingAssign DeepSeek V4 Flash or GLM-5.3 Flash to the tool-using roles, and keep MiniMax M2.7 for short tasks without tools

How much does it cost

Agentic tools consume tokens differently than a chat: for every phrase of yours, omp appends a system prompt and tool descriptions, and a task usually takes several turns. In our run, even with only the file reader tool enabled, each turn carried about 3.5 thousand input tokens; with a full suite, it will be more. Therefore, the price per token is crucial here.

Via JoinGonka Gateway, tokens cost $0.0069 per million for input and $0.021 per million for output — the price is the same for all models in the network and is pulled onto this page from a live source.

ScenarioConsumptionVia Gateway
One-off task: read a file, find a bugfrom 7K tokensfractions of a cent
A day of active work3-7M tokensa few cents
A month of active development~150M tokensabout a dollar

Estimates in the right column are based on September 2026 prices. For comparison — how you can pay for models in omp at all:

MethodPayment modelConstraints
Coding plan subscription (via /login)fixed monthly amountquotas and limit refresh windows on the vendor side
Vendor key directlypay per token at vendor pricebill grows with session length; price depends on the chosen model
JoinGonka Gatewaypay per token, prepaid balanceusage is visible in the dashboard; no subscriptions or monthly quotas

The omp status line shows a session cost estimate. It is calculated using the cost field from models.yml: the installer writes the gateway price there at the time of installation, and since the dollar price in the network fluctuates with the GNK exchange rate, the estimate is just a guideline. Precise consumption and balance are in the dashboard, under the "Usage" and "Billing" sections. Why DeepSeek V4 Flash was chosen as the default is explained in detail in the model review.

Things to consider

Approval mode. By default omp runs in yolo mode: it approves reads, writes, and command execution on its own. On your own project that's convenient; on someone else's code, it's a reason to tighten the mode or move into a container:

omp config set tools.approvalMode write

In write mode the agent asks for permission only to execute commands; in always-ask, it also asks for writes. For a single run, the same is set by the --approval-mode flag. This is a property of omp itself and doesn't depend on the model provider.

Pi and omp are relatives with different configs. Configuring one tool isn't passed on to the other: their directories, formats, and field names are their own.

Piomp
Config directory~/.pi/agent~/.omp/agent
Providersmodels.jsonmodels.yml
Default modelsettings.json: defaultProvider and defaultModelconfig.yml: modelRoles.default
Selecting a model for a task/model in the sessionmodelRoles roles and retry.fallbackChains chains
Checkpi --list-modelsomp models joingonka
Installer--tool pi--tool omp

Multiple environments. A named profile (omp --profile work or the OMP_PROFILE variable) moves all settings into ~/.omp/profiles/<name>/agent — handy for keeping work and personal keys apart. The current agent directory is printed by omp config path.

If you need the agent inside your editor. omp can run inside Zed via the ACP protocol — it's the same agent with the same settings, no need to configure the provider and roles a second time.

omp connects to JoinGonka Gateway with a single command — npx @joingonka/setup --tool omp — or with two files: a joingonka provider in ~/.omp/agent/models.yml (baseUrl with /v1, api: openai-completions, key jg-…, models with honest contextWindow and maxTokens) and modelRoles.default in config.yml. From there, omp's main lever works — roles: DeepSeek V4 Flash for routine turns, GLM-5.3 Flash for analysis and planning, MiniMax M2.7 for background trifles, and fallbackChains for rush hours. Verification is omp models joingonka and the "Usage" section in the dashboard; all models in the network have the same price, so roles are chosen based on behavior, not budget.

Want to learn more?

Explore other sections or start earning GNK right now.

Get key and free tokens →