@bman654/clodex 2.9.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -4
- package/dist/cli.js +573 -183
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -241,10 +241,11 @@ Manage favorite models (max 20) and short aliases. Favorites feed the endpoint-m
|
|
|
241
241
|
|
|
242
242
|
#### Context stops and the pricing boundary
|
|
243
243
|
|
|
244
|
-
A context window is a cost dial as much as a capacity number. OpenAI prices GPT-5.
|
|
245
|
-
prompts above **272,000 input tokens at 2x input and 1.5x output for the
|
|
246
|
-
request**, which is why the Codex catalog reports a 272,000 window rather than
|
|
247
|
-
model's ceiling.
|
|
244
|
+
A context window is a cost dial as much as a capacity number. OpenAI prices GPT-5.5
|
|
245
|
+
and later prompts above **272,000 input tokens at 2x input and 1.5x output for the
|
|
246
|
+
full request**, which is why the Codex catalog reports a 272,000 window rather than
|
|
247
|
+
the model's ceiling. Newer families inherit the same boundary, so a model released
|
|
248
|
+
after this was written is covered without a clodex update. Clodex follows that: the default `standard` stop stays under the
|
|
248
249
|
line, and a larger window is something you ask for.
|
|
249
250
|
|
|
250
251
|
```sh
|
|
@@ -398,6 +399,40 @@ clodex --version # version
|
|
|
398
399
|
so telling the client never to resend a request is not quietly undone one
|
|
399
400
|
layer down.
|
|
400
401
|
Recovered requests appear in the inference log as `response_retried`.
|
|
402
|
+
- **Connection pacing (ChatGPT/Codex plans):** when many agents run at once,
|
|
403
|
+
clodex spaces out the new connections it opens to OpenAI, which should make a
|
|
404
|
+
burst of parallel work less likely to trip OpenAI's own rate limit. (In the
|
|
405
|
+
traffic we sampled, the rejections clustered in the busiest minutes; that the
|
|
406
|
+
rate is what triggers them is a reasonable reading of that, not something we
|
|
407
|
+
can prove.) A follow-up turn that can reuse the connection it already has is
|
|
408
|
+
never delayed by this;
|
|
409
|
+
what goes through the limiter is work that needs a *new* connection — a first
|
|
410
|
+
turn, a conversation that branched, or several agents running at once. The
|
|
411
|
+
default is 60 new connections a minute, with an allowance of 10 opened back
|
|
412
|
+
to back after a quiet spell.
|
|
413
|
+
**This is a real throughput ceiling, not a brief pause.** One new connection
|
|
414
|
+
per second means that if you run many agents at once and each needs its own
|
|
415
|
+
connection, they end up sharing that budget: roughly 20 agents settle at
|
|
416
|
+
about 20 seconds per turn instead of a few seconds. That is the trade — you
|
|
417
|
+
wait longer, in exchange for a lower chance of losing turns to rate-limit
|
|
418
|
+
errors. It reduces that risk rather than removing it: clodex cannot see
|
|
419
|
+
OpenAI's actual limit, and under a heavy enough fan-out pacing can itself
|
|
420
|
+
answer a turn with a rate-limit response. Work over the
|
|
421
|
+
rate is queued for a few seconds, and anything still over is answered with
|
|
422
|
+
the same "try again shortly" response OpenAI itself would return, which
|
|
423
|
+
clodex retries for you with backoff. Set
|
|
424
|
+
`CLODEX_WS_MAX_NEW_CONNECTIONS_PER_MIN` to another whole number between `1`
|
|
425
|
+
and `600` to change the rate, or to `0` to turn pacing off. Higher values
|
|
426
|
+
clamp to `600` with a one-time warning, and an unreadable value is reported
|
|
427
|
+
once and ignored. If you have turned retries off with
|
|
428
|
+
`CLODEX_UPSTREAM_MAX_RETRIES=0`, pacing never refuses a request — but it also
|
|
429
|
+
stops limiting once its initial allowance is used up, because there would be
|
|
430
|
+
nothing left to retry a refused request. The same applies at very low rates:
|
|
431
|
+
if clodex cannot retry a turned-away request for long enough to reach the
|
|
432
|
+
next free connection slot — which is the case around 1 or 2 connections a
|
|
433
|
+
minute at the default timeouts — it admits the excess late rather than
|
|
434
|
+
failing it, and says so once. Turning a rate that low into hard failures
|
|
435
|
+
would manufacture the errors this feature exists to reduce.
|
|
401
436
|
|
|
402
437
|
## Known limitations
|
|
403
438
|
|