Skip to content

[Story] A13. Usage, cost and limits #202

Backlog

Description

@aMonteSl

As a developer, I want to see tokens and estimated cost per chat, agent and provider, and set a budget, so that orchestrations do not surprise me.

Acceptance criteria

  • Usage per message, session and agent, with an editable price table.
  • Each answer keeps the provider, model and token usage it was produced with, so a chat's spend can be reviewed later without guessing.
  • The estimated cost (tokens × the local price table) is labelled separately from the actual cost when the provider reports one (e.g. OpenRouter's per-request cost). The two are never mixed in one figure.
  • A monthly budget with a warning and a hard stop.

Epic: #189

Activity

  1. added
    tfm
    on Nov 26, 2026
  2. added
    user-story
    area: ide
    on Nov 26, 2026
  3. roy-tong commented on Nov 26, 2026

    @roy-tong

    Estimated cost should be labeled separately from settled cost. I would keep provider, model, and token usage attached to each chat so the budget can be reviewed without guessing.

  4. aMonteSl commented on Nov 26, 2026

    @aMonteSl
    CollaboratorAuthor

    Thanks for the suggestion, @roy-tong! Keeping estimated and actual cost separate, and keeping provider, model and token usage on each chat, are now part of this story's acceptance criteria.


    Generated by Claude Code

  5. added 2 commits that reference this issue on Nov 26, 2026
  6. roy-tong commented on Dec 1, 2026

    @roy-tong

    Keeping estimate and actual separate is the right call. The test should assert that a retry or fallback keeps the same chat id while changing the actual cost, otherwise the estimate looks accurate by accident. Is that in the acceptance criteria?

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

    area: ai-agentsarea: idestream: ai-agentstfmuser-story

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions