Install
Install with PiG
pig install npm:@zigai/pi-model-filterInstall with Pi
pi install npm:@zigai/pi-model-filterPackages 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": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.6.0 (README.md). PiG does not review it.
Pi Model Filter
Focused model lists for Pi, showing only the models you want.
Install
pi install npm:@zigai/pi-model-filter
Configuration
Global settings are stored in ~/.pi/agent/extension-settings/pi-model-filter.json.
| Option | Type | Default | Description |
|---|---|---|---|
include | { provider: string; models: string[] }[] | [] | Provider and model glob rules that form inclusion allowlists. |
exclude | { provider: string; models: string[] }[] | [] | Provider and model glob rules that hide matching models. |
Defaults
{
"$schema": "./schemas/pi-model-filter.schema.json",
"include": [],
"exclude": []
}
Advanced example
{
"$schema": "./schemas/pi-model-filter.schema.json",
"include": [
{
"provider": "openai-codex",
"models": [
"gpt-5.*"
]
}
],
"exclude": [
{
"provider": "openai-codex",
"models": [
"*-mini"
]
}
]
}
Rules
providerandmodelsmatch provider/model ids.- Exact strings and glob patterns are supported.
*matches any number of characters;?matches one character.includeallowlists models for matching providers.excludehides matching models and always wins overinclude.- Providers without
includerules stay visible unless excluded. - The same rules apply to chat, image, and classifier catalogs and lookups.
How is this different from /scoped-models?
Pi has a built-in /scoped-models command. It shows an interactive checklist that lets you enable or disable individual models for Ctrl+P cycling. Changes are session-only until you press Ctrl+S to persist them.
pi-model-filter works differently:
| (blank) | /scoped-models | pi-model-filter |
|---|---|---|
| How you configure it | Interactive checklist | JSON config file with glob patterns |
| What it affects | Ctrl+P model cycling only | /model, Ctrl+L, Ctrl+P cycling, and modelRegistry.*() lookups |
| Persistence | Optional (save with Ctrl+S) | Always loaded from JSON config |
| Use case | Quickly narrow the active cycle list | Permanently hide noisy/unwanted models everywhere |
Behavior
This extension filters models from Pi's model registry views, including:
/model- model cycling
modelRegistry.getAll()modelRegistry.getAvailable()modelRegistry.find()- Typed registry catalogs and lookups (
getModelsOfType,getAvailableOfType,getModelOfType,findOfType) - Runtime catalogs and lookups, including typed views,
getAllModels(), andgetAllAvailable()
It does not delete provider definitions, model definitions, or credentials.
License
MIT