Skip to main content
Oh My Pi is a fork of Pi, and ValarCode routes it the same way: the CLI registers its own valar provider with a pinned model list, so the picker offers exactly Valar’s models (Auto plus the open-weight models). omp reports to Valar as Pi, so its routing and usage attribution are Pi’s. See Set up ValarCode for the shared setup and the client-id model.

Prerequisites

  • Oh My Pi installed and launched at least once (so ~/.omp/agent exists).
  • A Valar coding key (vlrcode_...) and the valar CLI (install).

Enable routing

Run once per machine:
omp reads its config at startup, so restart omp for the change to take effect. Check the state any time:
omp models lists the Valar catalog; pick a model with /model in a session or --model valar/<id> on the command line. Auto (valar-auto) is the default.

What gets written

omp keeps its config in YAML under ~/.omp/agent/. valar ohmypi on edits two files, preserving other providers, roles and unrelated keys: models.yml declares the valar provider against the gateway, with the key, the model list and the headers that attribute your traffic:
config.yml points the default model role at it:
A default already on a Valar model is kept when Valar still offers it, along with any thinking selector you appended to it (valar/zai-org/GLM-5.2:high). auth: apiKey is required. Without a declared auth mode, omp treats a custom anthropic-messages provider as a Claude Code proxy and changes the request: it places Claude Code’s system prompt ahead of yours and caps max_tokens at 64000. Declaring the mode turns that off, so your models get omp’s own prompt and the full output length. If you run omp under a profile (OMP_PROFILE, PI_PROFILE) or with a relocated config (PI_CONFIG_DIR, PI_CODING_AGENT_DIR), the CLI follows it and writes that profile’s files, so run valar ohmypi on with the same environment your omp sessions use. Both files are written user-only (0600), since they hold the key. Before the first change, the originals are snapshotted to ~/.valar/ohmypi/backup.json, so off can restore them.
The files are rewritten as plain YAML, so comments in them do not survive on. off restores the originals byte-for-byte when nothing else changed while routed; otherwise it removes only the valar provider and default role and keeps your other edits.

Turn off routing

Restart omp for the change to take effect.

Next steps

Model routing

How cohorts and the split decide which model serves each request.

Pi

The original Pi harness, which omp mirrors.