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
Add supports_pdf_input: true to Claude 3.7 bedrock models (#9917)
Ruperto A. Martinez298a3574f4ce
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex fcaf71c60c0..904e2bda8b2 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -354,6 +354,7 @@ project = Noneconfig_path = Nonevertex_ai_safety_settings: Optional[dict] = NoneBEDROCK_CONVERSE_MODELS = [+ "anthropic.claude-3-7-sonnet-20250219-v1:0","anthropic.claude-3-5-haiku-20241022-v1:0","anthropic.claude-3-5-sonnet-20241022-v2:0","anthropic.claude-3-5-sonnet-20240620-v1:0",diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 21cb055669a..bf958815b93 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -8738,6 +8738,7 @@"supports_assistant_prefill": true,"supports_prompt_caching": true,"supports_response_schema": true,+ "supports_pdf_input": true,"supports_reasoning": true,"supports_tool_choice": true},@@ -8856,6 +8857,7 @@"supports_assistant_prefill": true,"supports_prompt_caching": true,"supports_response_schema": true,+ "supports_pdf_input": true,"supports_tool_choice": true,"supports_reasoning": true},diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 21cb055669a..bf958815b93 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -8738,6 +8738,7 @@"supports_assistant_prefill": true,"supports_prompt_caching": true,"supports_response_schema": true,+ "supports_pdf_input": true,"supports_reasoning": true,"supports_tool_choice": true},@@ -8856,6 +8857,7 @@"supports_assistant_prefill": true,"supports_prompt_caching": true,"supports_response_schema": true,+ "supports_pdf_input": true,"supports_tool_choice": true,"supports_reasoning": true},diff --git a/tests/litellm_utils_tests/test_utils.py b/tests/litellm_utils_tests/test_utils.pyindex 1c0e123ea74..398b69067a1 100644--- a/tests/litellm_utils_tests/test_utils.py+++ b/tests/litellm_utils_tests/test_utils.py@@ -2127,6 +2127,20 @@ def test_get_provider_audio_transcription_config():)+ "model, expected_bool",+ [+ ("anthropic.claude-3-7-sonnet-20250219-v1:0", True),+ ("us.anthropic.claude-3-7-sonnet-20250219-v1:0", True),+ ],+)++def test_claude_3_7_sonnet_supports_pdf_input(model, expected_bool):+ from litellm.utils import supports_pdf_input++ assert supports_pdf_input(model) == expected_bool++def test_get_valid_models_from_provider():"""Test that get_valid_models returns the correct models for a given provider@@ -2178,5 +2192,5 @@ def test_get_valid_models_from_dynamic_api_key():valid_models = get_valid_models(custom_llm_provider="anthropic", litellm_params=creds, check_provider_endpoint=True)assert len(valid_models) > 0assert "anthropic/claude-3-7-sonnet-20250219" in valid_models-+\ No newline at end of filediff --git a/tests/local_testing/whitelisted_bedrock_models.txt b/tests/local_testing/whitelisted_bedrock_models.txtindex 8ad500b4c55..c529fa0160d 100644--- a/tests/local_testing/whitelisted_bedrock_models.txt+++ b/tests/local_testing/whitelisted_bedrock_models.txt@@ -27,6 +27,7 @@ anthropic.claude-3-5-haiku-20241022-v1:0anthropic.claude-3-opus-20240229-v1:0us.anthropic.claude-3-sonnet-20240229-v1:0us.anthropic.claude-3-5-sonnet-20240620-v1:0+us.anthropic.claude-3-7-sonnet-20250219-v1:0us.anthropic.claude-3-5-sonnet-20241022-v2:0us.anthropic.claude-3-haiku-20240307-v1:0us.anthropic.claude-3-5-haiku-20241022-v1:0