@valdo766hi/pi-fast

Pi extension for OpenAI priority service-tier requests

Packages

Package details

extension

Install @valdo766hi/pi-fast from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@valdo766hi/pi-fast
Package
@valdo766hi/pi-fast
Version
0.1.2
Published
Aug 17, 2026
Downloads
318/mo · 14/wk
Author
valdo766hi
License
Apache-2.0
Types
extension
Size
16.6 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./fast.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi fast mode extension

Install it with:

pi install npm:@valdo766hi/pi-fast

This extension registers /fast, which opts the current session into OpenAI's priority service tier.

Commands

/fast       # toggle
/fast on    # enable
/fast off   # disable

State is in-memory by default. Every new or resumed session starts off, so a session never inherits a paid tier from an earlier one. To explicitly opt a process or spawned Pi session in, start it with PI_FAST=1; otherwise enable /fast on separately in that session. The footer shows a nerd-font bolt (nf-fa-bolt, U+F0E7) followed by FAST: ON or FAST: OFF.

The glyph is a private-use codepoint, so fast.ts writes it as the escape "\u{f0e7}" rather than a literal — editors and pipelines have silently replaced the literal with a space. fast.test.ts pins the codepoint.

Provider behavior

While fast mode is on, the before_provider_request hook adds "service_tier": "priority" to the request payload, but only when all of the following hold:

  • the active model's provider is openai or openai-codex
  • the active model's api is openai-responses or openai-codex-responses, the two apis that serialize a service_tier field
  • the payload is a plain object that does not already carry service_tier

Everything else — other providers, OpenAI-compatible third parties such as groq or openrouter, Azure, and any explicitly set tier — is left unchanged. For Codex, the extension also applies Pi's priority multiplier to reported costs, because Codex reports the response tier as default.

Tests

node --test packages/fast/fast.test.ts

The same test runs in the repository's Node.js and devenv checks.