A clean, provider-grouped model picker extension for Pi with pinning, archiving, defaults, and reasoning-effort selection.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-03 08:48:25 +02:00
.pi/extensions Initial release of sorted model picker extension 2026-09-03 08:38:59 +02:00
LICENSE Initial release of sorted model picker extension 2026-09-03 08:38:59 +02:00
package.json Avoid reinstalling Pi runtime peer packages 2026-09-03 08:48:25 +02:00
README.md Add Pi package manifest and install instructions 2026-09-03 08:46:55 +02:00

Sorted Model Picker for Pi

A Pi extension that replaces the built-in /model dialog with a cleaner model picker, naturally sorted and grouped by provider.

Features

  • Groups models by provider and sorts them alphabetically.
  • Uses natural model-name sorting (model-2 before model-10).
  • Provides instant search across providers, model IDs, display names, and capabilities.
  • Shows reasoning support, vision support, context size, and the selected reasoning effort.
  • Clearly marks the currently active model.
  • Pins favorite models in a dedicated section at the top.
  • Archives models to hide them from the regular list and allows restoring them later.
  • Sets a default model that is selected automatically for new chats.
  • Opens a separate reasoning-effort dialog after selecting a reasoning-capable model.
  • Respects enabledModels, --models, and available authentication/API keys.
  • Supports direct selection with /model provider/model-id.
  • Provides /models-sorted and /sorted-models as fallback commands.

Installation

Install the extension directly from Forgejo:

pi install https://forgejo.asxh.de/lha/pi-sorted-model-picker.git

Then restart Pi or run /reload in an active session. Pi stores the package in your global package configuration, so it is available in every project.

To update it later:

pi update --extensions

To remove it:

pi remove https://forgejo.asxh.de/lha/pi-sorted-model-picker.git

Manual project-local installation

Copy the extension into your project's Pi extension directory:

.pi/extensions/sorted-models.ts

Run /reload in Pi. The regular /model command will then open the sorted picker.

Manual global installation

To make the extension available in every project without using pi install:

mkdir -p ~/.pi/agent/extensions
cp .pi/extensions/sorted-models.ts ~/.pi/agent/extensions/sorted-models.ts

Run /reload in an active Pi session or restart Pi.

Usage

  • Type to filter the model list.
  • ↑ / ↓: Navigate.
  • Enter: Select a model, then choose its reasoning effort.
  • F1: Show or hide the additional model actions.
  • Alt+P: Pin or unpin the selected model.
  • Alt+X: Archive or restore the selected model.
  • Alt+D: Set or clear the default model.
  • Alt+A: Switch between active and archived models.
  • Esc: Close the picker.

Settings are stored globally in:

~/.pi/agent/sorted-models.json

Notes

Pi handles built-in commands before extension commands. To replace /model, this extension wraps the interactive editor and intercepts the command before Pi opens its built-in picker. The fallback commands remain available in case another extension also customizes the editor.

License

MIT