# NousResearch/hermes-agent · Image token counting inaccurate in compression logic

## Open now

- 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.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #104575. Verify it addresses your case.
- **Recommended:** read PR #104575 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-104575`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.67`: the share of member 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.

## Closed / duplicate issues

- #70328: Compression trigger prices every image at a flat 1500 tokens — vision-heavy sessions on a 64K local model hit provider 400s before compaction can fire

## Prior & competing PRs

- **#104575: feat(compression): image token cost learned from the provider's usage, not a flat constant (#70328, supersedes #70463)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - 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`
- **#70463: fix: raise image token estimate from 1500/1600 to 4000 for multimodal models (#70328)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `be58c276ee`, `#104575`, `#70328`

## Fix status

- Merged to main in PR #104575 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-06`.
- Subsystem: `agent`
