()
| 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() { |