Browse and switch AI models in Pi with an intuitive cascading menu.
This extension adds a /models command to Pi that opens an interactive model browser. Instead of typing model IDs, you can visually navigate through providers and model families to find and switch models instantly.
Pi Models replaces manual model switching with a point-and-select interface:
- Visual browsing - See all available models organized by provider or family
- Three browsing modes - Choose your navigation style: by provider, lab, or model family
- Smart grouping - Automatically groups models into families (GPT-4, Claude, Llama, etc.)
- Multi-provider awareness - When the same model is available from multiple providers (e.g., Claude via Anthropic, AWS, or Vertex), you choose which one to use
- Free model discovery - All free models from any provider grouped together at the top
- No truncation - Full model names are displayed with dynamic column sizing
- Live catalog metadata - Families and labs are enriched from models.dev
When /models opens, the extension fetches api.json and catalog.json from models.dev. Their family and canonical lab metadata is applied to the models already available in Pi, so new families appear without an extension release. Pi's registry remains the source of the selectable models because it knows which providers have credentials and which local models are installed.
The catalog is cached for the current Pi session. If models.dev is unavailable, the existing local family heuristic is used automatically. Family labels include detected versions such as Gemma 4, GPT 5, GLM 4/5, and MiniMax 2.5/2.7/3.
Type /models in Pi's input box and press Enter:
User: /models
Pi: [Model browser opens]
First, pick how you want to browse:
π¦ Browse Models
β π¦ By Provider β Browse provider β model
π¬ By Lab β Browse lab β all models from that lab
π·οΈ By Model Family β Browse family β provider β model
| Mode | Best For | Flow |
|---|---|---|
| By Provider | When you know which provider hosts the model | Provider β Model |
| By Lab | When you want to see all models from a specific lab/company | Lab β All Models |
| By Model Family | When you know the model type and want family filtering | Family β Provider (if multi) β Model |
Navigate: β/β or k/j to move, Enter to select, Esc to cancel
π¦ Models π¦ anthropic
β π Free Models (3) β β claude-sonnet-4-20250514
anthropic (8) claude-haiku-3-20240307
google (4) claude-opus-4-20250514
openai (6)
ollama (12)
- Select a provider (or π Free Models)
- See all models for that provider
- Select a model to switch to it
π·οΈ Model Families π·οΈ Claude Sonnet
β π Free Models (3) β anthropic
Claude Haiku (2) aws
Claude Opus (2) vertex
Claude Sonnet (3)
GPT-4o (4)
Llama 3.3 (5)
- Select a model family (or π Free Models)
- If multiple providers: Choose which provider's version
- If single provider: Latest version is selected automatically
- Model switches instantly
After selection, Pi immediately switches to that model:
[System: Switched to claude-sonnet-4-20250514]
The extension uses models.dev family metadata when available and falls back to pattern matching on model IDs and names when a model is not in the catalog:
| Family | Pattern | Example IDs Matched |
|---|---|---|
| ByteDance | bytedance |
bytedance-doubao, bytedance-seed |
| Claude | claude |
claude-opus-4, claude-sonnet-3.5, claude-haiku-3 |
| Cohere | cohere |
cohere-command, cohere-embed |
| Command | command |
command-r-plus, command-r, command-light |
| Doubao | doubao |
doubao-pro-32k, doubao-lite-128k, bytedance-doubao |
| E5 | e5 |
e5-large, e5-base-v2, intfloat/e5 |
| GPT | gpt |
gpt-4o, gpt-4-turbo, gpt-3.5-turbo, o1-preview |
| Gemini | gemini |
gemini-1.5-pro, gemini-1.5-flash, gemini-ultra |
| Llama | llama |
llama3.2, llama-3.3-70b, codellama-70b |
| DeepSeek | deepseek |
deepseek-chat, deepseek-r1 |
| Qwen | qwen |
qwen3.5-397b, qwen3-coder, qwen3-vl |
| MiniMax | minimax |
minimax-m2.5, minimax-m2 |
| Kimi | kimi or moonshot |
kimi-k2.5, moonshot-v1-32k |
| GLM | glm or chatglm |
glm-4.7, glm-5, chatglm3 |
| Nemotron | nemotron |
nemotron-4-340b, nemotron-3-super |
| Mistral | mistral |
mistral-large-3, mistral-small |
| BGE | bge |
bge-large-en-v1.5, bge-base-en-v1.5, bge-m3 |
| Arcee | arcee or trinity |
trinity-large-preview, arcee-ai/trinity-mini |
| Hermes | hermes |
hermes-2-pro, hermes-3-llama |
| Hy3 | hy3 |
hy3-70b, hy3-lite |
| HY 2.0 | hy2 |
hy2-7b, hy2-33b |
| Inclusion AI | inclusion |
inclusion-ling, inclusion-llada2, inclusion-ring |
| Laguna | laguna |
laguna-3b, laguna-7b, poolside-laguna |
| Ling | ling |
ling-1, ling-v2, inclusion-ling |
| Llada2 | llada |
llada2-7b, llada2-13b, inclusion-llada2 |
| Lyria | lyria |
lyria-1, lyria-v2 |
| Veo 2 | veo2 |
veo2, veo2-create |
| Ring | ring |
ring-1, ring-v2, inclusion-ring |
| Poolside | poolside |
poolside-laguna, poolside-assist |
| LFM 2 | lfm2 |
lfm2-7b, lfm2-40b |
| Qianfan | qianfan |
qianfan-chat, qianfan-ernie |
| Other | router, auto |
Router models grouped separately |
Multi-Provider Grouping: Models with the same name from different providers (e.g., Trinity Large Preview from zen, kilo, cline) are automatically merged into the same family.
Ollama Models: Local Ollama models are grouped with their brand families (e.g., ollama/llama3.2 β Llama family, ollama/qwen2.5 β Qwen family).
The extension includes an 81-test suite covering model family detection, grouping, models.dev enrichment, and utility functions:
# Install dependencies
npm install
# Run tests once
npm test
# Run tests in watch mode during development
npm run test:watch
# Type check
npm run typecheck| Area | Coverage |
|---|---|
isModelFree() |
Pricing and name-based free-model detection |
detectModelFamily() |
Brand patterns, routers, fallbacks |
| Grouping helpers | Providers, families, labs, and name merging |
| models.dev enrichment | Live family/lab metadata and missing matches |
Total: 81 tests covering all major functionality and edge cases.
pi install npm:pi-modelsThis installs the package and adds it to your settings.json automatically. Run /reload in Pi to activate.
Add to ~/.pi/agent/settings.json:
{
"packages": ["npm:pi-models"]
}Then run /reload in Pi.
cd ~/.pi/agent/extensions
git clone https://github.com/apmantza/pi-models.gitOr copy just the file:
cp pi-models.ts ~/.pi/agent/extensions/Run /reload in Pi.
| Key | Action |
|---|---|
β / β or k / j |
Navigate up/down |
Enter |
Select highlighted item |
Esc |
Go back to previous level / close browser |
- Pi v1.0+ with TypeScript extension support
- Models must have configured auth (API keys or local dummy keys like
"ollama")
- New: Enrich model families and labs from models.dev at runtime
- Improved: New models.dev families no longer require a manual extension update
- Improved: Free model variants are merged with their base families
- Fixed: 5 CodeQL ReDoS alerts in
normalizeModelNameβ polynomial backtracking eliminated
- New: BGE model family (BAAI lab)
- New: E5 model family (Intfloat lab)
- New: Veo 2 model family (Google lab)
- New: HY 2.0 model family (Tencent lab)
- New: LFM 2 model family (Liquid lab)
- New: Hermes, Hy3, Lyria, and Qianfan model family support
- New: Provider count shown in "By Model Family" view (e.g., "Claude Sonnet (3)")
- Improved: Overlay screens auto-resize to fit content width
- Fixed: OpenAI o4 models now correctly group under OpenAI lab (added "o4" to o-series detection)
- Fixed: By Lab view now shows all models directly without intermediate family selection step
- Fixed: Ollama models now group with brand families instead of separate
ollama-*families - New: Name-based family merging - models with same name from different providers auto-merge
- New: Arcee/Trinity model family support
- New: Router models (
router,auto,kilo-auto/free) grouped into "Other" family - New: Mistral model family support
- New: Complete test suite (60 tests)
- New: Browse mode selection (By Provider / By Model Family)
- New: Automatic model family detection with heuristic pattern matching
- New: Multi-provider selection for same model families (e.g., Claude from Anthropic/AWS/Vertex)
- Improved: Dynamic column sizing - model names are no longer truncated
- Improved: Wider overlays for better visibility
- Improved: Free Models accessible in both browse views
- Initial release
- Two-level provider β model browsing
- Free models virtual provider
- Local model support (Ollama)
Author: Apostolos Mantzaris
License: MIT