Pi Better OpenAI
Extension
Adds OpenAI fast-mode request tiering, subscription usage feedback, footer controls, Codex image generation, and local pet rendering to Pi.
What it does
Pi Better OpenAI groups OpenAI subscription conveniences into one extension: priority request tiering, usage feedback, footer controls, hosted image generation, and optional animated local pets.
Fast mode adjusts outgoing payloads only for configured models, while usage and image requests reuse existing OpenAI Codex credentials.
When to reach for it
Invocation: Install the extension, then use its commands or let the model call the OpenAI image tool when a raster asset is needed.
- A supported OpenAI model should request priority service
- Toggle fast mode and let the provider-request hook add the configured service tier.
- Subscription usage and reset windows should stay visible during a session
- Enable usage display in the footer or request a fresh status report.
- The model needs to create or edit an image through OpenAI Codex authentication
- Call the OpenAI image tool with a verbatim prompt and explicit save behavior when needed.
- Terminal feedback should include a custom local Codex pet
- Select a ready pet and enable footer rendering in a terminal with image support.
What it adds
- Fast-mode, usage, settings, image, and pet commands plus a model-invoked image tool.
- A configurable footer and a before-provider-request hook that works with Pi's existing OpenAI providers rather than registering a new provider.
How it fits
- Status line: Both expose compact session state; Better OpenAI can also replace the footer and add OpenAI-specific usage, fast-mode, and pet segments.
Common questions
- Does it install another OpenAI provider?
- No standalone provider is declared. The extension modifies supported outgoing provider payloads through Pi's before-provider-request hook.
- Where is configuration loaded from?
- Project configuration under .pi/extensions overrides global agent configuration. Defaults fill omitted values, and selected timing and size settings are clamped.
- Which features need OpenAI Codex OAuth?
- Subscription usage and hosted image generation require existing OpenAI Codex credentials. Fast-mode payload injection itself is model and configuration dependent.
It’s working if
- Fast mode reports active only on a configured model and outgoing payloads receive the priority service tier.
- Usage status refreshes for an eligible OpenAI subscription model without exposing raw credentials.
- The image tool returns an image and saves it only to the selected destination.
- Optional footer pets react to agent and tool activity when terminal image support is available.
Source and setup
Provenance
- Project
- Pi Better OpenAI
- Origin
- Matt Leong
- Current maintainer
- Matt Leong
- Relationship
- original
- Installed source
git:github.com/mattleong/pi-better-openai- Source path
- View source (
index.ts) - Compatibility
- Pi extension hooks, tools, and footer APIs
- Node.js 22.19 or newer
- OpenAI Codex OAuth for usage and image features
- Optional terminal image support for rendered pets
- License
- MIT
- License publication scope
- Source link, independently written summary, attribution, and reviewed behavior claims; retain the MIT notice for any source reuse.
- Reviewed revision
58273a6aeeb387bc61c6ec68cabd867952611bf4- Catalog revision
e0c035a297462c519315abfa1af31a1ed3bd9eef
Setup notes
- Created and maintained by Matt Leong; installed from the original MIT-licensed repository.
- Requires Node runtime version 22.19 or newer and Pi extension APIs. Usage and image features also need OpenAI Codex OAuth.
- Generated image inputs are limited to files inside the current workspace; output location and format remain configurable.
- The package ships one Pi extension. Its provider hook and JSON configuration are embedded behavior, not separate installable provider or config packages.
Commands
/fast/openai-usage/openai-settings/openai-image PROMPT/pets help/pets list/pets wake SLUG/pets tuck/pets select SLUG