mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(anthropic): pass explicit api_key where passthrough env validation now raises
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e14f485827
commit
0fc042e376
2 changed files with 3 additions and 0 deletions
|
|
@ -1050,6 +1050,7 @@ def test_anthropic_messages_validate_adds_beta_header():
|
|||
messages=[{"role": "user", "content": [{"type": "text", "text": "Hi"}]}],
|
||||
optional_params={"context_management": _sample_context_management_payload()},
|
||||
litellm_params={},
|
||||
api_key="fake-anthropic-key",
|
||||
)
|
||||
assert headers["anthropic-beta"] == "context-management-2025-06-27"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ def test_messages_drop_params_strips_speed_for_unsupported_models():
|
|||
messages=[{"role": "user", "content": "Hello"}],
|
||||
optional_params=dict(optional_params),
|
||||
litellm_params={},
|
||||
api_key="fake-anthropic-key",
|
||||
)
|
||||
result = config.transform_anthropic_messages_request(
|
||||
model="claude-sonnet-4-6",
|
||||
|
|
@ -60,6 +61,7 @@ def test_messages_drop_params_keeps_speed_for_supporting_models():
|
|||
messages=[{"role": "user", "content": "Hello"}],
|
||||
optional_params=dict(optional_params),
|
||||
litellm_params={},
|
||||
api_key="fake-anthropic-key",
|
||||
)
|
||||
result = config.transform_anthropic_messages_request(
|
||||
model="claude-opus-4-6",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue