()
| 879 | |
| 880 | #[test] |
| 881 | fn test_anthropic_build_request_with_system() { |
| 882 | let client = |
| 883 | AnthropicClient::new("key".to_string(), "claude-sonnet-4-20250514".to_string()); |
| 884 | let msgs = vec![Message::user("Hello")]; |
| 885 | let req = client.build_request(&msgs, Some("You are helpful"), &[]); |
| 886 | |
| 887 | // System is now an array with cache_control for prompt caching |
| 888 | let system = req["system"].as_array().unwrap(); |
| 889 | assert_eq!(system[0]["text"], "You are helpful"); |
| 890 | assert_eq!(system[0]["cache_control"]["type"], "ephemeral"); |
| 891 | } |
| 892 | |
| 893 | #[test] |
| 894 | fn test_anthropic_build_request_with_tools() { |
nothing calls this directly
no test coverage detected