Fix token counting for base64 images in tool output
Cluster 108320. Data as of
Nothing open on GitHub. Fix merged in #115793 on 19 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 #115793. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #115793. That is separate from the fix event. - Still open
- Nothing open on GitHub.
These issues and PRs address a bug where base64-encoded images in Responses API function_call_output are incorrectly counted as raw text, inflating context/token estimates. The work focuses on correcting the pricing and estimation logic for such images.
Open issues0
Open PRs0
Fixes on record
-
#115793 fix(agent): Responses tool-result images no longer inflate the context estimate by their base64 length (#108320, salvage #108330)
files:
agent/model_metadata.py,tests/agent/test_model_metadata.py
2 PRs closed without merging
From the close comments: merged via another change 1 · superseded by another PR 1
Closed issues · 1
- Closed#108320Token estimator counts base64 images in Responses function_call_output.output as text
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 LabAt a glance
- Merged PRs
- #115793
- Closed issues
- 1
- Attempts
- 2 PRs closed without merging
- Fix link checked
- 19 Sep 2026