MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_llm_cost_record_with_cost

Function test_llm_cost_record_with_cost

core/src/telemetry.rs:763–775  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

761
762 #[test]
763 fn test_llm_cost_record_with_cost() {
764 let record = LlmCostRecord {
765 model: "claude-sonnet-4-20250514".to_string(),
766 provider: "anthropic".to_string(),
767 prompt_tokens: 1000,
768 completion_tokens: 500,
769 total_tokens: 1500,
770 cost_usd: Some(0.0105),
771 timestamp: chrono::Utc::now(),
772 session_id: Some("sess-123".to_string()),
773 };
774 assert_eq!(record.cost_usd, Some(0.0105));
775 }
776
777 #[test]
778 fn test_llm_cost_record_without_cost() {

Callers

nothing calls this directly

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected