NousResearch/hermes-agent

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

0open issues
0open PRs
4items grouped
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

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #115793 fix(agent): Responses tool-result images no longer inflate the context estimate by their base64 length (#108320, salvage #108330)

    merged to main

    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

  • #108330 fix(agent): price Responses function_call_output images flat, not as base64 text · merged via another change → 9168bba, #115793, #108320, #108330
  • #108331 fix(agent): count Responses tool output images correctly · superseded by another PR → #108330
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.00 means 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

At a glance

Merged PRs
#115793
Closed issues
1
Attempts
2 PRs closed without merging
Fix link checked
19 Sep 2026

For your agent

The same facts, typed.