omp packages

@orvix-id/omp0.2.1

Oh My Pi (omp) extension for Orvix: Coding Plan (/coding/v1) and Orvix Credits (/v1)

algonacci Published 3 days ago MIT ~252 downloads/mo

Built for omp

The author tagged this package omp-plugin.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@orvix-id/omp

Oh My Pi (omp) extension for the Orvix Coding Plan. omp runs the agent; this extension connects it to https://api.orvix.id/coding/v1 and keeps every session on the prompt cache.

Using OpenCode or Pi instead? See @orvix-id/opencode and @orvix-id/pi.

One install registers two providers:

Provider Pays with Endpoint Key variable Key scope
orvix-coding/* Coding Plan, AI Plan, campaigns https://api.orvix.id/coding/v1 ORVIX_CODING_API_KEY coding:invoke
orvix/* Orvix Credits, Token Plans https://api.orvix.id/v1 ORVIX_API_KEY ai:invoke

Bought a Coding Plan or AI Plan? Pick models from orvix-coding. The same model under orvix bills Orvix Credits, and with an empty balance it fails with insufficient Orvix Credits even though your plan has quota left. Model names end in (Orvix Coding) or (Orvix) so you can tell them apart. The extension never switches between the two on an error. A provider whose key variable is unset simply lists no models.

Setup

omp needs Bun 1.3.14 or newer.

  1. Create a Coding key. In platform.orvix.id/api-keys, create a key and tick Orvix Coding (coding:invoke). The default AI Router scope (ai:invoke) is not enough; Coding endpoints answer 401 coding:invoke scope required.

  2. Expose the key to omp:

    export ORVIX_CODING_API_KEY="orv-sk_live_..."
    

    For the orvix provider, create a key with AI Router (ai:invoke) and export it as ORVIX_API_KEY. One key with both scopes can go in both variables; orvix-coding also falls back to ORVIX_API_KEY when only that one is set. Put them in your shell profile or secret manager rather than typing them into commands you share.

  3. Install the extension, then restart omp or run /reload-plugins:

    omp plugin install @orvix-id/omp
    
  4. Pick a model: omp --model orvix-coding/deepseek-v4-flash.

Full Coding Plan guide, including other clients: docs.orvix.id/coding-plan.

Models

Each provider reads its list from its own GET /models when the key is available: orvix-coding gets the Coding lineup your plan covers, orvix gets the /v1 chat catalogue (image, video, audio and embedding models are left out). Without network access the extension falls back to the lineup it shipped with. Model ids drop the orvix/ prefix: orvix-coding/glm-5.2 and orvix/glm-5.2 both call orvix/glm-5.2 on their endpoint.

What the extension does

Piece Why
Providers orvix-coding and orvix on omp's built-in openai-completions API Message conversion, tools, and usage accounting stay omp's own.
session_id added in before_provider_request (orvix-coding) Orvix keeps a session on the same upstream route and prompt cache only when the request body carries session_id. omp's session id is stable across --continue.
orvix/ restored in before_provider_request (orvix) On /v1 the prefix selects Orvix Credits; without it the id would be read as a BYOK model.
x-orvix-coding-client header Reports the client name and extension version. Used for diagnostics only.

Cache behaviour to know about

omp rewrites parts of its own prompt on purpose, and each rewrite costs one cache miss from that point on:

  • Skill summaries. omp shortens skill descriptions with a model call and swaps the summary into the system prompt after the first turn. This happens once per new skill.
  • Superseded reads. When a file is read again, omp replaces the older result with [Superseded by a newer read of this file]. It only does this while few tokens follow the old result, or after the session has been idle for a while, so the cost stays small.

omp's system prompt is also the largest of the supported harnesses. Expect the first session on a new machine or project to use more uncached tokens than OpenCode or Pi.

Troubleshooting

Symptom Cause
SyntaxError: Unexpected identifier at startup Bun is older than 1.3.14.
No orvix-coding models The extension is not installed, or ORVIX_CODING_API_KEY is not set in omp's environment.
403 coding_not_entitled The account has no active Coding Plan (or AI Plan) that covers the request.
401 coding:invoke scope required The key was created without the Orvix Coding scope.
429 coding_concurrency_exceeded Too many Coding requests in flight at once. omp retries; retry_after is a few seconds.
429 coding_quota_exceeded A 5-hour, weekly, or monthly window is used up. resets_at says when.

Development

bun install
bun run check
PROBE_CLI=omp bun run probe   # 3 real omp turns against a local mock, reports prefix reuse per request

License

MIT