@zigai/pi-model-filter
v0.5.0
Published
Pi package that hides configured models from Pi model selection and lookup.
Maintainers
Readme
Pi Model Filter
Focused model lists for Pi, showing only the models you want.
Install
pi install npm:@zigai/pi-model-filterConfiguration
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
