pi-openai-codex-fast
v0.0.3
Published
Pi package that adds an openai-codex-fast provider backed by openai-codex with priority service tier
Readme
pi-openai-codex-fast
Pi package that adds an openai-codex-fast provider backed by built-in openai-codex with serviceTier: "priority".
Behavior
openai-codex-fast is a separate selectable provider that delegates to Pi's built-in openai-codex implementation with the same model id and serviceTier: "priority". Normal openai-codex/<modelId> selections are left on the normal/default-tier path.
Currently exposed fast models:
gpt-5.5gpt-5.4gpt-5.4-mini
Runtime behavior when openai-codex-fast/<modelId> is selected:
- Reuses existing
openai-codexauth from Pi auth storage. - Sends Codex requests through the built-in Codex response API with
serviceTier: "priority". - Stores all generated assistant messages canonically as built-in Codex, including normal replies, tool-calling replies, and setup/error/aborted replies:
provider: "openai-codex"api: "openai-codex-responses"
- Does not rewrite stored assistant history back to
openai-codex-fastoropenai-codex-fast-responses.
Fast-mode recovery:
- No custom fast-mode session state is persisted.
- On any
session_startreason (startup,reload,new,resume, orfork), the extension scans the current branch backward for the latest overallmodel_change. - If that latest
model_changeisopenai-codex-fast/<modelId>, it selectsopenai-codex-fast/<modelId>again. - If the latest
model_changeis anything else, it does nothing and lets Pi's normal model recovery handle it. - The extension does not handle
session_tree, so branch switches do not trigger model reconciliation.
Install
Local path
pi install .Temporary use
pi -e .After install, log in to built-in Codex if needed:
/login openai-codexThen select a fast model with /model, for example:
openai-codex-fast/gpt-5.5Local development
npm install
npm test # typecheck + integration tests against real Pi runtime/local Codex server
npm run check
npm run lint
npm run fmt
npm run benchmarkPackaging
This package publishes these project files explicitly:
index.tsREADME.mdCHANGELOG.mdLICENSE
Release helper:
npm run release:publish
npm run release:publish -- --executenpm run release:publish runs npm run check first and defaults to an npm dry-run. Pass --execute to perform the real publish.
The publish helper does not create commits or tags. A real publish requires a clean Git worktree, the release commit pushed to the branch upstream, and a pushed vX.Y.Z tag pointing at the release commit.
