pub fn anthropic_request(model: &str, usage: &Value) -> EconomicsRequestExpand description
Read an Anthropic usage object into a request, native field names kept.
use majordomus_cli::economics::usage::anthropic_request;
let r = anthropic_request("m", &serde_json::json!({
"input_tokens": 2, "cache_creation_input_tokens": 10, "cache_read_input_tokens": 90,
"output_tokens": 5, "output_tokens_details": {"thinking_tokens": 3}
}));
assert_eq!((r.input_tokens, r.cache_read_input_tokens, r.thinking_tokens), (2, 90, Some(3)));