Skip to content

v2.13.2

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Jul 03:28

Cloud stats: the CLI now reports Anthropic prompt-caching breakdown (cache-creation and cache-read token counts) alongside the existing input/output/cost totals, so the dashboard can show "saved $X with caching" for CLI and VS Code (ACP) sessions.

Changed

  • Cache token reporting in cloud stats. StatsPayload
    (src/utils/codeepCloud.ts) now carries optional
    cacheCreationTokens / cacheReadTokens. The three reportStats
    call sites — src/renderer/main.ts (sync and async paths) and
    src/renderer/agentExecution.ts — pass through the per-model
    buckets from getCostBreakdown(), and getSessionStats() exposes
    session-totals via new totalCacheCreationTokens /
    totalCacheReadTokens fields. The ACP server (src/acp/server.ts)
    — the path VS Code uses — was updated in lockstep so both clients
    report the same shape.

    Why: estimatedCost already folded cache multipliers into the
    dollar total, but the raw cache counts were dropped on the floor,
    so the dashboard couldn't break out "this session read 500k tokens
    from cache." Now it can.

  • ProviderCostBreakdown and SessionTokenStats extended. Both
    interfaces gained cacheCreationTokens / cacheReadTokens
    (required on the breakdown, since every provider reports something
    — 0 for non-caching). getCostBreakdown() accumulates them per
    provider/model group; getSessionStats() sums across all records.
    Two new tests cover the accumulation paths.