@firespoon/pi-tier
Set the service tier and inspect the upstream response in Pi.
Package details
Install @firespoon/pi-tier from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@firespoon/pi-tier- Package
@firespoon/pi-tier- Version
0.1.1- Published
- Nov 21, 2026
- Downloads
- 493/mo · 493/wk
- Author
- firespoon
- License
- MIT
- Types
- extension
- Size
- 11.4 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/tier.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Tier
Set a service tier for the current Pi session and check which tier the current model's upstream endpoint reports. Requires Pi 1.6 or later.
pi install npm:@firespoon/pi-tier
| Command | Effect |
|---|---|
/tier |
Show the selection, current model, and latest upstream result for that route. |
/tier standard |
Request default. |
/tier fast |
Request priority. |
/tier ultrafast |
Request ultrafast. |
The extension starts in inherited mode. Once you select a tier, it applies to subsequent requests in the session on allowed providers using openai-responses or openai-codex-responses. A new session or extension reload clears the selection.
Provider allowlist
The default provider IDs are openai and openai-codex. To configure the full allowlist, add pi-tier.json to your Pi agent directory (~/.pi/agent by default), then run /reload.
{
"providers": ["openai", "openai-codex", "my-proxy"]
}
Use the provider ID shown before / in the model name. The file replaces the default list, and an empty list disables tier injection. An invalid file disables tier injection and shows a configuration message in /tier. A proxy configured under the openai ID is already covered by the default list.
Run /tier again after a normal model response to check the result. The extension uses the server's service_tier from the final response event to confirm a tier or report a different one. A completed response without that field leaves the tier unconfirmed. A tier-specific error is shown as a rejection. Checking the status itself sends no model request.
Fast and Ultrafast can affect API prices or subscription usage. The upstream endpoint, provider, and account determine which tiers are available.
Pi applies request changes in extension load order. If you use another extension that sets service_tier, put Pi Tier after it in your Pi package order so an explicit /tier choice takes precedence.