pi-fast
v0.1.3
Published
Toggle provider fast modes in Pi on demand.
Maintainers
Readme
pi-fast
Use provider fast modes in Pi when you need lower latency, while keeping the paid path off by default.
pi-fast currently supports OpenAI Codex models that advertise Fast processing. It adds Codex's priority service tier after you enable it for the session or opt in to the global default.
Features
- On-demand toggle — use
/fast,/fast on,/fast off, orCtrl+Shift+R. - Safe model guard — only supported
openai-codexmodels receive the Fast request field. - Visible state — the Pi footer shows
Fast on,Fast off, orFast n/a. - Configurable default — opt in once to start Fast mode on for every supported model.
- Session-local overrides — command and shortcut changes reset to the configured default for each session.
Supported models
The current OpenAI Codex catalog advertises Fast support for:
gpt-6-astragpt-6-solgpt-6-lunagpt-5.4gpt-5.5gpt-5.6-lunagpt-5.6-solgpt-5.6-terra
The support list follows the upstream Codex model catalog and may need an update when that catalog changes. Models without an advertised Fast tier are left untouched.
Checked against the OpenAI Codex model catalog
(2026-09-22). All three GPT-6 models advertise priority (Fast) processing.
The upstream Codex client defaults Sol and Luna to that tier; pi-fast
still requires the session toggle or global opt-in.
This package uses the Codex subscription backend, not the public OpenAI API.
Fast mode consumes more subscription usage. Public API dollar prices and Pi's
token-cost estimates are not your ChatGPT credit bill. Consult
Codex speed documentation
for current plan rates and availability. No latency guarantee is made.
Installation
Install from npm:
pi install npm:pi-fastInstall project-locally with Pi's -l flag:
pi install -l npm:pi-fastDuring local development from this monorepo:
pi install /path/to/pi-mono/packages/pi-fastFor a one-off run without installing:
pi -e /path/to/pi-mono/packages/pi-fastThis is an npm-compatible TypeScript Pi package. There is no runtime build step.
With an updated pi-codex-compaction installed, the same Fast toggle also applies
to its direct compaction requests through Pi's event bus.
Usage
Start a supported Codex model, then use either:
/fastor press Ctrl+Shift+R.
/fast toggles the current state. /fast on, /fast off, and /fast toggle select it explicitly. When active, supported Codex requests include service_tier: "priority", which upstream describes as faster processing with increased usage.
Configuration
Fast mode remains off by default. To start every session with Fast mode enabled for all supported models, add this setting to Pi's global settings.json (normally ~/.pi/agent/settings.json, or the configured agent directory):
{
"pi-fast": {
"enabledByDefault": true
}
}This is a global opt-in because the priority service tier can increase provider usage. Unsupported provider/model pairs remain unchanged. /fast off disables Fast mode for the current session; starting, switching, or reloading a session restores the configured default.
Install/update telemetry can be disabled with PI_OFFLINE=1 or PI_TELEMETRY=0.
Development
npm install
npm run -w packages/pi-fast check
npm test -w packages/pi-fast
npm run -w packages/pi-fast pack:dry-runSmoke test (Pi 0.85.1 or later): for each of openai-codex/gpt-6-astra,
openai-codex/gpt-6-sol, and openai-codex/gpt-6-luna, enable /fast on
and send a short prompt. Check Fast on. Switch to a different provider and
check Fast n/a. Switch back, run /fast off, and check Fast off.
