Skip to content

Commit 74cb417

Browse files
committed
docs: align harness model limit guidance
1 parent 8dfaad5 commit 74cb417

15 files changed

Lines changed: 161 additions & 19 deletions

File tree

README.md

Lines changed: 108 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ OpenAI Realtime SDK compatibility.
154154
},
155155
"limit": {
156156
"context": 272000,
157-
"input": 240000,
157+
"input": 228000,
158158
"output": 64000
159159
}
160160
}
@@ -181,6 +181,13 @@ Define only models that your assigned Pool can serve. For deployed instances,
181181
change `baseURL` to `https://codex-pooler.example.com/v1`; if you keep the optional
182182
operator MCP entry, change its `url` to `https://codex-pooler.example.com/mcp`.
183183

184+
OpenCode subtracts its compaction reserve from `limit.input` before deciding a
185+
conversation is full. The `228000` value leaves 208k usable input tokens after
186+
OpenCode's default 20k reserve, so 208k input plus a 64k output cap stays inside
187+
Codex Pooler's 272k `gpt-5.5` window. OpenCode's request layer caps output at
188+
32k by default; set `OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX=64000` only if you
189+
want OpenCode to request the full 64k cap.
190+
184191
</details>
185192

186193
<details>
@@ -246,6 +253,13 @@ requires_openai_auth = true
246253
For deployed instances, change `base_url` to
247254
`https://codex-pooler.example.com/backend-api/codex`.
248255

256+
When Codex Pooler serves current model metadata, Codex does not need explicit
257+
client-side context overrides. If you must pin `gpt-5.5` for an older model
258+
catalog, use Codex's own fields: `model_context_window = 272000` and
259+
`model_auto_compact_token_limit = 244800`. Codex computes an effective 95%
260+
window for turn budgeting and does not send an OpenAI SDK-style output cap on
261+
normal `/responses` turns.
262+
249263
Optional operator-only MCP metadata add-on. Omit for normal Codex runtime use:
250264

251265
```toml
@@ -350,6 +364,7 @@ point the OpenAI provider at Codex Pooler and use the current OpenClaw runtime i
350364
agents: {
351365
defaults: {
352366
model: { primary: "openai/gpt-5.5" },
367+
compaction: { reserveTokens: 128000 },
353368
},
354369
},
355370
models: {
@@ -367,9 +382,9 @@ point the OpenAI provider at Codex Pooler and use the current OpenClaw runtime i
367382
name: "GPT-5.5 via Codex Pooler",
368383
reasoning: true,
369384
input: ["text", "image"],
370-
contextWindow: 272000,
371-
contextTokens: 208000,
372-
maxTokens: 64000,
385+
contextWindow: 1000000,
386+
contextTokens: 272000,
387+
maxTokens: 128000,
373388
},
374389
],
375390
},
@@ -393,6 +408,13 @@ point the OpenAI provider at Codex Pooler and use the current OpenClaw runtime i
393408
Define only models that your assigned Pool can serve. For deployed instances,
394409
change `baseUrl` to `https://codex-pooler.example.com/v1`; if you keep the optional
395410
operator MCP add-on, change its `url` to `https://codex-pooler.example.com/mcp`.
411+
412+
OpenClaw keeps `contextWindow` as the provider/native window and uses
413+
`contextTokens` as the effective runtime budget. The `gpt-5.5` OpenAI source
414+
catalog publishes a 1M native window, a 272k effective cap, and a 128k output
415+
budget; the explicit compaction reserve keeps local history under the remaining
416+
144k prompt budget before a long completion.
417+
396418
If you prefer to keep Codex Pooler separate from OpenClaw's built-in OpenAI
397419
provider behavior, use a custom provider id such as `codex-pooler/gpt-5.5`
398420
instead. That follows OpenClaw's generic custom-provider shape, but tools that
@@ -448,6 +470,11 @@ mcp_servers:
448470
connect_timeout: 15
449471
```
450472
473+
Hermes' direct `openai-api` fallback metadata treats `gpt-5.5` as a 1.05M-token
474+
API model when no override is present. Keep `context_length: 272000` in Codex
475+
Pooler configs so Hermes compacts against Codex Pooler's exposed model window
476+
instead of overfilling the `/v1` route.
477+
451478
Remote HTTP MCP servers require Hermes' `mcp` extra. If
452479
`hermes mcp test codex_pooler` reports `mcp.client.streamable_http is not
453480
available`, install MCP support into the Hermes environment, following the
@@ -557,7 +584,7 @@ Then add a provider to `~/.pi/agent/models.json`:
557584
},
558585
"input": ["text", "image"],
559586
"contextWindow": 272000,
560-
"maxTokens": 64000
587+
"maxTokens": 128000
561588
}
562589
]
563590
}
@@ -575,6 +602,13 @@ the model picker and footer. Without it, Pi treats `xhigh` as unsupported for a
575602
custom model and clamps `--thinking xhigh` or `defaultThinkingLevel: "xhigh"` to
576603
`high`.
577604

605+
Pi accepts `contextWindow` and `maxTokens` for custom models; it has no
606+
`contextTokens` field. The bundled Pi `gpt-5.5` entries use a 272k context
607+
window and 128k output budget, so matching those values keeps Codex Pooler
608+
custom-provider behavior aligned with Pi's built-in metadata. The explicit
609+
compaction reserve makes Pi compact before a prompt plus a long completion can
610+
exceed that 272k window.
611+
578612
Optionally set Codex Pooler as the default Pi model in
579613
`~/.pi/agent/settings.json`:
580614

@@ -583,7 +617,10 @@ Optionally set Codex Pooler as the default Pi model in
583617
"defaultProvider": "codex-pooler",
584618
"defaultModel": "gpt-5.5",
585619
"defaultThinkingLevel": "xhigh",
586-
"enabledModels": ["codex-pooler/gpt-5.5"]
620+
"enabledModels": ["codex-pooler/gpt-5.5"],
621+
"compaction": {
622+
"reserveTokens": 128000
623+
}
587624
}
588625
```
589626

