2e10c83 feat(codex): add branch-aware fast controls
Changes
Fetch the fixed, versioned Codex model catalog through Pi-managed OAuth and the existing bounded account client (10-second deadline, 1 MiB response limit, fixed official endpoint, no redirects).
Interpret current and legacy service-tier advertisements conservatively, distinguishing supported, unsupported, and unknown without guessing model names.
Add fast on|off|toggle|status|reset; bare fast is read-only status. Enabling confirms higher allowance consumption. Preferences follow the active branch and model under eleith-codex-fast, with explicit inherit tombstones for reset. Existing context state is unchanged.
Bind a single five-minute eligibility cache to credential fingerprints. Ordinary idle input prepares saved-on choices; request and stream hooks perform no network work. Expired/failed eligibility suspends priority without erasing the preference.
Copy supported payloads to request priority or default; leave inherited payloads and conflicting non-owned tiers untouched. Distinguish next-request policy, prior requested tier, model-scoped observed tier, and historical conflicts. Preserve Pi model selection, thinking, context/output limits, streaming, and accounting.
Add .changeset/codex-controls.md: one minor release record covering the successor rename, usage reporting, and fast controls. Changesets status previews 0.1.1 -> 0.2.0; no version bump or publication performed.
No README/documentation rewrite, new dependency, login implementation, credential-file read, token persistence, provider replacement, personal installation, or publishing change.
Review and verification
Fresh complete code review: no material actionable findings; integrated follow-up after refactoring also clear.
Thorough readability review identified ownership naming, SDK helper roles, unit-test reading order, scenario branching, and staged state validation. These were addressed without a new framework; fresh full integrated readability review signed off.
Aligned policy/history status after review: a past tier conflict does not falsely claim ongoing suspension. Each new payload independently checks tier ownership; regression coverage verifies conflict recovery.
Initial checks caught two fixture-only API/type mistakes; corrected to the public ModelRuntime.getAuth spy seam and a mutable boolean fixture flag. Bounded follow-up review confirmed the corrected assertions and fixture roles.
343 Codex tests / 17 files passed, including real SDK/native-provider SSE and WebSocket serialization, requested-priority versus observed-default reporting, active-branch replay/reset/off, context-control compatibility, cancellation and races.
1,147 repository tests / 70 files passed.
Repository build, lint, typecheck, formatting, whitespace checks, and Changesets status passed.
Limits
Pi's payload hook exposes selected context, not physical request/provider/account/endpoint identity. Guards intentionally cover selected direct official legacy Codex scope, not universal provenance. Raw tier observations are model-scoped, not receipts for a particular requested payload. Native OpenAI, gateways, virtual routing, API-key billing, Ultrafast, account switching, automatic fallback, and nested web-search requests remain out of scope. Hooks may include retries, compaction, and cache warming, not just visible assistant turns. Pi cost estimates may miss priority pricing when response metadata is absent or normalized; this plugin does not repair accounting.
All transport/catalog tests are offline. Live catalog compatibility (including the pinned client version/schema), actual scheduling, and live allowance consumption have not been verified. The catalog is an unstable internal backend contract.
After landing
Proceed separately to release preparation and publishing verification. Do not publish npm or change the personal installation yet.
## Status
**Ready for owner review/landing. No further feature commits planned in this PR.** Release preparation remains separate, after this PR lands.
## Commits
- `f4660b0 feat(codex): discover fast-mode eligibility`
- `2e10c83 feat(codex): add branch-aware fast controls`
## Changes
- Fetch the fixed, versioned Codex model catalog through Pi-managed OAuth and the existing bounded account client (10-second deadline, 1 MiB response limit, fixed official endpoint, no redirects).
- Interpret current and legacy service-tier advertisements conservatively, distinguishing supported, unsupported, and unknown without guessing model names.
- Add `fast on|off|toggle|status|reset`; bare `fast` is read-only status. Enabling confirms higher allowance consumption. Preferences follow the active branch and model under `eleith-codex-fast`, with explicit inherit tombstones for reset. Existing context state is unchanged.
- Bind a single five-minute eligibility cache to credential fingerprints. Ordinary idle input prepares saved-on choices; request and stream hooks perform no network work. Expired/failed eligibility suspends priority without erasing the preference.
- Copy supported payloads to request priority or default; leave inherited payloads and conflicting non-owned tiers untouched. Distinguish next-request policy, prior requested tier, model-scoped observed tier, and historical conflicts. Preserve Pi model selection, thinking, context/output limits, streaming, and accounting.
- Add `.changeset/codex-controls.md`: one minor release record covering the successor rename, usage reporting, and fast controls. Changesets status previews `0.1.1 -> 0.2.0`; no version bump or publication performed.
No README/documentation rewrite, new dependency, login implementation, credential-file read, token persistence, provider replacement, personal installation, or publishing change.
## Review and verification
- Fresh complete code review: no material actionable findings; integrated follow-up after refactoring also clear.
- Thorough readability review identified ownership naming, SDK helper roles, unit-test reading order, scenario branching, and staged state validation. These were addressed without a new framework; fresh full integrated readability review signed off.
- Aligned policy/history status after review: a past tier conflict does not falsely claim ongoing suspension. Each new payload independently checks tier ownership; regression coverage verifies conflict recovery.
- Initial checks caught two fixture-only API/type mistakes; corrected to the public `ModelRuntime.getAuth` spy seam and a mutable boolean fixture flag. Bounded follow-up review confirmed the corrected assertions and fixture roles.
- **343 Codex tests / 17 files passed**, including real SDK/native-provider SSE and WebSocket serialization, requested-priority versus observed-default reporting, active-branch replay/reset/off, context-control compatibility, cancellation and races.
- **1,147 repository tests / 70 files passed**.
- Repository build, lint, typecheck, formatting, whitespace checks, and Changesets status passed.
## Limits
Pi's payload hook exposes selected context, not physical request/provider/account/endpoint identity. Guards intentionally cover selected direct official legacy Codex scope, not universal provenance. Raw tier observations are model-scoped, not receipts for a particular requested payload. Native OpenAI, gateways, virtual routing, API-key billing, Ultrafast, account switching, automatic fallback, and nested web-search requests remain out of scope. Hooks may include retries, compaction, and cache warming, not just visible assistant turns. Pi cost estimates may miss priority pricing when response metadata is absent or normalized; this plugin does not repair accounting.
All transport/catalog tests are offline. Live catalog compatibility (including the pinned client version/schema), actual scheduling, and live allowance consumption have not been verified. The catalog is an unstable internal backend contract.
## After landing
Proceed separately to release preparation and publishing verification. Do not publish npm or change the personal installation yet.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Status
Ready for owner review/landing. No further feature commits planned in this PR. Release preparation remains separate, after this PR lands.
Commits
f4660b0 feat(codex): discover fast-mode eligibility2e10c83 feat(codex): add branch-aware fast controlsChanges
fast on|off|toggle|status|reset; barefastis read-only status. Enabling confirms higher allowance consumption. Preferences follow the active branch and model undereleith-codex-fast, with explicit inherit tombstones for reset. Existing context state is unchanged..changeset/codex-controls.md: one minor release record covering the successor rename, usage reporting, and fast controls. Changesets status previews0.1.1 -> 0.2.0; no version bump or publication performed.No README/documentation rewrite, new dependency, login implementation, credential-file read, token persistence, provider replacement, personal installation, or publishing change.
Review and verification
ModelRuntime.getAuthspy seam and a mutable boolean fixture flag. Bounded follow-up review confirmed the corrected assertions and fixture roles.Limits
Pi's payload hook exposes selected context, not physical request/provider/account/endpoint identity. Guards intentionally cover selected direct official legacy Codex scope, not universal provenance. Raw tier observations are model-scoped, not receipts for a particular requested payload. Native OpenAI, gateways, virtual routing, API-key billing, Ultrafast, account switching, automatic fallback, and nested web-search requests remain out of scope. Hooks may include retries, compaction, and cache warming, not just visible assistant turns. Pi cost estimates may miss priority pricing when response metadata is absent or normalized; this plugin does not repair accounting.
All transport/catalog tests are offline. Live catalog compatibility (including the pinned client version/schema), actual scheduling, and live allowance consumption have not been verified. The catalog is an unstable internal backend contract.
After landing
Proceed separately to release preparation and publishing verification. Do not publish npm or change the personal installation yet.