← Catalog

mit-parley-pi-extension

Pi custom provider extension for MIT Parley API

Extension

Install

Install with PiG

pig install npm:mit-parley-pi-extension

Install with Pi

pi install npm:mit-parley-pi-extension
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./dist/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.6.3 (README.md). PiG does not review it.

MIT Parley Pi Extension

Use MIT Parley models in the Pi coding agent, with automatic model discovery, thinking settings, key switching, and a footer showing context usage and estimated cost.

For accounts, API keys, model capabilities, and billing, look at the Parley docs.

Install

With Pi installed:

pi install npm:mit-parley-pi-extension
export PARLEY_API_KEY="your-parley-api-key"
pi

Use /model to choose an MIT-parley model and Shift+Tab to change the thinking level. Update the extension with pi update --extension npm:mit-parley-pi-extension (or pi update --extensions for all packages; plain pi update only updates Pi itself).

Commands

CommandPurpose
/parley-modelsShow model catalog status and metadata sources
/parley-models refreshRefresh models, prices, and token limits
/parley-keyChoose a configured key; /parley-key personal switches directly
/parley-footerToggle the extension's footer

Model discovery

The extension discovers supported chat models at startup, on /reload, and when switching keys. It checks documented prices and token limits daily. Network requests have a four-second deadline; failures fall back to cached or bundled data.

Models with inferred details are labeled (estimated metadata). Unsupported model families are skipped. Footer costs are estimates, not invoices.

Multiple keys

Give each key a nickname through its environment variable:

export PARLEY_PERSONAL_API_KEY="your-personal-key"
export PARLEY_COURSE_API_KEY="your-course-key"

Switch with /parley-key personal or /parley-key course. The selection is saved with the session and inherited by child processes. Switching keys resets the footer's cost counter.

Options

Environment variableEffect
PARLEY_KEY_PROFILE=personalChoose the startup key
PARLEY_BASE_URLUse an alternative endpoint or credential proxy
PARLEY_MODEL_DISCOVERY=0Use the bundled catalog without discovery requests
PARLEY_DOCS_REFRESH=0Discover models but use bundled prices and limits

Development

npm install
npm run validate     # builds dist/ and runs tests and structural checks
pi --no-extensions -e ./dist/index.js

The last command loads only this extension for testing, avoiding a second npm-installed copy. Commit rebuilt dist/ files with source changes.

Before publishing, bump the version in package.json, run npm run validate, and commit the release. Publish with npm publish --access public.