@diegopetrucci/pi-openai-fast
v0.1.9
Published
A pi extension that enables OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4, GPT-5.5, and GPT-5.6 Codex variants by injecting the priority service tier.
Maintainers
Readme
openai-fast
A pi extension that enables OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4, GPT-5.5, and GPT-5.6 Codex variants (gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna).
When active, the extension injects this into eligible OpenAI Codex request payloads:
{
"service_tier": "priority"
}The user-facing feature is OpenAI Codex Fast mode. The wire value is priority because current Codex clients map Fast mode to the OpenAI priority service tier.
Eligibility
Fast mode is only injected when all of these are true:
- The current provider is
openai-codex. - The current API is
openai-codex-responses. - The current model is
gpt-5.4,gpt-5.5,gpt-5.6-sol,gpt-5.6-terra, orgpt-5.6-luna. - The provider is using ChatGPT OAuth/subscription auth, not API-key auth.
- The request payload does not already include
service_tier.
Commands
/fastRun /fast to toggle Fast mode on or off for the current session/runtime. The command reports the new state in chat, and the footer shows fast while Fast mode is active for an eligible model.
The extension defaults to off so installing the full collection does not accidentally spend Fast-mode credits.
Config
Optional global config:
~/<pi-config-dir>/agent/extensions/openai-fast.jsonOptional project config:
<project>/<pi-config-dir>/openai-fast.jsonHere <pi-config-dir> is Pi's runtime config directory name (CONFIG_DIR_NAME; .pi by default). Project config overrides global config after Pi reports that the project is trusted.
{
"enabled": false,
"showStatus": true
}enabled: default Fast-mode state when there is no session override.showStatus: show a compactfaststatus when Fast mode is active for the current model.
Install
Standalone npm package
pi install npm:@diegopetrucci/pi-openai-fastCollection package
pi install npm:@diegopetrucci/pi-extensionsGitHub package
pi install git:github.com/diegopetrucci/pi-extensionsThen reload pi:
/reloadNotes
- This extension intentionally does not affect API-key OpenAI models.
- Pi may only account Fast-mode cost correctly when the backend reports
service_tier: "priority"in the streamed response. The extension does not patch usage totals to avoid double-counting. - If pi adds first-class service-tier support later, this extension skips payloads that already contain
service_tier.
