Skip to content

Cost tracking shows $0.00 for some completed jobs #43

@mriechers

Description

@mriechers

Bug

Several jobs that completed all phases show actual_cost = 0.0, while similar jobs show accurate costs. This suggests the Langfuse cost tracking integration is inconsistent.

Examples

Job File Phases Cost Notes
1 2SOS2026HD.srt (74 min) All + timestamp $0.0239 Suspiciously low for a long transcript
4 9SOT2026HD.srt All + timestamp $0.5153 Reasonable
17 TLB_QWERTY.txt All $0.0000 Zero despite completion
18 test_transcript.txt All $0.0000 Zero despite completion

Possible Causes

  • Langfuse callback not firing for certain tier/model combinations
  • Cost not being aggregated back to the job record after phase completion
  • Race condition between phase completion and cost write-back
  • Tier 0 ("cheapskate") models may not have pricing configured in Langfuse

Location

Cost tracking in api/services/llm.py and aggregation in api/services/worker.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-discoveredDiscovered by an AI agent during workpriority: lowEnhancement, nice-to-havetype: bugSomething is not working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions