@juicesharp/rpiv-advisor

Pi extension. A second opinion the model can request from a stronger reviewer model before it acts.

Packages

Package details

extension

Install @juicesharp/rpiv-advisor from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@juicesharp/rpiv-advisor
Package
@juicesharp/rpiv-advisor
Version
1.12.0
Published
May 21, 2026
Downloads
15.9K/mo · 5,644/wk
Author
juicesharp
License
MIT
Types
extension
Size
40.2 KB
Dependencies
1 dependency · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

rpiv-advisor

Let the model ask a stronger model for a second opinion before it acts. rpiv-advisor adds the advisor tool and /advisor slash command to Pi Agent - the working model can hand the full conversation to a reviewer (e.g. Opus) and resume with its plan, correction, or stop signal.

Advisor model selector

Features

  • Reviewer model selector - /advisor opens a picker over any model in Pi's registry, plus a reasoning-effort picker for reasoning-capable models.
  • Persisted across sessions - selection saved at ~/.config/rpiv-advisor/advisor.json (chmod 0600).
  • Off by default - the advisor tool is excluded until you pick a model; choose "No advisor" to disable.
  • Per-executor blocklist - list executor models in disabledForModels (in advisor.json) to strip the advisor tool when those models drive the session. Entries can be plain strings (block at any effort) or { "model": "<provider:id>", "minEffort": "<level>" } to block only when the executor's effort meets or exceeds the threshold. Available levels, lowest to highest: minimal, low, medium, high, xhigh.
  • Zero-parameter handoff - calling advisor forwards the full serialized conversation branch; no manual prompt needed.

Install

pi install npm:@juicesharp/rpiv-advisor

Then restart your Pi session.

Usage

Configure an advisor model with /advisor - the command opens a selector for any model registered with Pi's model registry, plus a reasoning-effort picker for reasoning-capable models. Selection persists across sessions at ~/.config/rpiv-advisor/advisor.json (chmod 0600).

The advisor tool is registered at load but excluded from active tools by default; selecting a model via /advisor enables it. Choose "No advisor" to disable.

advisor takes zero parameters - calling it forwards the full serialized conversation branch to the advisor model, which returns guidance (plan, correction, or stop signal) that the executor consumes.

Tool

  • advisor - escalate the current conversation branch to the configured reviewer model. Inactive until a model is selected via /advisor.

Schema

advisor() // zero parameters

The full conversation branch is auto-serialized from ctx.sessionManager - the LLM does not (and cannot) pass it explicitly.

Returns:

{
  content: [{ type: "text", text: string }], // reviewer's guidance, or error message
  details: {
    advisorModel?: string,        // "<provider>:<modelId>"
    effort?: ThinkingLevel,       // reasoning effort, when applicable
    usage?: Usage,                // token usage from the side-call
    stopReason?: StopReason,      // pi-ai stop reason
    errorMessage?: string,        // populated on auth/abort/error/empty paths
  }
}

License

npm version License: MIT

MIT