fix(#4): remove dead total_cost_usd field; map model enums to readable names
This commit is contained in:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user