@0xkahi/pi-model-select

Pi extension that adds /select-model with favourites and provider-filtered model search

Packages

Package details

extension

Install @0xkahi/pi-model-select from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@0xkahi/pi-model-select
Package
@0xkahi/pi-model-select
Version
1.1.1
Published
Jun 13, 2026
Downloads
494/mo · 197/wk
Author
0xkahi
License
unknown
Types
extension
Size
34.1 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

pi-model-select

Pi extension that adds /select-model: a model picker with favourites plus provider-filtered fuzzy search. By default it renders inline like Pi's built-in /model; it can optionally render as a centered overlay.

Install

Install globally (writes to ~/.pi/agent/settings.json):

pi install npm:@0xkahi/pi-model-select

Or install into the current project only (writes to .pi/settings.json, shareable with your team):

pi install npm:@0xkahi/pi-model-select -l

Pin a specific version:

pi install npm:@0xkahi/pi-model-select@1.0.0

Install directly from GitHub instead of npm:

pi install git:github.com/0xKahi/pi-model-select
pi install git:github.com/0xKahi/pi-model-select@v1.0.0   # pinned

Try without installing

Use -e / --extension to load for a single run without modifying settings:

pi -e .                          # from inside this repo

Manage

pi list                                       # show installed packages
pi update npm:@0xkahi/pi-model-select         # update this package
pi remove npm:@0xkahi/pi-model-select         # uninstall

The package manifest exposes ./src/index.ts as a Pi extension.

Command

/select-model
  • Tab switches between Favourites and Search.
  • ↑/↓ navigates, Enter selects, Esc cancels.
  • Selecting a model calls Pi's model setter, matching /model behavior.
  • Optional direct form: /select-model provider/modelId.

Config files

Scope Path
Global ~/.pi/agent/extensions/pi-model-select/config.json (respects PI_CODING_AGENT_DIR)
Project <cwd>/.pi/extensions/pi-model-select/config.json

The extension accepts JSON with comments and trailing commas.

Project config overrides global provider_filter and layout when those keys are present. Favourites are combined from global then project and de-duplicated.

{
  "$schema": "https://raw.githubusercontent.com/0xKahi/pi-model-select/main/config.schema.json",
  "favourite": [
    {
      "provider": "openai-codex",
      "modelId": "gpt-5.5"
    },
    {
      "provider": "anthropic",
      "modelId": "claude-opus-4-7"
    },
    {
      "provider": "opencode-go",
      "modelId": "kimi-k2.6"
    }
  ],
  // Optional. Defaults to "inline", which replaces the editor at the bottom like Pi's /model.
  // Use "overlay" for the previous centered floating card behavior.
  "layout": "inline",
  // Empty array means no filter: all authorized providers are shown.
  "provider_filter": ["openai-codex", "anthropic", "opencode-go", "openrouter"]
}

Config options

Key Type Default Description
favourite { provider: string, modelId: string }[] [] Models shown in the Favourites tab. Alias keys favourites, favorite, and favorites are also accepted.
provider_filter string[] [] Provider names shown in Search. Empty means all authorized providers. Project config overrides global when present.
layout "inline" | "overlay" "inline" inline replaces the editor at the bottom; overlay shows the centered floating card.