Knowledge Base Sections ▾
Navigation
▸ Start here By rolesCategories
- Cursor + Gonka AI - cheap LLM for coding
- Claude Code + Gonka AI - LLM for the terminal
- OpenClaw + Gonka AI - affordable AI agents
- OpenCode: your own model in the terminal
- Continue.dev + Gonka AI - AI for VS Code/JetBrains
- Cline + Gonka AI - AI agent in VS Code
- Aider + Gonka AI - pair programming with AI
- LangChain + Gonka AI - AI applications for pennies
- n8n + Gonka AI - automation with cheap AI
- Open WebUI + Gonka AI - your own ChatGPT
- LibreChat + Gonka AI — open-source ChatGPT
- Hermes Agent + DeepSeek on the Gonka network — an autonomous agent for pennies
- Kilo Code + Gonka AI — AI-Agent in VS Code
- Roo Code + Gonka AI — Autonomous AI Agent in VS Code
- LlamaIndex + Gonka AI — RAG applications for pennies
- PydanticAI + Gonka — typed AI agents for pennies
- Vercel AI SDK + Gonka AI — AI applications in TypeScript for pennies
- TanStack AI + Gonka — AI applications in TypeScript for pennies
- API quick start — curl, Python, TypeScript
- JoinGonka Gateway — a full overview
- Management Keys — SaaS on Gonka
- Cheapest AI API: Provider Comparison 2026
- How to buy AI tokens and an API key: 3 methods in 2026
- Cursor Pro request limit reached — breakdown and cheaper alternative
- Claude Code is cheaper — bill breakdown and switching
- Cline is burning money — why the agent spends so much
- OpenClaw is expensive — why the agent burns through tokens and how to save
- OpenRouter: Cheap Alternative — Comparison with JoinGonka Gateway
- Best AI model for coding in 2026: comparison and prices
- Cheap alternative to GitHub Copilot without limits
- A cheap Windsurf alternative without credits or limits
- The cheapest API for AI agents in 2026
- ZCode: Cheap GLM inference instead of GLM Coding Plan
- JetBrains IDE + JoinGonka Gateway — your own endpoint instead of credits
- GitHub Copilot BYOK — own models instead of quotas
- Zed + JoinGonka Gateway — cheap inference in your editor
- Pi + JoinGonka Gateway — terminal agent on cheap inference
- Codex CLI: your own key instead of a subscription
- DeepSeek Harness: Your Own Provider via JoinGonka Gateway
- MiniMax Code: MiniMax agent with your own key via Gonka
- Warp + JoinGonka Gateway — terminal agent on your own endpoint
- Trae + JoinGonka Gateway — Gonka network models in AI-IDE
- Cherry Studio + JoinGonka Gateway — desktop AI client
- omp (Oh My Pi) + JoinGonka Gateway: an agent with model roles
- OpenHands + JoinGonka Gateway: agent on your own endpoint
- Qwen Code after the closure of qwen-oauth: working via JoinGonka Gateway
- Goose + JoinGonka Gateway: your own provider and key in the keyring
- Crush + JoinGonka Gateway: Charm agent on Gonka network models
- Zoo Code + JoinGonka Gateway: Migrating from Roo Code to Gonka models
- Kimi Code CLI: Moonshot AI agent on your key via Gonka
- Factory Droid + JoinGonka Gateway: BYOK on Gonka network models
- MiMo Code + JoinGonka Gateway: Xiaomi agent on Gonka network models
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 | iexStep 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 ompThe 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
joingonkaprovider into~/.omp/agent/models.yml: gateway address,openai-completionsprotocol, the key as a literal, and three network models with real context windows and response ceilings; the file gets600permissions; - sets the default model —
modelRoles.defaultin~/.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-interactiveThe 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| Field | Value | What matters |
|---|---|---|
baseUrl | https://gate.joingonka.ai/v1 | Must end with /v1: omp appends the /chat/completions path itself |
api | openai-completions | The Chat Completions transport — this whole guide has been tested on it |
apiKey | your jg-… key | omp 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, maxTokens | as in the model list above | Without 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 |
reasoning | true | Marks 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.
| Role | Execution | Network Model | Why |
|---|---|---|---|
default | routine agent moves: reading, edits, commands | DeepSeek V4 Flash | 380K context and 32768 response cap — capacity for long sessions with tools; set by default by the installer |
smol, task, commit | quick sub-tasks, sub-agents, diff analysis for commits | do not set — inherits from DeepSeek V4 Flash | They all call tools, and a separate "cheap" model saves nothing at a flat price |
slow | deep analysis: complex logic, root cause search | GLM-5.3 Flash | Reasons before answering; 8192 response cap, and part of it is used for reasoning — for long text, revert to DeepSeek V4 Flash |
plan | planning mode | GLM-5.3 Flash | A plan is a short text where the train of thought is more important than volume |
tiny | session headers and service classification — short requests without tools | MiniMax M2.7 | Has the largest capacity in the network, so background tasks do not compete for slots with the main task |
advisor | a second model that reads every move of the main one and inserts notes | GLM-5.3 Flash, optional | It is useful for the advisor to differ from the executor; enabled with the /advisor on command |
vision | image tasks | do not set | Network 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-FlashThe 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 joingonkaThe 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.2KNext, 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 see | What it means | What to do |
|---|---|---|
Bun runtime must be >= 1.3.14 | omp was installed via Bun, and Bun itself is old | Update Bun (bun upgrade) or install the prebuilt binary: curl -fsSL https://omp.sh/install | sh -s — --binary |
401 Invalid API key | The gateway rejected the key | Check 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 page | The baseUrl is missing its suffix | The address must end with /v1 |
404 Invalid URL (POST /v1/v1/chat/completions) | The baseUrl has an extra tail | Leave exactly https://gate.joingonka.ai/v1 — omp appends the rest itself |
400 Model … not found. Available: … | A typo in the model id | The 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 regardless | The reason is named on the line below the warning; fix the field and rerun omp models joingonka |
429 | The key has hit its per-minute request limit, or the model ran out of capacity during peak hours | omp 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 |
402 | The balance has run out of funds | Top 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 thinking | Assign 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.
| Scenario | Consumption | Via Gateway |
|---|---|---|
| One-off task: read a file, find a bug | from 7K tokens | fractions of a cent |
| A day of active work | 3-7M tokens | a few cents |
| A month of active development | ~150M tokens | about 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:
| Method | Payment model | Constraints |
|---|---|---|
Coding plan subscription (via /login) | fixed monthly amount | quotas and limit refresh windows on the vendor side |
| Vendor key directly | pay per token at vendor price | bill grows with session length; price depends on the chosen model |
| JoinGonka Gateway | pay per token, prepaid balance | usage 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 writeIn 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.
| Pi | omp | |
|---|---|---|
| Config directory | ~/.pi/agent | ~/.omp/agent |
| Providers | models.json | models.yml |
| Default model | settings.json: defaultProvider and defaultModel | config.yml: modelRoles.default |
| Selecting a model for a task | /model in the session | modelRoles roles and retry.fallbackChains chains |
| Check | pi --list-models | omp 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.
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 →