@@ -640,7 +677,7 @@ providers:
640677
- text
641678
- image
642679
contextWindow: 272000
643-
maxTokens: 64000
680+
maxTokens: 128000
644681
```
645682

646683
`apiKey: CODEX_POOLER_API_KEY` makes OMP resolve that environment variable at
@@ -649,6 +686,11 @@ runtime. `authHeader: true` makes OMP send the Pool API key as
649686
serve. For deployed instances, change `baseUrl` to
650687
`https://codex-pooler.example.com/v1`.
651688

689+
OMP accepts `contextWindow` and `maxTokens` in `models.yml`; it does not accept
690+
`contextTokens`. Its Codex `gpt-5.5` catalog uses a 272k context window and 128k
691+
output budget. `compaction.reserveTokens: 128000` makes OMP compact before a
692+
prompt plus a long completion can exceed that 272k window.
693+
652694
Optionally set Codex Pooler as the default OMP model roles in
653695
`~/.omp/agent/config.yml`:
654696

@@ -668,7 +710,7 @@ modelRoles:
668710
task: codex-pooler/gpt-5.5:xhigh
669711
vision: codex-pooler/gpt-5.5:xhigh
670712
compaction:
671-
reserveTokens: 64000
713+
reserveTokens: 128000
672714
```
673715

674716
Check the non-interactive path from a repository:
@@ -724,16 +766,27 @@ Then configure the provider in `~/.config/kilo/kilo.jsonc`:
724766
},
725767
"limit": {
726768
"context": 272000,
727-
"input": 208000,
769+
"input": 228000,
728770
"output": 64000
729771
}
730772
}
731773
}
732774
}
775+
},
776+
"compaction": {
777+
"threshold_percent": 75
733778
}
734779
}
735780
```
736781

