docs(codex): clarify stale-floor docstring reflects the 10k gate

The helper docstring described the typical ~15-25k gateway payload but
read as if that were the trigger range; the floor actually engages above
10k tokens. Clarify the prose to match the gate.
This commit is contained in:
kshitijk4poor 2026-07-02 16:59:42 +05:30 committed by kshitij
parent ede4d12561
commit 0a2d4a6eea

View file

@ -134,7 +134,9 @@ def openai_codex_stale_timeout_floor(est_tokens: int) -> float:
Gateway/Telegram sessions routinely ship ~1525k tokens of tools +
instructions before the first user message. Subscription-backed Codex can
legitimately spend several minutes in backend admission/prefill at that
size; the generic 90s non-stream stale default aborts healthy calls.
size; the generic 90s non-stream stale default aborts healthy calls. The
floor engages above 10k estimated tokens so those gateway-scale payloads
are covered; smaller requests keep the generic default.
"""
if est_tokens > 100_000:
return 1200.0