A Pi extension that lets you choose an API service_tier per provider/model.
Use it when you want to turn on faster or paid priority tiers for one model without changing your prompts, tools, selected model, or the rest of your Pi setup.
- Adds a top-level
service_tierfield to outgoing provider request payloads. - Scopes settings to the current
provider/modelpair. - Supports project-local settings and user-global defaults.
- Provides simple
/fast-*commands forservice_tier: "priority". - Keeps a support map so unsupported provider/model pairs are not modified.
- Detects unsupported tier errors and updates the support map.
The extension only injects service_tier when all of these are true:
- the current
provider/modelpair is active in the effective config, - a service tier is configured for that pair, and
- the support map says that tier is supported for that pair.
Note
This extension injects the provider payload field service_tier. For Pi's built-in OpenAI providers, Pi also has an internal serviceTier stream option used for cost accounting. This extension is intentionally broader and payload-hook based, so it does not adjust Pi's internal cost multiplier.
- Pi installed and available as
pi. - Node.js
>=22. git, if installing directly from GitHub.- A provider/model that supports
service_tierif you want injection to happen.
Install the package, reload Pi, then enable priority mode for the current provider/model.
pi install npm:pi-provider-service-tierInside Pi:
/reload
/fast-project on
/fast-project status
Use pi install -l npm:pi-provider-service-tier instead if you want a project-local install rather than a user-global install.
Install globally for your Pi user settings:
pi install npm:pi-provider-service-tierOr install only for the current project:
pi install -l npm:pi-provider-service-tierRestart Pi, or run /reload inside Pi after installing.
Install globally for your Pi user settings:
pi install git:github.com/luxmargos/pi-provider-service-tierOr install only for the current project:
pi install -l git:github.com/luxmargos/pi-provider-service-tiergit clone https://github.com/luxmargos/pi-provider-service-tier.git
cd pi-provider-service-tier
npm installLoad it temporarily for one Pi run:
pi -e .Or install the local checkout for the current project:
pi install -l .Restart Pi or run /reload, then enable a tier:
/service-tier-project priority
List installed Pi packages:
pi listRemove the user-global npm install:
pi remove npm:pi-provider-service-tierRemove the project-local npm install:
pi remove -l npm:pi-provider-service-tierRemove the user-global GitHub install:
pi remove git:github.com/luxmargos/pi-provider-service-tierRemove the project-local GitHub install:
pi remove -l git:github.com/luxmargos/pi-provider-service-tierRemove the project-local local checkout install:
pi remove -l .Tip
Do not load the same checkout with pi -e . while it is also installed with pi install -l .. Pi may load duplicate commands with numeric suffixes.
Fast mode is a convenience wrapper for enabling service_tier: "priority" for the current provider/model.
| Command | Scope | Description |
|---|---|---|
/fast-project |
Current project | Toggle priority tier for the current provider/model. |
/fast-project on |
Current project | Enable priority tier. |
/fast-project off |
Current project | Disable this extension for the current provider/model in this project. |
/fast-project status |
Current project | Show the current project setting. |
/fast-user |
User-global | Toggle priority tier for the current provider/model. |
/fast-user on |
User-global | Enable priority tier as a user default. |
/fast-user off |
User-global | Disable the user-global setting for the current provider/model. |
/fast-user status |
User-global | Show the current user-global setting. |
Use these commands when you want a tier other than priority.
| Command | Scope | Arguments |
|---|---|---|
/service-tier-project <tier> |
Current project | priority, flex, default, auto, scale, off, status |
/service-tier-user <tier> |
User-global | priority, flex, default, auto, scale, off, status |
Examples:
/service-tier-project flex
/service-tier-project off
/service-tier-user priority
/service-tier-user status
Commands apply only to the current provider/model pair. Argument completions are available; type a command plus a space, then press Tab.
/service-tier-build-map
/service-tier-build-map-all
/service-tier-build-mapupdates the support map for the current provider/model./service-tier-build-map-allupdates the support map for all models returned by Pi's model registry.
With aggressive probing off, map building uses bundled presets. With aggressive probing on, the extension sends low-token probe requests for each tier and model.
Toggle aggressive probing for the current project config:
/service-tier-aggressive-probe
/service-tier-aggressive-probe on
/service-tier-aggressive-probe off
/service-tier-aggressive-probe status
Warning
Aggressive probing can cost money and trigger provider rate limits. It is off by default.
/service-tier-debug on
/service-tier-debug off
/service-tier-debug status
Debug mode is session-local. When enabled, the extension notifies whether each provider request was injected with service_tier or skipped.
This package uses pi-provider-service-tier for package and config-file identity.
Project config:
.pi/extensions/pi-provider-service-tier.json
User-global config:
~/.pi/agent/extensions/pi-provider-service-tier.json
Global support map:
~/.pi/agent/extensions/pi-provider-service-tier-map.json
Project and user configs are merged:
- user config provides defaults,
- project config overrides fields for the same provider/model key,
- provider/model entries that exist only in user config still apply in projects unless overridden.
If you previously used an older local package name, move or copy any existing pi-service-tier*.json files to the filenames above.
Example:
{
"version": 1,
"aggressiveProbe": false,
"entries": {
"openai/gpt-5.5": {
"active": true,
"serviceTier": "priority"
},
"openai/gpt-4.1": {
"active": false,
"serviceTier": "flex"
}
}
}aggressiveProbe defaults to false. Use /service-tier-aggressive-probe [on|off|status] to manage the project config, or set it manually in either config file. Project config overrides user config for this field.
Example:
{
"version": 1,
"entries": {
"openai/gpt-5.5": {
"provider": "openai",
"id": "gpt-5.5",
"api": "openai-responses",
"supported": true,
"tiers": ["priority", "flex", "default", "auto", "scale"],
"source": "preset",
"updatedAt": "2026-05-19T00:00:00.000Z"
}
}
}Preset support currently includes:
| Provider/API | Models | Tiers |
|---|---|---|
openai + openai-responses |
all | priority, flex, default, auto, scale |
openai + openai-completions |
all | priority, flex, default, auto, scale |
openai-codex + openai-codex-responses |
probed models in presets/openai-codex.json |
priority, default |
openai-codex + openai-codex-responses |
fallback for other models | priority |
opencode-go + openai-completions |
probed models in presets/opencode-go.json |
model-specific; usually priority, flex, default, auto, scale |
Other providers/models are marked unsupported by presets until aggressive probing or future presets add support.
If a provider returns an error indicating service_tier is unsupported or invalid, the extension:
- removes that tier from the map entry for the current provider/model,
- records it in
unsupportedTiers, - notifies the user, and
- does not retry the failed request.
git clone https://github.com/luxmargos/pi-provider-service-tier.git
cd pi-provider-service-tier
npm install
npm run checkLocal smoke test:
pi -e . --provider openai --model gpt-5.5npm run check runs TypeScript type checking, Node tests, and npm pack --dry-run to verify the published package contents.
MIT