mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Use CI_CD_DEFAULT_ANTHROPIC_MODEL env var in live anthropic CI tests
Replace hardcoded anthropic model names in the live-call CircleCI tests with the CI_CD_DEFAULT_ANTHROPIC_MODEL env var (falling back to the current default) so a model deprecation no longer requires a code change; the model can be updated from the CircleCI project settings instead. Only live-call sites are migrated. Tests that assert on a specific model (metadata lookups, dict conversion, route parsing) or that require a capability tied to a specific model (tool search needs Sonnet/Opus 4.5) are left pinned.
This commit is contained in:
parent
f047b1571e
commit
98741263d2
3 changed files with 8 additions and 4 deletions
|
|
@ -153,7 +153,7 @@ async def test_provider_budgets_e2e_test_expect_to_fail():
|
|||
|
||||
response = await router.acompletion(
|
||||
messages=[{"role": "user", "content": "Hello, how are you?"}],
|
||||
model="anthropic/claude-sonnet-4-5-20250929",
|
||||
model=f"anthropic/{os.environ.get('CI_CD_DEFAULT_ANTHROPIC_MODEL', 'claude-haiku-4-5-20251001')}",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ async def test_provider_budgets_e2e_test_expect_to_fail():
|
|||
with pytest.raises(Exception) as exc_info:
|
||||
response = await router.acompletion(
|
||||
messages=[{"role": "user", "content": "Hello, how are you?"}],
|
||||
model="anthropic/claude-sonnet-4-5-20250929",
|
||||
model=f"anthropic/{os.environ.get('CI_CD_DEFAULT_ANTHROPIC_MODEL', 'claude-haiku-4-5-20251001')}",
|
||||
)
|
||||
print(response)
|
||||
print("response.hidden_params", response._hidden_params)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
import httpx
|
||||
from openai import OpenAI, BadRequestError
|
||||
import pytest
|
||||
|
|
@ -124,7 +126,7 @@ def test_bad_request_bad_param_error():
|
|||
def test_anthropic_with_responses_api():
|
||||
client = get_test_client()
|
||||
response = client.responses.create(
|
||||
model="anthropic/claude-sonnet-4-5-20250929",
|
||||
model=f"anthropic/{os.environ.get('CI_CD_DEFAULT_ANTHROPIC_MODEL', 'claude-haiku-4-5-20251001')}",
|
||||
input="just respond with the word 'ping'",
|
||||
previous_response_id="hi",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
from base_anthropic_messages_test import BaseAnthropicMessagesTest
|
||||
import anthropic
|
||||
|
||||
|
|
@ -21,7 +23,7 @@ class TestAnthropicMessagesEndpoint(BaseAnthropicMessagesTest):
|
|||
def test_anthropic_messages_to_wildcard_model(self):
|
||||
client = self.get_client()
|
||||
response = client.messages.create(
|
||||
model="anthropic/claude-haiku-4-5-20251001",
|
||||
model=f"anthropic/{os.environ.get('CI_CD_DEFAULT_ANTHROPIC_MODEL', 'claude-haiku-4-5-20251001')}",
|
||||
messages=[{"role": "user", "content": "Hello, world!"}],
|
||||
max_tokens=100,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue