An opt-in Pi extension that requests fast/priority service for GPT-6 Astra and shows what service tier the provider actually reports.
/fasttoggles on/off;/fast on,/fast off, and/fast statusremain available- Off by default, with a preference saved in the current session branch
- Separate requested and provider-confirmed tiers
- Standalone Git package: no Firstmate dependency, background service, or build step
Priority is a request, not a guarantee. It may incur higher API charges or consume subscription usage faster. Check current provider pricing and eligibility. The extension does not guarantee a speedup, and Pi's cost estimate is not a billing guarantee.
- Pi 1.0.0 or later, distributed as
@earendil-works/pi-coding-agent, with thebefore_provider_requestreplacement hook andprovider_stream_eventhook. Tested on Pi 1.0.0; older Pi distributions with different package names/APIs are not supported. - Node.js 22 or later.
- An authenticated Pi account with one of the supported Astra routes available. This extension does not register models or supply credentials.
Run on each computer:
pi install git:github.com/EClinick/pi-fast-modeStart/restart Pi, or run /reload in an already-running session. Select a supported Astra model, then toggle requests on:
/fast
Your next supported model request will include service_tier: "priority". Installing the package does not enable it automatically.
| Command | Behavior |
|---|---|
/fast on |
Request priority for subsequent supported requests; save the preference in this session branch. |
/fast off |
Stop adding a tier to subsequent requests; save the preference. |
/fast status |
Show the preference and last-request evidence without changing either. |
/fast |
Toggle the saved preference on/off. New sessions start off, so the first toggle enables requests. |
Changing the preference does not alter an in-flight request. Off leaves the request untouched: it does not remove a tier chosen by another extension or provider configuration.
There is no persistent fast badge or extra status row. /fast, /fast on, and /fast off briefly show plain Fast on or Fast off in Pi's shared status area, then clear it after two seconds. Rapid toggles restart the timeout; switching models, restoring a branch/session, or shutting down clears it immediately. Unsupported selections add (unsupported) to this brief confirmation. Resume/reload does not show a confirmation: use /fast status to check the saved preference.
This is a preference acknowledgment, not confirmation of fast service. It contains no provider-tier suffix or bold badge. Pi owns the native colors, placement and narrow-width truncation. Other extensions' status keys remain untouched, and a custom footer remains in control of whether it displays shared statuses.
Pi 1.0.0 and 1.1.0 provide no composable inline model-label slot. Rather than replace the footer, this extension leaves native cwd/git, usage, model and effort information intact. The brief acknowledgment appears in the existing status area, not beside the model; it disappears instead of leaving a permanent extra row. No footer/editor replacement or Pi patching is used.
Detailed diagnostics are shown only when you run /fast status:
Fast request on; last requested: priority; confirmed: unknown
Fast request on; last requested: priority; confirmed: default
Fast request on; last requested: priority; confirmed: priority
- Fast request on/off is your preference, not a statement that fast service was granted.
- Requested is the tier at this extension's request hook. A later extension could still change it.
- Confirmed comes only from the final
response.completed.response.service_tier. A finalpriorityorfastconfirms that reported tier, not a measured latency improvement.defaultis a reported tier different from the requested priority. - Unknown means no final tier evidence: the request may be in flight, the field may be missing/malformed, or the request may have failed/been aborted. Early response events that report
autodo not count as final confirmation.
Routine response tiers update only the evidence available through /fast status, with no UI updates or per-response warnings. Enabling requests retains one concise cost/availability disclosure in Pi's notification UI; repeated /fast on while already enabled does not repeat it. Unsupported models are identified in /fast status, the brief confirmation, and the enable notice. Errors remain visible through Pi's normal error UI and /fast status. The extension does not silently retry a failed request without priority; Pi retains its normal error/retry behavior.
The on/off preference is stored as a small custom entry in the current Pi session branch, outside model context:
- Resume or reload that session to retain its preference.
- New sessions start off.
- Forks inherit the preference at their branch point; tree navigation restores the active branch's preference.
--no-sessioncannot persist a preference across processes.- Last-request tier evidence is not persisted and resets on reload or model change.
The extension never writes global settings, credentials, or a separate configuration file. Pi's package-install command manages its own package declaration. Pi's built-in openai-codex provider does not inherit the native Codex CLI's config.toml fast setting; use /fast on in Pi.
Update installed Pi packages on each computer:
pi update --extensionsThen restart Pi or run /reload in each running session. To update only this package:
pi update git:github.com/EClinick/pi-fast-modeThe unpinned Git source follows this repository's default branch. A source pinned with @<tag-or-commit> stays pinned during updates; use the same ref on each computer when reproducibility matters.
Useful management commands:
pi list
pi config
pi remove git:github.com/EClinick/pi-fast-modepi list checks configured packages; pi config enables/disables package resources. Restart or /reload after removing the package.
- Install a compatible Pi version and authenticate normally on each computer. Do not synchronize credentials through this repository.
- Run the install command on all three computers. Personal installs make the package available across projects.
- Restart/reload Pi and run
/fast onin each session where you want priority requests. Sessions and preferences are local, not automatically synchronized. - Run
pi update --extensionsand restart/reload on all three computers when updating.
No Firstmate changes are required. Pi launched through Firstmate can use the same personal package unless its launch disables extensions or uses a different Pi agent directory. In that case, install/enable the package in the Pi environment that launch actually uses.
For a project-only installation instead of a personal one:
pi install --local git:github.com/EClinick/pi-fast-modeProject resources load only after Pi project trust is granted.
Only these exact model/provider/API/base-URL combinations are modified. Base URLs may have a trailing slash.
| Pi model selection | API | Configured base URL |
|---|---|---|
openai/gpt-6-astra |
openai-responses |
https://api.openai.com/v1 |
openai-codex/gpt-6-astra |
openai-codex-responses |
https://chatgpt.com/backend-api |
The current Pi model and outgoing payload model must both match. Other models, Azure, proxies/custom endpoints, and mismatched provider/API combinations are left untouched. An unsupported selection is labeled in status even if the preference is on. Response events must match the originating request's provider/API/model.
Real Pi session/command-path tests verified that on sends priority and off omits the tier for the supported routes, including actual serialized WebSocket frames on openai-codex. The tested completed responses reported default, not priority. A server-confirmed Astra fast response has not been observed in these tests. Do not interpret the preference or successful request as a fast-service grant.
Installed Codex 0.160.1 also serializes its fast preference as priority; its “Fast on” UI reflects a preference, not checked provider confirmation. Literal service_tier: "fast" was rejected on the tested subscription routes, so the extension uses the verified native request value rather than substituting an unverified alias.
See the investigation report for exact-route reproduction, counterfactuals, provider semantics, and remaining uncertainty. See also OpenAI's Fast mode guide and Responses API reference.
The request hook exposes no request ID or model argument. This extension uses the current model plus the wire model and is intended for ordinary sequential Pi agent requests, not concurrent nested-call accounting. Avoid competing tier/routing extensions that could invalidate attribution.
The transient confirmation is TUI-only; supported RPC clients receive command/warning notifications through Pi's UI channel. JSON/print modes receive no unsolicited stdout logging. The extension does not log prompts, request bodies, headers, credentials, or response content.
Clone the repository and run the ordinary, credential-free tests:
git clone https://github.com/EClinick/pi-fast-mode.git
cd pi-fast-mode
npm test
git diff --checkNo dependency installation or build step is needed for the tests. They use Node's built-in runner and a fake Pi host; CI runs them on Node.js 22 and 24. Coverage includes provider/endpoint scoping, bare toggles and explicit on/off/status, save failures, branch persistence, transient confirmation expiry/cleanup, quiet repeated responses, missing/different/priority/fast tiers, cross-provider isolation, error/abort handling, RPC, and headless behavior.
An optional offline integration test loads the extension with installed Pi's real loader and exercises its native footer across dark/light/system themes and 12–120-column widths, including another extension's status, confirmation expiry, and supported/unsupported model switches. It verifies the native footer returns to its original rendering after expiry. It sends no model requests:
PI_TEST_PACKAGE_DIR="$(npm root -g)/@earendil-works/pi-coding-agent" node --test test/pi-rendering.test.jsWithout that environment variable, ordinary tests skip the installed-Pi check. See UI validation for genuine terminal-capture excerpts at wide/narrow widths and model-switch results.
To load a local checkout without adding a package declaration:
pi -e ./src/extension.jsOptional live diagnostics are documented in the investigation report. They may incur usage charges and are never run by ordinary tests or CI.
Read CONTRIBUTING.md before submitting a pull request. All paths are owned by @EClinick, the sole current maintainer; contributors leave merging to the maintainer.
MIT.