Skip to content

Commit e819ac1

Browse files
committed
docs(clients): add Pi coding agent setup
1 parent d6a4da1 commit e819ac1

5 files changed

Lines changed: 134 additions & 1 deletion

File tree

.github/assets/pi-favicon.png

555 Bytes
Loading

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,66 @@ change the MCP `url` to `https://codex-pooler.example.com/mcp`.
467467

468468
</details>
469469

470+
<details>
471+
<summary><img src=".github/assets/pi-favicon.png" alt="Pi logo" width="16" height="16"> Pi <code>~/.pi/agent/models.json</code></summary>
472+
473+
Pi works best through a custom provider that uses Codex Pooler's narrow
474+
OpenAI-compatible `/v1` Responses surface. Install Pi from npm so you get the
475+
latest published CLI:
476+
477+
```bash
478+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
479+
```
480+
481+
Then add a provider to `~/.pi/agent/models.json`:
482+
483+
```json
484+
{
485+
"providers": {
486+
"codex-pooler": {
487+
"name": "Codex Pooler",
488+
"baseUrl": "http://localhost:4000/v1",
489+
"api": "openai-responses",
490+
"apiKey": "$CODEX_POOLER_API_KEY",
491+
"authHeader": true,
492+
"models": [
493+
{
494+
"id": "gpt-5.5",
495+
"name": "GPT-5.5 via Codex Pooler",
496+
"reasoning": true,
497+
"input": ["text", "image"],
498+
"contextWindow": 400000,
499+
"maxTokens": 128000
500+
}
501+
]
502+
}
503+
}
504+
}
505+
```
506+
507+
`authHeader: true` makes Pi send the Pool API key as
508+
`Authorization: Bearer ...`. Define only model ids your assigned Pool can serve.
509+
For deployed instances, change `baseUrl` to
510+
`https://codex-pooler.example.com/v1`.
511+
512+
Check the non-interactive path from a repository:
513+
514+
```bash
515+
export CODEX_POOLER_API_KEY=<pool-api-key>
516+
pi --provider codex-pooler \
517+
--model gpt-5.5 \
518+
--no-session \
519+
--no-context-files \
520+
--tools bash \
521+
-p 'Reply with exactly: pi ok'
522+
```
523+
524+
Pi does not ship built-in MCP support. Codex Pooler model use does not require
525+
MCP; if you need operator metadata, use a separate MCP-capable host with an
526+
operator MCP token.
527+
528+
</details>
529+
470530
<details>
471531
<summary><img src=".github/assets/aider-favicon.png" alt="Aider logo" width="16" height="16"> Aider <code>~/.aider.conf.yml</code></summary>
472532

docs-site/public/llms.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Primary public docs:
2020
- https://docs.codex-pooler.com/clients/opencode/
2121
- https://docs.codex-pooler.com/clients/openclaw/
2222
- https://docs.codex-pooler.com/clients/openhands/
23+
- https://docs.codex-pooler.com/clients/pi/
2324
- https://docs.codex-pooler.com/clients/hermes/
2425
- https://docs.codex-pooler.com/clients/windmill/
2526
- https://docs.codex-pooler.com/reference/runtime-routes/
@@ -77,11 +78,12 @@ Agent guidance:
7778
- Start with https://docs.codex-pooler.com/clients/codex-cli/ when configuring Codex backend clients.
7879
- Start with https://docs.codex-pooler.com/clients/openai-compatible/ when configuring selected OpenAI SDK-compatible clients.
7980
- Use https://docs.codex-pooler.com/clients/openhands/ when configuring OpenHands CLI with LLM_BASE_URL, LLM_MODEL=openai/gpt-5.5, and --override-with-envs.
81+
- Use https://docs.codex-pooler.com/clients/pi/ when configuring Pi with ~/.pi/agent/models.json, api=openai-responses, authHeader=true, and a Pool API key in CODEX_POOLER_API_KEY.
8082
- Use https://docs.codex-pooler.com/discovery/self-hosted-codex-gateway/ for short answers about Codex Pooler as a self-hosted Codex gateway.
8183
- Use https://docs.codex-pooler.com/discovery/codex-account-pooling/ for short answers about Pools, upstream accounts, eligibility, and routing.
8284
- Use https://docs.codex-pooler.com/discovery/openai-compatible-codex-gateway/ for short answers about narrow /v1 SDK compatibility over Codex Pools.
8385
- Use https://docs.codex-pooler.com/discovery/codex-pooler-vs-direct-credentials/ for short answers comparing Pool API keys with direct account credentials.
84-
- Use the client-specific pages for Aider, Continue, Cline, Goose, OpenCode, OpenClaw, OpenHands, Hermes, and Windmill setup snippets.
86+
- Use the client-specific pages for Aider, Continue, Cline, Goose, OpenCode, OpenClaw, OpenHands, Pi, Hermes, and Windmill setup snippets.
8587
- Use https://docs.codex-pooler.com/reference/routing-strategies/ when configuring Pools and routing behavior.
8688
- Use https://docs.codex-pooler.com/answers.md for short, citable answers about scope, routes, credentials, privacy, setup, and deployment.
8789
- Keep examples on http://localhost:4000 for local setup or https://codex-pooler.example.com for deployed product examples.

