()
| 791 | |
| 792 | #[test] |
| 793 | fn test_llm_cost_record_with_session() { |
| 794 | let record = LlmCostRecord { |
| 795 | model: "gpt-4o".to_string(), |
| 796 | provider: "openai".to_string(), |
| 797 | prompt_tokens: 500, |
| 798 | completion_tokens: 200, |
| 799 | total_tokens: 700, |
| 800 | cost_usd: Some(0.003), |
| 801 | timestamp: chrono::Utc::now(), |
| 802 | session_id: Some("session-abc".to_string()), |
| 803 | }; |
| 804 | assert_eq!(record.session_id, Some("session-abc".to_string())); |
| 805 | } |
| 806 | |
| 807 | #[test] |
| 808 | fn test_llm_cost_record_without_session() { |