mit-parley-pi-extension

Pi custom provider extension for MIT Parley API

Packages

Package details

extension

Install mit-parley-pi-extension from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:mit-parley-pi-extension
Package
mit-parley-pi-extension
Version
0.6.1
Published
Oct 2, 2026
Downloads
1,099/mo · 131/wk
Author
askprash
License
MIT
Types
extension
Size
186.7 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

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

README

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.

Commands

Command Purpose
/parley-models Show model catalog status and metadata sources
/parley-models refresh Refresh models, prices, and token limits
/parley-key Choose a configured key; /parley-key personal switches directly
/parley-footer Toggle 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 variable Effect
PARLEY_KEY_PROFILE=personal Choose the startup key
PARLEY_BASE_URL Use an alternative endpoint or credential proxy
PARLEY_MODEL_DISCOVERY=0 Use the bundled catalog without discovery requests
PARLEY_DOCS_REFRESH=0 Discover 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.