docs-site/src/content/docs/clients/openai-compatible.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Use the dedicated setup pages when configuring an agent or editor that has its o
4545
- [OpenCode](/clients/opencode/)
4646
- [OpenClaw](/clients/openclaw/)
4747
- [OpenHands](/clients/openhands/)
48+
- [Pi](/clients/pi/)
4849
- [Windmill AI](/clients/windmill/)
4950

5051
## Python SDK
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Pi
3+
description: Configure Pi coding agent with Codex Pooler's narrow OpenAI-compatible /v1 Responses surface and a Pool API key.
4+
---
5+
6+
Pi should use Codex Pooler through a custom provider in `~/.pi/agent/models.json`. Point that provider at the narrow OpenAI-compatible `/v1` surface, keep the Pool API key in the environment, and choose `openai-responses` so Pi sends agent turns through the Responses route.
7+
8+
## Install
9+
10+
Use the current npm package:
11+
12+
```bash
13+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
14+
```
15+
16+
`--ignore-scripts` matches Pi's published install guidance and keeps dependency lifecycle scripts disabled during install.
17+
18+
## Provider shape
19+
20+
For a deployed instance, add:
21+
22+
```json
23+
{
24+
"providers": {
25+
"codex-pooler": {
26+
"name": "Codex Pooler",
27+
"baseUrl": "https://codex-pooler.example.com/v1",
28+
"api": "openai-responses",
29+
"apiKey": "$CODEX_POOLER_API_KEY",
30+
"authHeader": true,
31+
"models": [
32+
{
33+
"id": "gpt-5.5",
34+
"name": "GPT-5.5 via Codex Pooler",
35+
"reasoning": true,
36+
"input": ["text", "image"],
37+
"contextWindow": 400000,
38+
"maxTokens": 128000
39+
}
40+
]
41+
}
42+
}
43+
}
44+
```
45+
46+
For local setup, change `baseUrl` to `http://localhost:4000/v1`.
47+
48+
`authHeader: true` makes Pi send the Pool API key as `Authorization: Bearer ...`. Define only model ids your assigned Pool can serve.
49+
50+
## Smoke check
51+
52+
Run a one-shot prompt from the repository you want Pi to inspect:
53+
54+
```bash
55+
export CODEX_POOLER_API_KEY=<pool-api-key>
56+
pi --provider codex-pooler \
57+
--model gpt-5.5 \
58+
--no-session \
59+
--no-context-files \
60+
--tools bash \
61+
-p 'Reply with exactly: pi ok'
62+
```
63+
64+
`--no-session` keeps the check ephemeral. `--no-context-files` keeps the smoke independent from local project instructions. For normal interactive use, omit those flags if you want Pi to load `AGENTS.md`, skills, sessions, and project settings.
65+
66+
## MCP boundary
67+
68+
Pi model requests use Codex Pooler's narrow OpenAI-compatible `/v1` support for selected SDK routes. Codex Pooler doesn't provide full OpenAI API parity.
69+
70+
Pi does not ship built-in MCP support. Codex Pooler model use does not require MCP. If you need operator metadata from `/mcp`, use a separate MCP-capable host and authenticate it with an operator-owned MCP token, not the Pool API key.

0 commit comments

Comments
 (0)