File tree Expand file tree Collapse file tree 3 files changed +3
-144
lines changed
test_litellm/llms/vertex_ai Expand file tree Collapse file tree 3 files changed +3
-144
lines changed Original file line number Diff line number Diff line change @@ -107,10 +107,8 @@ def get_anthropic_headers(
107
107
user_anthropic_beta_headers : Optional [List [str ]] = None ,
108
108
) -> dict :
109
109
betas = set ()
110
- # Note: prompt-caching-2024-07-31 header is no longer required for prompt caching
111
- # as per current Anthropic documentation. It's now generally available.
112
- # if prompt_caching_set:
113
- # betas.add("prompt-caching-2024-07-31")
110
+ if prompt_caching_set :
111
+ betas .add ("prompt-caching-2024-07-31" )
114
112
if computer_tool_used :
115
113
betas .add ("computer-use-2024-10-22" )
116
114
# if pdf_used:
@@ -178,11 +176,6 @@ def validate_environment(
178
176
mcp_server_used = mcp_server_used ,
179
177
)
180
178
181
- # For Vertex AI requests, remove any user-provided anthropic-beta headers
182
- # since Vertex AI rejects them and they're no longer required for prompt caching
183
- if optional_params .get ("is_vertex_request" , False ):
184
- headers = {k : v for k , v in headers .items () if k != "anthropic-beta" }
185
-
186
179
headers = {** headers , ** anthropic_headers }
187
180
188
181
return headers
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
import litellm .litellm_core_utils .prompt_templates .factory
11
11
12
12
load_dotenv ()
13
- from unittest .mock import MagicMock , patch
13
+ from unittest .mock import MagicMock
14
14
15
15
sys .path .insert (
16
16
0 , os .path .abspath ("../.." )
You can’t perform that action at this time.
0 commit comments