Skip to main content

pi and omp

One command re-points the built-in anthropic and openai providers of pi or omp at the gateway. Other providers and existing subscription sign-ins stay as they are.

omp is a fork of pi, so Connect treats them the same.

Connect​

npx anyray-connect@latest --gateway http://<gateway>:8787 --tools pi,omp

Enroll first (--enroll <link> or --sso) to get a personal ark_… client key. --dry-run previews. Drop --tools to configure every detected tool. No restart: the next pi or omp run reads the change.

Confirm it worked

pi --list-models (or omp models) still lists every built-in Anthropic and OpenAI model. Your next request shows on the Agents card.

What Connect writes​

ToolFileWhat it owns
pi~/.pi/agent/models.jsonproviders.anthropic, providers.openai
omp~/.omp/agent/models.ymlthe same two, plus mcp.json for retrieval

Each entry gets a baseUrl, your key as apiKey, and the x-anyray-api-key and x-anyray-metadata headers. No models array, so each tool keeps its bundled catalog (new models need no Anyray update). Connect backs the file up and keeps everything else, including omp's YAML comments. --revert restores your previous values.

If you are signed in to a Claude or ChatGPT subscription

Connect leaves that provider on its sign-in and reports the tool as held. --org routes it anyway, onto the org's API bill. This is per provider. If you sign in later to a provider Connect was routing, the next run removes its entry so you are not billed twice.

Profiles and relocated config
ToolHonors
ompPI_CONFIG_DIR (dir under home, default .omp), OMP_PROFILE / PI_PROFILE, PI_CODING_AGENT_DIR
piPI_CODING_AGENT_DIR (whole agent path)

Connect writes where the tool reads. omp falls back to a legacy ~/.omp/agent/models.json when no YAML file exists; Connect edits that one and keeps it valid JSON.

Setting it up by hand
1
Open the config
~/.pi/agent/models.json for pi, ~/.omp/agent/models.yml for omp. Create it if it does not exist.
2
Re-point the two providers
Under providers, give anthropic a baseUrl of http://<gateway>:8787 and openai a baseUrl of http://<gateway>:8787/v1. Set apiKey to your ark_… key on each.
3
Leave out `models`
Omitting it keeps the built-in catalog for that provider.

The Anthropic URL is a bare origin because both tools append /v1/messages. The OpenAI transport appends /chat/completions.

Context retrieval​

ToolRetrieval
ompConnect registers the Anyray server in ~/.omp/agent/mcp.json, which gives the model anyray_retrieve
piNo MCP client, so irreversible trimming stays off. Reversible optimizations still apply. anyray-connect doctor reports "no MCP client" and the console shows Active · client has no MCP. Nothing to fix