()
| 806 | |
| 807 | #[test] |
| 808 | fn test_llm_cost_record_without_session() { |
| 809 | let record = LlmCostRecord { |
| 810 | model: "gpt-4o-mini".to_string(), |
| 811 | provider: "openai".to_string(), |
| 812 | prompt_tokens: 100, |
| 813 | completion_tokens: 50, |
| 814 | total_tokens: 150, |
| 815 | cost_usd: Some(0.00006), |
| 816 | timestamp: chrono::Utc::now(), |
| 817 | session_id: None, |
| 818 | }; |
| 819 | assert!(record.session_id.is_none()); |
| 820 | } |
| 821 | |
| 822 | #[test] |
| 823 | fn test_llm_cost_record_serialization() { |