fix(#4): remove dead total_cost_usd field; map model enums to readable names

This commit is contained in:
Nikketryhard
2026-02-14 15:54:03 -06:00
parent dd7b12a97d
commit 2ccc4b46f8
4 changed files with 54 additions and 20 deletions

View File

@@ -126,7 +126,6 @@ impl StreamingAccumulator {
cache_read_input_tokens: self.cache_read_input_tokens,
thinking_output_tokens: 0,
response_output_tokens: 0,
total_cost_usd: None,
model: self.model,
stop_reason: self.stop_reason,
api_provider: Some("anthropic".to_string()),
@@ -150,7 +149,6 @@ fn extract_usage_from_message(msg: &Value) -> Option<ApiUsage> {
cache_read_input_tokens: usage["cache_read_input_tokens"].as_u64().unwrap_or(0),
thinking_output_tokens: 0,
response_output_tokens: 0,
total_cost_usd: None,
model: msg["model"].as_str().map(|s| s.to_string()),
stop_reason: msg["stop_reason"].as_str().map(|s| s.to_string()),
api_provider: Some("anthropic".to_string()),