Skip to content

costIsEstimated is dropped at the parser boundary; estimated costs render exactly like measured ones #639

Closed

Description

@avs-io

Problem

Providers that estimate tokens/cost set costIsEstimated: true (kiro, cursor, warp, copilot, grok, hermes, codex proxy path), but the field exists only on ParsedProviderCall (src/providers/types.ts:24). It is not carried onto ParsedApiCall or SessionSummary (src/types.ts), and src/parser.ts never reads it. Result: a Warp figure whose output tokens are synthesized from prompt length (src/providers/warp.ts:199-206) renders with the same authority as a Claude measured figure in the dashboard, overview, exports, and MCP tables. The only estimate disclaimer in the product is the optimize findings caption (src/dashboard.tsx:681), which does not cover the cost surfaces.

Evidence

  • grep -rn costIsEstimated src/parser.ts src/types.ts returns nothing; the flag dies at the provider layer.
  • Setters: src/providers/kiro.ts:464, cursor.ts:768, warp.ts:407, copilot.ts:1467, grok.ts:199, codex.ts:477, hermes.ts:410.
  • Verified on main at 1a75484.

Proposed fix

Propagate an estimated-cost portion through ParsedApiCall -> SessionSummary -> aggregates (e.g. estimatedCostUSD alongside costUSD), then mark affected rows and totals in all four output layers (TUI, overview text, CSV/JSON export, MCP tables) with an est. tag or tilde. Related to the accuracy reports behind #574: users cannot currently tell which numbers deserve how much trust.

Activity

  1. avs-io commented on Jul 16, 2026

    @avs-io
    CollaboratorAuthor

    Working on this. Approach as proposed: propagate the estimated portion additively (estimatedCostUSD alongside costUSD) parser → session → aggregates, mark it in TUI/overview/exports/MCP tables, and bump both cache versions so pre-existing entries re-hydrate instead of silently reading as measured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions