The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Refactor Anthropic Configurations in Tests
Jugal Bhattc2310bcccc94
diff --git a/tests/test_litellm/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py b/tests/test_litellm/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.pyindex 3153b6fcda9..e6486ae9677 100644--- a/tests/test_litellm/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py+++ b/tests/test_litellm/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py@@ -10,12 +10,12 @@ import pytestsys.path.insert(0, os.path.abspath("../../../../../.."))from litellm.llms.bedrock.chat.invoke_transformations.anthropic_claude3_transformation import (- AmazonAnthropicClaude3Config,+ AmazonAnthropicClaudeConfig,)def test_get_supported_params_thinking():- config = AmazonAnthropicClaude3Config()+ config = AmazonAnthropicClaudeConfig()params = config.get_supported_openai_params(model="anthropic.claude-sonnet-4-20250514-v1:0")diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.pyindex 16d81f72d4a..0d648da2f62 100644--- a/tests/test_litellm/test_utils.py+++ b/tests/test_litellm/test_utils.py@@ -237,16 +237,16 @@ def test_all_model_configs():drop_params=False,) == {"max_tokens": 10}- from litellm import AmazonAnthropicClaude3Config, AmazonAnthropicConfig+ from litellm import AmazonAnthropicClaudeConfig, AmazonAnthropicConfigassert ("max_completion_tokens"- in AmazonAnthropicClaude3Config().get_supported_openai_params(+ in AmazonAnthropicClaudeConfig().get_supported_openai_params(model="anthropic.claude-3-sonnet-20240229-v1:0"))- assert AmazonAnthropicClaude3Config().map_openai_params(+ assert AmazonAnthropicClaudeConfig().map_openai_params(non_default_params={"max_completion_tokens": 10},optional_params={},model="anthropic.claude-3-sonnet-20240229-v1:0",@@ -2234,7 +2234,7 @@ def test_reasoning_content_preserved_in_text_completion_wrapper():def test_anthropic_claude_4_invoke_chat_provider_config():"""Test that the Anthropic Claude 4 Invoke chat provider config is correct."""from litellm.llms.bedrock.chat.invoke_transformations.anthropic_claude3_transformation import (- AmazonAnthropicClaude3Config,+ AmazonAnthropicClaudeConfig,)from litellm.utils import ProviderConfigManager@@ -2243,7 +2243,7 @@ def test_anthropic_claude_4_invoke_chat_provider_config():provider=LlmProviders.BEDROCK,)print(config)- assert isinstance(config, AmazonAnthropicClaude3Config)+ assert isinstance(config, AmazonAnthropicClaudeConfig)def test_bedrock_application_inference_profile():