NousResearch/hermes-agent

Image token counting inaccurate in compression logic

Cluster 70328 · agent. Data as of

Nothing open on GitHub. Fix merged in #104575 on 6 Sep 2026. Check it covers your case.

The short answer

0open issues
0open PRs
3items grouped
Known?
Yes. 3 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #104575. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #104575. That is separate from the fix event.
Still open
Nothing open on GitHub.

The compression system uses a flat constant to estimate image token costs, which underestimates actual usage and can cause errors in vision-heavy sessions. These items propose raising the constant and/or deriving the cost from actual provider usage data instead.

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.

  • #104575 feat(compression): image token cost learned from the provider's usage, not a flat constant (#70328, supersedes #70463)

    merged to main

    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

1 PR closed without merging

From the close comments: done elsewhere 1

  • #70463 fix: raise image token estimate from 1500/1600 to 4000 for multimodal models (#70328) · done elsewhere → be58c27, #104575, #70328
Closed issues · 1
  • Closed#70328Compression trigger prices every image at a flat 1500 tokens — vision-heavy sessions on a 64K local model hit provider 400s before compaction can fire
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.67: 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

Subsystem
agent
Merged PRs
#104575
Closed issues
1
Attempts
1 PR closed without merging
Fix link checked
6 Sep 2026

For your agent

The same facts, typed.