@zigai/pi-model-filter
Pi package that hides configured models from Pi model selection and lookup.
Package details
Install @zigai/pi-model-filter from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@zigai/pi-model-filter- Package
@zigai/pi-model-filter- Version
0.5.0- Published
- Aug 3, 2026
- Downloads
- 1,175/mo · 199/wk
- Author
- zigai
- License
- MIT
- Types
- extension
- Size
- 239.7 KB
- Dependencies
- 1 dependency · 2 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 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.
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:
/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()
It does not delete provider definitions, model definitions, or credentials.
License
MIT