782+
Kilo uses OpenCode-style `limit.{context,input,output}` fields, but it includes
783+
reasoning tokens in overflow accounting and uses `compaction.threshold_percent`
784+
for preflight compaction. `limit.input: 228000` leaves 208k usable input tokens
785+
after the default 20k reserve; the 75% threshold asks Kilo to compact earlier.
786+
For GPT-5 OpenAI-compatible models, Kilo suppresses the outgoing max-token
787+
request field to avoid incompatible `max_tokens`, so `limit.output` is still
788+
important for local context math and UI even when it is not forwarded.
789+
737790
Define only model ids your assigned Pool can serve. For deployed instances,
738791
change `baseURL` to `https://codex-pooler.example.com/v1`. If you add Kilo
739792
permissions, use Kilo's object form such as `"permission": {"bash": "allow"}`;
@@ -776,6 +829,12 @@ model: openai/gpt-5.5
776829
openai-api-base: http://localhost:4000/v1
777830
```
778831
832+
Aider's bundled `gpt-5.5` settings define behavior flags such as diff editing,
833+
repo-map use, and `reasoning_effort`; they do not bundle context/output limits
834+
in `.aider.conf.yml`. If you need explicit unknown-model limits, use Aider's
835+
separate model metadata JSON file instead of adding unsupported context fields to
836+
the main config.
837+
779838
Keep the Pool API key out of the YAML file. Export it in the shell, or put it in
780839
a gitignored `.env` file that Aider can load:
781840

@@ -831,6 +890,9 @@ models:
831890
model: gpt-5.5
832891
apiBase: http://localhost:4000/v1
833892
apiKey: "${{ secrets.CODEX_POOLER_API_KEY }}"
893+
contextLength: 272000
894+
defaultCompletionOptions:
895+
maxTokens: 128000
834896
roles:
835897
- chat
836898
- edit
@@ -855,6 +917,11 @@ For deployed instances, change `apiBase` to `https://codex-pooler.example.com/v1
855917
if you keep the optional operator MCP add-on, change the MCP `url` to
856918
`https://codex-pooler.example.com/mcp`.
857919

920+
Continue uses `contextLength` for request pruning and
921+
`defaultCompletionOptions.maxTokens` for the completion budget. It prunes rather
922+
than summarizing/compacting locally, so keep the context length at Codex Pooler's
923+
272k `gpt-5.5` window instead of using direct-OpenAI 1M metadata.
924+
858925
Check the headless CLI path after saving the config:
859926

860927
```bash
@@ -885,6 +952,12 @@ cline auth \
885952
--modelid gpt-5.5
886953
```
887954

955+
Cline's model metadata names are `contextWindow`, `maxInputTokens`, and
956+
`maxTokens`. If you add a manual Codex Pooler model entry in Cline settings, use
957+
`contextWindow: 272000`, `maxInputTokens: 144000`, and `maxTokens: 128000` so
958+
Cline's compaction trigger leaves room for a long completion inside the 272k
959+
Pooler window.
960+
888961
Check the headless CLI path after saving auth:
889962

890963
```bash
@@ -946,8 +1019,16 @@ GOOSE_PROVIDER: openai
9461019
GOOSE_MODEL: gpt-5.5
9471020
OPENAI_HOST: http://localhost:4000
9481021
OPENAI_BASE_PATH: v1/chat/completions
1022+
GOOSE_CONTEXT_LIMIT: 272000
1023+
GOOSE_MAX_TOKENS: 128000
1024+
GOOSE_AUTO_COMPACT_THRESHOLD: 0.52
9491025
```
9501026

1027+
Goose reads `GOOSE_CONTEXT_LIMIT` and `GOOSE_MAX_TOKENS` into its model config.
1028+
Its auto-compaction threshold is a ratio of the context limit, not an output
1029+
reserve, so `0.52` compacts before prompt history can crowd out a 128k
1030+
completion in Codex Pooler's 272k `gpt-5.5` window.
1031+
9511032
Check the headless CLI path with tool access enabled:
9521033

9531034
```bash
@@ -1031,6 +1112,10 @@ metadata_model:
10311112
model: gpt-5.5
10321113
```
10331114

1115+
Windmill's agent request field is `max_completion_tokens`; provider adapters map
1116+
that to OpenAI Responses `max_output_tokens` or chat `max_completion_tokens` as
1117+
needed. Do not use `max_tokens` for GPT-5/O-series Windmill AI requests.
1118+
10341119
For deployed Codex Pooler instances, change `base_url` to
10351120
`https://codex-pooler.example.com/v1`. If Windmill is self-hosted and that URL
10361121
resolves to a private or internal address from the Windmill app pod or server,
@@ -1076,6 +1161,11 @@ For deployed instances, change `LLM_BASE_URL` to
10761161
`openai/gpt-5.5` so OpenHands selects its OpenAI-compatible provider path while
10771162
Codex Pooler routes the request through the assigned Pool.
10781163

