Repository navigation
Automatic compaction never triggers in image-heavy sessions — token-meter prices image blocks by JSON reference size, not visual tokens #9255
Replies: 1 comment 1 reply
|
Thanks for the source-level writeup — every link in the chain checks out against The gap, confirmed
if (block.type === 'image') {
const { offloaded: _offloaded, ...reference } = block
return BLOCK_OVERHEAD + Math.ceil(JSON.stringify(reference).length / CHARS_PER_TOKEN)
}The doc comment on that function already names the reason this is a placeholder rather than a price — "image references, whose request price is route-owned rather than fixed" — and the route-owned answer is resolved one call away, in return this.ctx.get('llm')?.imageRequestPricing(config.provider, config.model)The base declares none by design: Why it bites the routes you were on
Which of the two consumers is affectedWorth separating, because only one of them has a safety net:
That second bullet is your evidence item 2 — "the range selector never selected the actual conversation body" — stated mechanically. A plugin now fills it
It wraps the Mount it from a profile with the bundle patch the package ships: - insert:
- id: image-price-fallback
name: '@argszero/dsh-image-price-fallback'The estimate is Honest boundaries
|

Thanks for the source-level writeup — every link in the chain checks out against
master, and the plugin-shaped half of your suggestion now exists.The gap, confirmed
packages/llm/token-meter/src/estimate.tsprices a retained image by the JSON length of its own reference:The doc comment on that function already names the reason this is a placeholder rather than a price — "image references, whose request price is route-owned rather than fixed" — and the route-owned answer is resolved one call away, in
packages/llm/to…