Skip to content

Report token usage in ContainerOutput #5

Closed

Description

@melvincarvalho

The API returns usage on every response but the loop discards it. Accumulate input/output tokens across loop iterations (including cache read/creation in the input count) and emit a usage field in the output JSON, so the jsclaw webchat can display per-turn token counts (jsclaw/jsclaw#39 companion).

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