1164+
The audited OpenHands app source delegates authoritative LLM limit parsing to
1165+
`openhands-sdk`; the local app checkout does not expose source-verifiable
1166+
`gpt-5.5` context or output limit fields. Keep this example to model/base URL
1167+
environment overrides unless the SDK source is audited too.
1168+
10791169
</details>
10801170

10811171
<details>
@@ -1134,6 +1224,7 @@ For deployed instances, change `baseURL` to `https://codex-pooler.example.com/v1
11341224

11351225
</details>
11361226

1227+
11371228
<details>
11381229
<summary><img src=".github/assets/vercel-favicon.png" alt="Vercel logo" width="16" height="16"> Vercel AI SDK</summary>
11391230

@@ -1162,6 +1253,14 @@ For deployed instances, change `baseURL` to `https://codex-pooler.example.com/v1
11621253

11631254
</details>
11641255

1256+
The official OpenAI SDKs and Vercel AI SDK do not expose Codex model-catalog
1257+
context fields. Use their output-budget fields only when your application needs
1258+
one: `max_output_tokens` in OpenAI Responses, `max_completion_tokens` in Chat
1259+
Completions, and `maxOutputTokens` at the Vercel AI SDK layer. Codex Pooler's
1260+
public `/v1/responses` currently rejects `context_management`, and public
1261+
`/v1/responses/compact` is routed but unsupported, so do not document SDK-side
1262+
compaction as a Codex Pooler feature.
1263+
11651264
<details>
11661265
<summary><img src=".github/assets/claude-code-favicon.png" alt="Claude Code logo" width="16" height="16"> Claude Code</summary>
11671266

docs-site/src/content/docs/clients/aider.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ model: openai/gpt-5.5
2121
openai-api-base: http://localhost:4000/v1
2222
```
2323
24+
Aider's bundled `gpt-5.5` settings define behavior flags such as diff editing, repo-map use, and `reasoning_effort`; they do not bundle context/output limits in `.aider.conf.yml`. If you need explicit unknown-model limits, use Aider's separate model metadata JSON file instead of adding unsupported context fields to the main config.
25+
2426
Keep the Pool API key out of the YAML file. Export it in the shell, or put it in a gitignored `.env` file that Aider can load:
2527

2628
```bash

docs-site/src/content/docs/clients/cline.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ cline auth \
1515

1616
For local setup, change `--baseurl` to `http://localhost:4000/v1`.
1717

18+
Cline's user-facing model metadata names are `contextWindow`, `maxInputTokens`, and `maxTokens`. If you add a manual Codex Pooler model entry in Cline settings, use `contextWindow: 272000`, `maxInputTokens: 144000`, and `maxTokens: 128000` for `gpt-5.5`; Cline's compaction trigger then leaves room for a long completion inside the 272k Pooler window.
19+
1820
Check the headless CLI path after saving auth:
1921

2022
```bash

docs-site/src/content/docs/clients/codex-cli.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ requires_openai_auth = true
7777

7878
Both providers use the same Pool API key and the same Codex backend compatibility route in Codex CLI and Codex Desktop. Codex Pooler routes each request through Pool policy, account eligibility, limits, session continuity, and request accounting.
7979

80+
When Codex Pooler serves current model metadata, Codex does not need explicit client-side context overrides. If you must pin `gpt-5.5` for an older Codex catalog, use Codex's own fields: `model_context_window = 272000` and `model_auto_compact_token_limit = 244800`. Codex computes an effective 95% window for turn budgeting and does not send an OpenAI SDK-style output cap on normal `/responses` turns.
81+
8082
## Request compression behavior
8183

8284
Codex CLI and Codex Desktop do not need a client-side switch for Codex Pooler's per-Pool request compression. When an operator enables `request_compression_enabled`, eligible backend Responses, backend compact, backend `/v1/responses` aliases, translated backend chat, and websocket `response.create` requests may have upstream-bound Responses tool-output payloads compressed before dispatch.

docs-site/src/content/docs/clients/continue.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ models:
3232
model: gpt-5.5
3333
apiBase: https://codex-pooler.example.com/v1
3434
apiKey: "${{ secrets.CODEX_POOLER_API_KEY }}"
35+
contextLength: 272000
36+
defaultCompletionOptions:
37+
maxTokens: 128000
3538
roles:
3639
- chat
3740
- edit
@@ -54,6 +57,8 @@ mcpServers:
5457
5558
For local setup, change `apiBase` to `http://localhost:4000/v1`. If you keep the optional operator MCP add-on locally, change the MCP `url` to `http://localhost:4000/mcp`.
5659

60+
Continue uses `contextLength` for request pruning and `defaultCompletionOptions.maxTokens` for the completion budget. It prunes request messages before sending instead of doing Codex-style local compaction, so keep the context length at Codex Pooler's exposed model window.
61+
5762
Check the headless CLI path after saving the config:
5863

5964
```bash

docs-site/src/content/docs/clients/goose.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@ GOOSE_PROVIDER: openai
2424
GOOSE_MODEL: gpt-5.5
2525
OPENAI_HOST: https://codex-pooler.example.com
2626
OPENAI_BASE_PATH: v1/chat/completions
27+
GOOSE_CONTEXT_LIMIT: 272000
28+
GOOSE_MAX_TOKENS: 128000
29+
GOOSE_AUTO_COMPACT_THRESHOLD: 0.52
2730
```
2831
2932
For local setup, change `OPENAI_HOST` to `http://localhost:4000`.
3033

34+
Goose reads `GOOSE_CONTEXT_LIMIT` and `GOOSE_MAX_TOKENS` into its model config. Its auto-compaction threshold is a ratio of the context limit, not an output reserve, so `0.52` compacts before prompt history can crowd out a 128k completion in Codex Pooler's 272k `gpt-5.5` window.
35+
3136
Check the headless CLI path with tool access enabled:
3237

3338
```bash

docs-site/src/content/docs/clients/hermes.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ mcp_servers:
6363
6464
Use `http://localhost:4000/v1` and `http://localhost:4000/mcp` for a local Codex Pooler instance.
6565

66+
Hermes' direct `openai-api` fallback metadata treats `gpt-5.5` as a 1.05M-token API model when no override is present. Keep `context_length: 272000` in Codex Pooler configs so Hermes compacts against Codex Pooler's exposed model window instead of overfilling `/v1`.
67+
6668
Remote HTTP MCP servers require Hermes' `mcp` extra. If `hermes mcp test codex_pooler` reports `mcp.client.streamable_http is not available`, install MCP support into the Hermes environment, following the [Hermes MCP Integration docs](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp), and rerun the test.
6769

6870
Test the model path with a one-shot prompt:

docs-site/src/content/docs/clients/kilo.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ For a deployed instance, add `~/.config/kilo/kilo.jsonc`:
4343
},
4444
"limit": {
4545
"context": 272000,
46-
"input": 208000,
46+
"input": 228000,
4747
"output": 64000
4848
}
4949
}
5050
}
5151
}
52+
},
53+
"compaction": {
54+
"threshold_percent": 75
5255
}
5356
}
5457
```
@@ -57,6 +60,10 @@ For local setup, change `baseURL` to `http://localhost:4000/v1`.
5760

5861
`{env:CODEX_POOLER_API_KEY}` keeps the Pool API key outside the config file. Define only model ids your assigned Pool can serve. If you add Kilo permissions, use the object form such as `"permission": {"bash": "allow"}`; do not set `"permission": "ask"`, which is not a valid Kilo config shape.
5962

63+
Kilo uses OpenCode-style `limit.{context,input,output}` fields but includes reasoning tokens in overflow accounting and supports `compaction.threshold_percent` for preflight compaction. `limit.input: 228000` leaves 208k usable input tokens after the default 20k reserve; the optional 75% threshold asks Kilo to compact even earlier.
64+
65+
For GPT-5 OpenAI-compatible models, Kilo suppresses the outgoing max-token request field to avoid incompatible `max_tokens`, so `limit.output` is still important for local context math and UI even when it is not forwarded.
66+
6067
## Route shape
6168

6269
Kilo is a chat-completions client. It sends model requests to `POST /v1/chat/completions`, and Codex Pooler translates supported chat-completions requests into Codex Responses work internally. Do not point Kilo at `/backend-api/codex`, `/v1/responses`, or `/v1/chat/completions` as the configured base URL.

0 commit comments

Comments
 (0)