Skip to content

Output token count is highly inaccurate. #705

@maxandrews

Description

@maxandrews

Anthropic changed the way output tokens are treated in the logs. Neither thinking tokens nor tool use tokens are being correctly counted.

You need to use a more complex method to reconstruct accurate output tokens from the other values.

See this example from writing a fairly long markdown file:

Image Image

This is 8836 output tokens, not 13!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions