Skip to content

Inaccurate calculation due to claude launching from Ollama #199

@wellisrite

Description

@wellisrite

Description:
A discrepancy in token and cost calculations occurs when Claude is launched via Ollama. It appears the monitor misinterprets session
data or token counts in this specific execution environment, leading to inaccurate real-time analytics.

Steps to Reproduce:

  1. Configure Claude to launch through an Ollama instance (e.g., via a proxy or MCP bridge).
  2. Initiate a claude-code session and perform standard coding tasks.
  3. Monitor the output in Claude-Code-Usage-Monitor.

Current Behavior:
The monitor displays incorrect input/output token counts and total session costs that do not align with actual usage.

Expected Behavior:
Usage metrics should accurately reflect the tokens consumed by the Claude model, maintaining consistency with the official Anthropic
API usage regardless of the launch method.

Environment:

  • OS: Linux
  • Claude-Code-Usage-Monitor Version: claude-monitor 3.1.0

Evidence:
The following screenshot highlights the calculation error:
!Inaccurate Calculation Image

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