@cortexkit/pi-openai-auth

Pi package for CortexKit OpenAI Codex OAuth support. It overrides Pi's built-in `openai-codex` provider with a CortexKit provider extension backed by Pi's OpenAI Codex Responses transport and OAuth primitives.

Packages

Package details

extension

Install @cortexkit/pi-openai-auth from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@cortexkit/pi-openai-auth
Package
@cortexkit/pi-openai-auth
Version
0.8.0
Published
Sep 17, 2026
Downloads
7,604/mo · 729/wk
Author
ismeth
License
MIT
Types
extension
Size
80.8 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

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

README

@cortexkit/pi-openai-auth

Pi package for CortexKit OpenAI Codex OAuth support. It overrides Pi's built-in openai-codex provider with a CortexKit provider extension backed by Pi's OpenAI Codex Responses transport and OAuth primitives.

The Pi provider catalog includes gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex-spark.

This package is part of the CortexKit OpenAI Auth monorepo, which supports both OpenCode (@cortexkit/opencode-openai-auth) and Pi (@cortexkit/pi-openai-auth).

Install

Install with Pi's package manager:

pi install npm:@cortexkit/pi-openai-auth@0.1.0

For an unpinned install:

pi install npm:@cortexkit/pi-openai-auth

To try it for one run without changing Pi settings:

pi -e npm:@cortexkit/pi-openai-auth

Restart Pi after installing, then authenticate through Pi's normal login flow:

/login openai-codex

Commands

The extension registers three commands in Pi:

  • openai-account — list configured fallback accounts, openai-account add [label] to add a fallback account via OAuth (browser or --headless), or openai-account remove <id> to remove one.
  • openai-quota — show the quota last recorded for each stored fallback account.
  • openai-routing — set the routing order (main-first, fallback-first, sticky-balanced) or reset session pins.

These manage the account store. Pi requests do not yet route through it — the extension streams through the credential Pi itself supplies, so a routing choice is recorded but does not move traffic between accounts, and quota shows the last values written to the store rather than fetching current ones. The OpenCode plugin is where routing is live today. The store format is shared between the two, so what you configure here is what Pi will use once its request path reads it.

License

MIT