omp packages

pi-consult0.2.2

Pi coding agent extension: /consult audits the current session with a second "auditor" model, then restores your original model.

projectyelen Published 27 days ago MIT ~484 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-consult

A Pi coding agent extension. /consult audits the current session with a second auditor model, then automatically restores your original model when the audit finishes — a quick "second opinion" from another model without leaving your session.

Features

  • /consult quick — fast, concise audit (bugs, edge cases, quick wins).
  • /consult deep — deep architectural audit (safety, structure, performance); also bumps the auditor's thinking level where supported.
  • Works with any providers you have configured. The model ranking is provider-agnostic — it ranks whatever models your session exposes and never assumes a particular provider is present, so it behaves the same whether you run one provider or many.
  • Model picker with a provider-diverse top-5 "good but affordable" shortlist plus a paged full list, so long model catalogues never scroll off-screen.
  • Restores your original model (and thinking level) automatically afterwards.

Install

pi install npm:pi-consult

Or declare it in settings.json (~/.pi/agent/settings.json, or .pi/settings.json to share with your team):

{
  "packages": ["npm:pi-consult"]
}

Manual (single file): copy src/index.ts from the package into ~/.pi/agent/extensions/consult.ts (global) or .pi/extensions/consult.ts (project-local), then run /reload.

Usage

/consult                     Pick mode, then pick the auditor model
/consult quick               Quick audit, then pick the auditor model
/consult deep                Deep audit, then pick the auditor model
/consult quick openai/gpt-5  Skip the picker and use a specific model

In the picker, arrow to a model and press Enter, or choose "Select other… (full list)" to page through every available model.

How Pi loads this

Installed as a package, Pi downloads it into its own isolated directory and reads the pi.extensions field in package.json to find the entry file (src/index.ts). Nothing is copied into a shared extensions/ folder, so the index.ts filename never collides with other packages. The command name /consult is what's user-facing; if another extension also registers consult, Pi disambiguates them as /consult:1, /consult:2.

How the model ranking works

The picker is built to be sensible for every user, whatever providers they have:

  • It ranks only the models your session actually exposes (via ctx.scopedModels, falling back to the full catalogue). No provider is assumed to exist.
  • "Good but affordable" combines each model's cost, reasoning, and contextWindow metadata (all provider-neutral) with light, generic name hints for efficient tiers (mini, flash, haiku, lite, small param sizes…) and flagship tiers (opus, ultra, max, pro, large param sizes…).
  • The top-5 shortlist is spread across providers: the best value pick from each provider first, then the next best overall. With a single provider you just get that provider's top 5.

Because everything is metadata- and pattern-based, models that match no hint are ranked purely on their metadata — nothing breaks on an unusual or single-provider setup.

Tuning

Edit the values near the top of src/index.ts:

  • PAGE_SIZE — models shown per screen in the full list (lower it for short terminals).
  • VALUE_HINTS / PREMIUM_HINTS and scoreModel() — the ranking heuristics. These are generic, cross-vendor tokens; update them as new models are released.

Requirements

  • Pi coding agent. No runtime dependencies (the only import is a type from @earendil-works/pi-coding-agent, provided by Pi and erased at runtime).

License

MIT © Martin Dude