omp packages

@ody./pi-model-alias0.1.0

Stable alias/<id> names for Pi chat models that inherit the target's capabilities and dispatch through its provider.

ody. Published 2 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

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

Reports 0

No reports yet.

Readme

pi-model-alias

Give a registered Pi chat model a stable alias/<id> name. Pi sends each request through the target provider with its own credentials and model ID. See ADR 0002.

Install

pi install npm:@ody./pi-model-alias

To install from a checkout, run pi install .. Keep the target provider installed and configured.

The extension uses Pi's runtime registration order to inherit metadata before model selection. The test suite verifies this behavior on Pi 1.5.2. Run the tests again before upgrading Pi.

Configure an Otari alias

Define the alias in <agent-dir>/pi-model-alias.json.

{
  "deepseek/deepseek-v4.1-flash": {
    "target": "otari/deepseek-v4.1-flash-fast"
  }
}

Select it with pi --model alias/deepseek/deepseek-v4.1-flash. For Home Manager, put only the alias in enabledModels.

programs.pi-coding-agent.settings.enabledModels = [
  "alias/deepseek/deepseek-v4.1-flash"
];

Aliases inherit input types, token limits, and thinking levels from the target. To limit the thinking cycle, add a nonempty thinkingLevels array using only levels the target supports.

If the target is unavailable, Pi reports both IDs and sends no provider request. Restart Pi rather than using /reload after changing aliases or target capabilities.

Test

Run npm run test from the repository root with Node.js and Pi on PATH. The integration tests use two loopback stub providers and need no live credentials.

Release

Run the release with Task from a clean main, logged in to npm.

  1. Run task bump BUMP=patch. BUMP also accepts minor, major, or x.y.z.
  2. Run task release DRY=1 to test and do an npm dry run.
  3. Run task release to test, publish, tag v<version>, and push.