@bman654/clodex 2.11.0 → 2.11.2
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 +41 -21
- package/dist/cli.js +423 -174
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -245,8 +245,9 @@ A context window is a cost dial as much as a capacity number. OpenAI prices GPT-
|
|
|
245
245
|
and later prompts above **272,000 input tokens at 2x input and 1.5x output for the
|
|
246
246
|
full request**, which is why the Codex catalog reports a 272,000 window rather than
|
|
247
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
|
|
249
|
-
line, and a larger window is something you
|
|
248
|
+
after this was written is covered without a clodex update. Clodex follows that: the
|
|
249
|
+
default `standard` stop stays under the line, and a larger window is something you
|
|
250
|
+
ask for.
|
|
250
251
|
|
|
251
252
|
```sh
|
|
252
253
|
clodex models --context sol=max --save # this model's default, with a cost warning
|
|
@@ -254,19 +255,21 @@ clodex claude --context sol=max # this launch only, nothing saved
|
|
|
254
255
|
clodex models --context sol=default --save # back to the provider's tuned window
|
|
255
256
|
```
|
|
256
257
|
|
|
257
|
-
Each stop is reported with the numbers behind it: the raw window, the
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
Each stop is reported with the numbers behind it: the raw window, the effective
|
|
259
|
+
window a client should fill, and the account ceiling a larger stop can reach. A stop
|
|
260
|
+
above the ceiling is clamped and says so. When a request's own reported token count
|
|
261
|
+
crosses the boundary, clodex warns once per model for the life of the process,
|
|
262
|
+
because the client's token count and the provider's differ after translation and only
|
|
263
|
+
the provider's settles it.
|
|
263
264
|
|
|
264
265
|
Two things worth knowing about the numbers:
|
|
265
266
|
|
|
266
|
-
- **
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
- **Clodex reports the window the provider actually gives, and holds nothing back.**
|
|
268
|
+
Deciding how much of a window to leave free is the client's job — Claude Code
|
|
269
|
+
already reserves a fixed amount below whatever window it is told, and shrinking the
|
|
270
|
+
number first only costs usable context. A provider that declares a share of its own
|
|
271
|
+
is still honoured; clodex just never invents one. Use `--context` if you want a
|
|
272
|
+
smaller window than the provider offers.
|
|
270
273
|
- **The account ceiling moves.** It is server-side and per-account, and it has
|
|
271
274
|
changed by more than 2x within a single day in the past. `max` reads whatever the
|
|
272
275
|
catalog reports now and clamps to it, so a stale ceiling shrinks the stop rather
|
|
@@ -359,7 +362,12 @@ clodex --version # version
|
|
|
359
362
|
avoid near-immediate termination; the 1h/6h ceilings allow deliberately long
|
|
360
363
|
calls without leaving stalls attached indefinitely. At either deadline,
|
|
361
364
|
clodex aborts the SDK call; cancellation is cooperative, so a provider
|
|
362
|
-
transport that ignores the abort signal can settle later.
|
|
365
|
+
transport that ignores the abort signal can settle later. clodex also asks
|
|
366
|
+
the provider to stop as soon as the client that made the request goes away —
|
|
367
|
+
a Ctrl-C, a killed agent, or a closed browser — instead of waiting for a
|
|
368
|
+
deadline, whether the answer had started arriving or not. The same
|
|
369
|
+
cooperative limit applies: clodex stops relaying and requests cancellation,
|
|
370
|
+
but cannot guarantee the provider stops generating. These are
|
|
363
371
|
server-side limits, and callers may stop sooner. Claude Code currently
|
|
364
372
|
defaults to about 180s of downstream byte silence in proxy mode and 300s in
|
|
365
373
|
endpoint mode, with
|
|
@@ -376,11 +384,16 @@ clodex --version # version
|
|
|
376
384
|
… backoff, so a shorter idle timeout automatically lowers both. The ceiling
|
|
377
385
|
is `5` at the default timeout and can rise to `10` at the maximum. Larger
|
|
378
386
|
integers clamp with a one-time warning that names the active idle timeout.
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
387
|
+
Without a retry hint, five retries can add roughly 62s of fallback
|
|
388
|
+
backoff instead of the SDK default's roughly 6s, giving a transiently
|
|
389
|
+
unavailable provider more time to recover. When OpenAI explicitly states an
|
|
390
|
+
acceptable delay for a WebSocket throttle, clodex gives that value to the
|
|
391
|
+
SDK instead of its fallback schedule. Clodex's existing 5s default remains a
|
|
392
|
+
client-facing hint for upgrade 403s and WebSocket connection-limit errors
|
|
393
|
+
that state no delay; it does not replace the SDK's fallback. Other hintless
|
|
394
|
+
429s also retain the fallback schedule. Provider `retry-after` hints and time
|
|
395
|
+
spent in failed attempts can mean fewer retries start before a streaming idle
|
|
396
|
+
deadline; the shared abort signal still
|
|
384
397
|
interrupts backoff when that deadline fires. If a deadline interrupts a
|
|
385
398
|
retry delay, clodex preserves the provider failure that prompted the retry;
|
|
386
399
|
if a currently active call is silent, clodex reports the timeout instead.
|
|
@@ -404,10 +417,17 @@ clodex --version # version
|
|
|
404
417
|
burst of parallel work less likely to trip OpenAI's own rate limit. (In the
|
|
405
418
|
traffic we sampled, the rejections clustered in the busiest minutes; that the
|
|
406
419
|
rate is what triggers them is a reasonable reading of that, not something we
|
|
407
|
-
can prove.) A follow-up turn that
|
|
408
|
-
never delayed by this;
|
|
420
|
+
can prove.) A follow-up turn that already has a connection it can reuse when
|
|
421
|
+
it arrives is never delayed by this;
|
|
409
422
|
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.
|
|
423
|
+
turn, a conversation that branched, or several agents running at once. If a
|
|
424
|
+
turn that is waiting its place in the queue finds, on being let through, that
|
|
425
|
+
a connection has freed up and is carrying exactly the conversation it is
|
|
426
|
+
continuing, it picks that one up instead of opening another. That is
|
|
427
|
+
uncommon — it needs another turn to finish inside the few seconds this one
|
|
428
|
+
spends waiting AND to have been on the same conversation history — so treat
|
|
429
|
+
it as an edge taken when it appears, not as agents routinely sharing
|
|
430
|
+
connections. The
|
|
411
431
|
default is 60 new connections a minute, with an allowance of 10 opened back
|
|
412
432
|
to back after a quiet spell.
|
|
413
433
|
**This is a real throughput ceiling, not a brief pause.** One new connection
|