﻿# AG2 1.3.2: cached input changes token budgets without replaying old usage

How AG2 1.3.2 changes cached-input accounting, token-monitor thresholds and historical comparisons without confusing normalized usage with provider invoices.

Author: Retrivium editorial team
Updated: 2026-11-18
Canonical URL: https://retrivium.ai/journal/daily-20261116-agent-ag2-whole-input-cache-accounting/
Language: en

Published on 18 November 2026. AG2 1.3.2 was published on 15 November at 16:37:55 UTC, within the research window from 14 November, 14:00:21 UTC, to 16 November, 02:00:21 UTC. The usage-accounting patch merged on 12 November. The fresh event is its inclusion in this tagged release, not a claim that the underlying accounting problem was discovered on 15 November.

## One field needs one accounting meaning

A mixed-provider agent system cannot compare budgets reliably if the same field represents different amounts of input. The [mapper change](https://github.com/ag2ai/ag2/pull/3620) makes AG2 prompt usage include cached input consistently for Anthropic and Bedrock. Cache reads and writes are components of that input, rather than amounts to add again afterward. This is a normalization of usage reporting. It does not turn every token into an equally priced unit or establish how an external provider will invoice a particular request.

## Build a synthetic ledger before changing limits

A proposed acceptance fixture can describe one response using three separate quantities: uncached input, cache-read input and cache-creation input. Choose distinctive numbers so an omitted component or a double addition is immediately visible. Pass the fixture through the provider mapper and then through every consumer that matters to the application. The expected result should be calculated independently. Testing only a dashboard can miss a second consumer that still applies its old provider-specific correction and therefore counts cached tokens twice.

## A lower reported budget is not less work

Consider two synthetic responses representing the same total input but different cache states. A token monitor should receive comparable whole-input counts after normalization. If a threshold is crossed sooner after upgrading, that can reflect more complete accounting rather than additional model work. Compare the input breakdown and monitor decision together before changing the configured limit. A threshold chosen for uncached-only reporting may require deliberate migration, but simply raising every limit would conceal the contract change instead of explaining it.

## Keep old and new records distinguishable

The implementation does not rewrite previously stored usage. Historical comparisons therefore need a version boundary. A practical report can label each aggregate with the accounting convention used to produce it, while keeping synthetic fixtures and expected totals available for reproducibility. Do not silently combine incompatible historical totals and interpret the jump as growth in demand. This advice concerns application-owned accounting records; it does not propose collecting customer prompts, responses or individual inference histories at Retrivium.

## Test delegation totals independently from invoices

A small proposed delegation tree can combine responses from different provider mappers and check both leaf counts and the final aggregate. Repeat with a cached response and a noncached response, and verify that the total is stable under the documented rule. Pricing remains a separate calculation that requires the applicable provider tariff and billing terms. Token consistency is useful evidence for that calculation, not proof that an invoice will match a homemade estimator.

The [1.3.2 release](https://github.com/ag2ai/ag2/releases/tag/v1.3.2) records the delivered behavior, while the [telemetry documentation](https://docs.ag2.ai/docs/user-guide/telemetry/agent/) describes a downstream consumer. These are proposed validation methods, not benchmarks performed by Retrivium.

Related reading: [Prompt-template token accounting](/journal/provider-prompt-token-template-accounting/); [The final usage frame](/journal/provider-final-usage-frame-contract/).
