feat: 成本效率跟踪基础设施 #31
No reviewers
Labels
No Label
priority:P0
priority:P1
priority:P2
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: solahqb/AgentEvalTool#31
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/cost-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
新增成本跟踪模块,为对话级和任务级成本计算提供基础设施。
Changes
prompt_tokens、completion_tokens、total_tokens字段parse_usage()提取 token 使用量ModelPricing:模型定价配置TokenUsage:token 使用量聚合CostBreakdown:成本明细calculate_cost():根据 token 使用量和定价计算费用calculate_turn_cost()、calculate_case_cost()、calculate_run_cost()Note
引擎集成(实际捕获 API 调用的 token 使用量)留待后续实现。本 PR 提供成本计算的基础设施。
Test plan
Closes #25