Image token estimation for TTFB watchdog and compression
Cluster 63871 · agent. Data as of
Nothing open on GitHub. Fix merged in #104757 on 7 Sep 2026. Check it covers your case.
The short answer
- Known?
- Yes. 4 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #104757. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #104757. That is separate from the fix event. - Still open
- Nothing open on GitHub.
Members appear to share one theme: estimating token cost of image-heavy content, with one report of the TTFB watchdog's estimate far exceeding API-reported prompt tokens. The other items propose pricing images by a learned, provider-usage-based cost instead of base64 length or a flat constant.
Open issues0
Open PRs0
Fixes on record
-
#104575 feat(compression): image token cost learned from the provider's usage, not a flat constant (#70328, supersedes #70463)
files:
agent/context_compressor.py,agent/image_token_cost.py,agent/model_metadata.py,agent/turn_context.py,agent/turn_usage.py,evals/token_accounting/ab_image_cost_calibration.py,gateway/run_turn.py,tests/agent/test_compressor_image_tokens.py,tests/agent/test_image_token_cost.py,website/docs/developer-guide/context-compression-and-caching.md -
#104757 fix(agent): watchdog estimator prices images at the learned cost, not base64 length (#63871, salvage #76471)
files:
agent/chat_completion_helpers.py,tests/agent/test_context_estimator_multimodal.py
1 PR closed without merging
From the close comments: done elsewhere 1
-
#63913 fix(agent): reduce TTFB watchdog token over-estimation for image-heavy turns (#63871) · done elsewhere →
922c0d6,#104757,#76471,#104575,#63871
Closed issues · 1
- Closed#63871TTFB watchdog token estimator reports ~1.9M tokens while API prompt_tokens stays ~90-175K (extreme-aspect images / large data-URI tool output)
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.50: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the Lab