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/agentexists). - A Valar coding key (
vlrcode_...) and thevalarCLI (install).
Enable routing
Run once per machine: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:
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
Next steps
Model routing
How cohorts and the split decide which model serves each request.
Pi
The original Pi harness, which omp mirrors.