Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ You should see:
- `xai`
- `github-copilot`
- `openai`
- `openai-codex`
- `openrouter`
- `deepseek`
- `groq`
Expand Down Expand Up @@ -199,6 +200,7 @@ Default ports:
- `xiaomi-token-plan-ams` → `8809`
- `xiaomi-token-plan-sgp` → `8810`
- `kimi-coding` → `8811`
- `openai-codex` → `8812`

## Commands

Expand Down Expand Up @@ -270,6 +272,8 @@ Each provider also has optional port/upstream overrides such as:

- `PI_HEADROOM_OPENAI_PORT`
- `PI_HEADROOM_OPENAI_UPSTREAM`
- `PI_HEADROOM_OPENAI_CODEX_PORT`
- `PI_HEADROOM_OPENAI_CODEX_UPSTREAM`
- `PI_HEADROOM_ANTHROPIC_PORT`
- `PI_HEADROOM_ANTHROPIC_UPSTREAM`
- `PI_HEADROOM_OPENROUTER_PORT`
Expand All @@ -285,7 +289,6 @@ These pi providers still need more provider-specific handling and are not yet ma
- `cloudflare-ai-gateway`
- `cloudflare-workers-ai`
- `vercel-ai-gateway`
- `openai-codex`
- `opencode`
- `opencode-go`
- `zai`
Expand Down
12 changes: 12 additions & 0 deletions provider-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const MANAGED_PROVIDERS = [
"xai",
"github-copilot",
"openai",
"openai-codex",
"anthropic",
"openrouter",
"deepseek",
Expand Down Expand Up @@ -257,6 +258,17 @@ const PROVIDER_SPECS: Record<ManagedProvider, ManagedProviderSpec> = {
routedBaseStyle: "openai",
extraEnv: OPENAI_FAMILY_ENV,
}),
"openai-codex": makeSimpleProviderSpec({
provider: "openai-codex",
displayName: "OpenAI Codex",
family: "openai",
preferredPortEnv: "PI_HEADROOM_OPENAI_CODEX_PORT",
defaultPreferredPort: 8812,
upstreamEnvKey: "OPENAI_TARGET_API_URL",
defaultUpstream: "https://api.openai.com",
routedBaseStyle: "openai",
extraEnv: OPENAI_FAMILY_ENV,
}),
anthropic: makeSimpleProviderSpec({
provider: "anthropic",
displayName: "Anthropic",
Expand Down