@phoen1xcode/pi-codex-fast
A Pi Extension for OpenAI Codex Fast Mode.
Package details
Install @phoen1xcode/pi-codex-fast from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@phoen1xcode/pi-codex-fast- Package
@phoen1xcode/pi-codex-fast- Version
0.1.1- Published
- Aug 18, 2026
- Downloads
- 247/mo · 13/wk
- Author
- phoen1xcode
- License
- MIT
- Types
- extension
- Size
- 19.6 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-codex-fast
A global Fast mode toggle for the Pi Coding Agent's ChatGPT/Codex subscription models.
Features
- Sets
serviceTier: "priority"on Pi's Codex stream only when a strict safety baseline is met - Never selects or modifies model, thinking level, tools, or prompts
- Never reads or stores OAuth tokens
- Persists state in Pi's existing
~/.pi/agent/settings.json— no separate config file - Fast mode is applied only when all of the following hold:
- the global Fast mode toggle is enabled
- the streamed model's provider is
openai-codex - the streamed model's API is
openai-codex-responses - the streamed model id is on the exact allowlist
modelRegistry.isUsingOAuth(model)istrue
Install
pi install npm:@phoen1xcode/pi-codex-fast
Usage
- In Pi, run
/loginand chooseOpenAI (ChatGPT Plus/Pro). - Run
/modeland pick a supported model:openai-codex/gpt-5.6-solopenai-codex/gpt-5.6-terraopenai-codex/gpt-5.6-luna
- Toggle Fast mode:
/fast on
/fast off
/fast status
Configuration
State is stored in Pi's existing ~/.pi/agent/settings.json:
{
"@phoen1xcode/pi-codex-fast": {
"enabled": true
}
}
The extension locates this file via Pi's getAgentDir(), so PI_CODING_AGENT_DIR is respected. Writes use a Pi-compatible file lock and atomic replacement, preserving other settings fields and the settings.json symlink.
"Global" here means persisted scope, not real-time sync across Pi processes. Each Pi instance reads the config at startup or on /reload; /fast takes effect immediately in the current instance, while other running instances need /reload to pick up the new value.
The extension passes serviceTier: "priority" through Pi's built-in Codex stream. The Codex backend may still report service_tier: "default" in responses; Pi estimates local cost based on the requested priority tier. This estimate is not equivalent to the final credits billing in the ChatGPT backend.
To add newly verified Fast-mode models, update SUPPORTED_MODEL_IDS in src/models.ts and add tests.
Development
npm install
npm run check
pi -e .