From ea25d438d1c8945a1acc00f8a213a42c3655275b Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 30 Aug 2024 12:22:47 -0400 Subject: [PATCH] anthropic: Remove `cache_control` field from `ResponseContent` (#17165) This PR removes the `cache_control` field from the variants in `ResponseContent`. This field is used on requests to control the caching behavior, but is not needed on content in the response. Release Notes: - N/A --- crates/anthropic/src/anthropic.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/anthropic/src/anthropic.rs b/crates/anthropic/src/anthropic.rs index cb41d9cf1ac8f02e27b4c2c0ad593096dbaa17dc..4c7e6495e0e2fdb442d485ea2918b3a825dce147 100644 --- a/crates/anthropic/src/anthropic.rs +++ b/crates/anthropic/src/anthropic.rs @@ -450,18 +450,12 @@ pub enum RequestContent { #[serde(tag = "type")] pub enum ResponseContent { #[serde(rename = "text")] - Text { - text: String, - #[serde(skip_serializing_if = "Option::is_none")] - cache_control: Option, - }, + Text { text: String }, #[serde(rename = "tool_use")] ToolUse { id: String, name: String, input: serde_json::Value, - #[serde(skip_serializing_if = "Option::is_none")] - cache_control: Option, }, }