Skip to content

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]

build(model_prices_and_context_window.json): mark all gemini-2.5 mode… (#11907)

Krish Dholakia40cc61c8f33c
diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.py
index 144cccfa4d0..bda19caec62 100644
--- a/litellm/llms/anthropic/chat/transformation.py
+++ b/litellm/llms/anthropic/chat/transformation.py
@@ -77,9 +77,9 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
to pass metadata to anthropic, it's {"user_id": "any-relevant-information"}
"""
- max_tokens: Optional[
- int
- ] = DEFAULT_ANTHROPIC_CHAT_MAX_TOKENS # anthropic requires a default value (Opus, Sonnet, and Haiku have the same default)
+ max_tokens: Optional[int] = (
+ DEFAULT_ANTHROPIC_CHAT_MAX_TOKENS # anthropic requires a default value (Opus, Sonnet, and Haiku have the same default)
+ )
stop_sequences: Optional[list] = None
temperature: Optional[int] = None
top_p: Optional[int] = None
@@ -104,11 +104,16 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
if key != "self" and value is not None:
setattr(self.__class__, key, value)
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "anthropic"
+
@classmethod
def get_config(cls):
return super().get_config()
def get_supported_openai_params(self, model: str):
+
params = [
"stream",
"stop",
@@ -447,11 +452,11 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
if mcp_servers:
optional_params["mcp_servers"] = mcp_servers
if param == "tool_choice" or param == "parallel_tool_calls":
- _tool_choice: Optional[
- AnthropicMessagesToolChoice
- ] = self._map_tool_choice(
- tool_choice=non_default_params.get("tool_choice"),
- parallel_tool_use=non_default_params.get("parallel_tool_calls"),
+ _tool_choice: Optional[AnthropicMessagesToolChoice] = (
+ self._map_tool_choice(
+ tool_choice=non_default_params.get("tool_choice"),
+ parallel_tool_use=non_default_params.get("parallel_tool_calls"),
+ )
)
if _tool_choice is not None:
@@ -557,9 +562,9 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
text=system_message_block["content"],
)
if "cache_control" in system_message_block:
- anthropic_system_message_content[
- "cache_control"
- ] = system_message_block["cache_control"]
+ anthropic_system_message_content["cache_control"] = (
+ system_message_block["cache_control"]
+ )
anthropic_system_message_list.append(
anthropic_system_message_content
)
@@ -573,9 +578,9 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
)
)
if "cache_control" in _content:
- anthropic_system_message_content[
- "cache_control"
- ] = _content["cache_control"]
+ anthropic_system_message_content["cache_control"] = (
+ _content["cache_control"]
+ )
anthropic_system_message_list.append(
anthropic_system_message_content
@@ -735,9 +740,7 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
)
return _message
- def extract_response_content(
- self, completion_response: dict
- ) -> Tuple[
+ def extract_response_content(self, completion_response: dict) -> Tuple[
str,
Optional[List[Any]],
Optional[
diff --git a/litellm/llms/base_llm/chat/transformation.py b/litellm/llms/base_llm/chat/transformation.py
index a6d79d53b1a..0f19de61700 100644
--- a/litellm/llms/base_llm/chat/transformation.py
+++ b/litellm/llms/base_llm/chat/transformation.py
@@ -97,6 +97,7 @@ class BaseConfig(ABC):
types.BuiltinFunctionType,
classmethod,
staticmethod,
+ property,
),
)
and v is not None
diff --git a/litellm/llms/bedrock/chat/invoke_transformations/anthropic_claude3_transformation.py b/litellm/llms/bedrock/chat/invoke_transformations/anthropic_claude3_transformation.py
index 0cac339a3cf..738490aa7bb 100644
--- a/litellm/llms/bedrock/chat/invoke_transformations/anthropic_claude3_transformation.py
+++ b/litellm/llms/bedrock/chat/invoke_transformations/anthropic_claude3_transformation.py
@@ -28,6 +28,10 @@ class AmazonAnthropicClaude3Config(AmazonInvokeConfig, AnthropicConfig):
anthropic_version: str = "bedrock-2023-05-31"
+ @property
+ def custom_llm_provider(self) -> Optional[str]:
+ return "bedrock"
+
def get_supported_openai_params(self, model: str) -> List[str]:
return AnthropicConfig.get_supported_openai_params(self, model)
diff --git a/litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py
index 5f0fdfd058c..7ba788e335c 100644
--- a/litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py
+++ b/litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py
@@ -46,6 +46,7 @@ class VertexAIAnthropicConfig(AnthropicConfig):
Note: Please make sure to modify the default parameters as required for your use case.
"""
+
@property
def custom_llm_provider(self) -> Optional[str]:
return "vertex_ai"
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 486b6e85571..a980de69d55 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -451,9 +451,9 @@
"max_input_tokens": 128000,
"max_output_tokens": 16384,
"input_cost_per_token": 2.5e-06,
- "input_cost_per_audio_token": 4.0e-5,
+ "input_cost_per_audio_token": 4e-05,
"output_cost_per_token": 1e-05,
- "output_cost_per_audio_token": 8.0e-5,
+ "output_cost_per_audio_token": 8e-05,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -594,7 +594,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 1.5e-06,
"output_cost_per_token": 6e-06,
- "cache_read_input_token_cost": 0.375e-06,
+ "cache_read_input_token_cost": 3.75e-07,
"litellm_provider": "openai",
"mode": "responses",
"supports_pdf_input": true,
@@ -744,10 +744,10 @@
"max_tokens": 100000,
"max_input_tokens": 200000,
"max_output_tokens": 100000,
- "input_cost_per_token": 20e-06,
- "input_cost_per_token_batches": 10e-06,
- "output_cost_per_token_batches": 40e-06,
- "output_cost_per_token": 80e-06,
+ "input_cost_per_token": 2e-05,
+ "input_cost_per_token_batches": 1e-05,
+ "output_cost_per_token_batches": 4e-05,
+ "output_cost_per_token": 8e-05,
"litellm_provider": "openai",
"mode": "responses",
"supports_function_calling": true,
@@ -774,10 +774,10 @@
"max_tokens": 100000,
"max_input_tokens": 200000,
"max_output_tokens": 100000,
- "input_cost_per_token": 20e-06,
- "input_cost_per_token_batches": 10e-06,
- "output_cost_per_token_batches": 40e-06,
- "output_cost_per_token": 80e-06,
+ "input_cost_per_token": 2e-05,
+ "input_cost_per_token_batches": 1e-05,
+ "output_cost_per_token_batches": 4e-05,
+ "output_cost_per_token": 8e-05,
"litellm_provider": "openai",
"mode": "responses",
"supports_function_calling": true,
@@ -806,7 +806,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 2e-06,
"output_cost_per_token": 8e-06,
- "cache_read_input_token_cost": 0.5e-06,
+ "cache_read_input_token_cost": 5e-07,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -837,7 +837,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 2e-06,
"output_cost_per_token": 8e-06,
- "cache_read_input_token_cost": 0.5e-06,
+ "cache_read_input_token_cost": 5e-07,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -2685,7 +2685,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 1.5e-06,
"output_cost_per_token": 6e-06,
- "cache_read_input_token_cost": 0.375e-06,
+ "cache_read_input_token_cost": 3.75e-07,
"litellm_provider": "azure",
"mode": "responses",
"supports_pdf_input": true,
@@ -4295,8 +4295,8 @@
"max_tokens": 40000,
"max_input_tokens": 40000,
"max_output_tokens": 40000,
- "input_cost_per_token": 0.5e-6,
- "output_cost_per_token": 1.5e-6,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 1.5e-06,
"litellm_provider": "mistral",
"mode": "chat",
"source": "https://mistral.ai/pricing#api-pricing",
@@ -4309,7 +4309,7 @@
"max_tokens": 40000,
"max_input_tokens": 40000,
"max_output_tokens": 40000,
- "input_cost_per_token": 0.5e-06,
+ "input_cost_per_token": 5e-07,
"output_cost_per_token": 1.5e-06,
"litellm_provider": "mistral",
"mode": "chat",
@@ -4579,9 +4579,9 @@
"output_cost_per_token": 4e-06,
"litellm_provider": "xai",
"mode": "chat",
+ "supports_reasoning": true,
"supports_function_calling": true,
"supports_tool_choice": true,
- "supports_reasoning": true,
"supports_response_schema": false,
"source": "https://x.ai/api#pricing",
"supports_web_search": true
@@ -4616,21 +4616,6 @@
"source": "https://x.ai/api#pricing",
"supports_web_search": true
},
- "xai/grok-3-mini-fast-latest": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 6e-07,
- "output_cost_per_token": 4e-06,
- "litellm_provider": "xai",
- "mode": "chat",
- "supports_reasoning": true,
- "supports_function_calling": true,
- "supports_tool_choice": true,
- "supports_response_schema": false,
- "source": "https://x.ai/api#pricing",
- "supports_web_search": true
- },
"xai/grok-vision-beta": {
"max_tokens": 8192,
"max_input_tokens": 8192,
@@ -6803,7 +6788,8 @@
"supports_web_search": true,
"supports_url_context": true,
"tpm": 8000000,
- "rpm": 100000
+ "rpm": 100000,
+ "supports_pdf_input": true
},
"gemini-2.5-flash": {
"max_tokens": 65535,
@@ -6845,7 +6831,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-preview-tts": {
"max_tokens": 65535,
@@ -6925,7 +6912,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-preview-04-17": {
"max_tokens": 65535,
@@ -6966,7 +6954,51 @@
"text"
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
+ },
+ "gemini/gemini-2.5-flash-lite-preview-06-17": {
+ "max_tokens": 65535,
+ "max_input_tokens": 1048576,
+ "max_output_tokens": 65535,
+ "max_images_per_prompt": 3000,
+ "max_videos_per_prompt": 10,
+ "max_video_length": 1,
+ "max_audio_length_hours": 8.4,
+ "max_audio_per_prompt": 1,
+ "max_pdf_size_mb": 30,
+ "input_cost_per_audio_token": 5e-07,
+ "input_cost_per_token": 1e-07,
+ "output_cost_per_token": 4e-07,
+ "output_cost_per_reasoning_token": 4e-07,
+ "litellm_provider": "gemini",
+ "mode": "chat",
+ "supports_reasoning": true,
+ "supports_system_messages": true,
+ "supports_function_calling": true,
+ "supports_vision": true,
+ "supports_response_schema": true,
+ "supports_audio_output": false,
+ "supports_tool_choice": true,
+ "supported_endpoints": [
+ "/v1/chat/completions",
+ "/v1/completions",
+ "/v1/batch"
+ ],
+ "supported_modalities": [
+ "text",
+ "image",
+ "audio",
+ "video"
+ ],
+ "supported_output_modalities": [
+ "text"
+ ],
+ "source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-lite",
+ "supports_parallel_function_calling": true,
+ "supports_web_search": true,
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-lite-preview-06-17": {
"max_tokens": 65535,
@@ -7052,7 +7084,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini-2.5-flash-preview-04-17": {
"max_tokens": 65535,
@@ -7093,7 +7126,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-flash-lite-preview-06-17": {
"max_tokens": 65535,
@@ -7135,7 +7169,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini-2.0-flash": {
"max_tokens": 8192,
@@ -7281,7 +7316,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-pro-preview-05-06": {
"max_tokens": 65535,
@@ -7326,7 +7362,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-pro-preview-03-25": {
"max_tokens": 65535,
@@ -7368,7 +7405,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.0-flash-preview-image-generation": {
"max_tokens": 8192,
@@ -7693,7 +7731,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-pro-preview-05-06": {
"max_tokens": 65535,
@@ -7731,7 +7770,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-pro-preview-03-25": {
"max_tokens": 65535,
@@ -7768,7 +7808,8 @@
"text"
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.0-flash-exp": {
"max_tokens": 8192,
@@ -8606,13 +8647,13 @@
"litellm_provider": "vertex_ai-image-models",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
+ },
"vertex_ai/imagen-4.0-fast-generate-preview-06-06": {
"output_cost_per_image": 0.02,
"litellm_provider": "vertex_ai-image-models",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
+ },
"vertex_ai/imagen-3.0-generate-002": {
"output_cost_per_image": 0.04,
"litellm_provider": "vertex_ai-image-models",
@@ -14941,7 +14982,7 @@
},
"deepgram/nova-3": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14955,7 +14996,7 @@
},
"deepgram/nova-3-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14969,7 +15010,7 @@
},
"deepgram/nova-3-medical": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00008667,
+ "input_cost_per_second": 8.667e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14983,7 +15024,7 @@
},
"deepgram/nova-2": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14997,7 +15038,7 @@
},
"deepgram/nova-2-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15011,7 +15052,7 @@
},
"deepgram/nova-2-meeting": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15025,7 +15066,7 @@
},
"deepgram/nova-2-phonecall": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15039,7 +15080,7 @@
},
"deepgram/nova-2-voicemail": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15053,7 +15094,7 @@
},
"deepgram/nova-2-finance": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15067,7 +15108,7 @@
},
"deepgram/nova-2-conversationalai": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15081,7 +15122,7 @@
},
"deepgram/nova-2-video": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15095,7 +15136,7 @@
},
"deepgram/nova-2-drivethru": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15109,7 +15150,7 @@
},
"deepgram/nova-2-automotive": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15123,7 +15164,7 @@
},
"deepgram/nova-2-atc": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15137,7 +15178,7 @@
},
"deepgram/nova": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15151,7 +15192,7 @@
},
"deepgram/nova-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15165,7 +15206,7 @@
},
"deepgram/nova-phonecall": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15437,4 +15478,4 @@
"notes": "Deepgram's hosted OpenAI Whisper models - pricing may differ from native Deepgram models"
}
}
-}
+}
\ No newline at end of file
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 486b6e85571..47e090016d9 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -451,9 +451,9 @@
"max_input_tokens": 128000,
"max_output_tokens": 16384,
"input_cost_per_token": 2.5e-06,
- "input_cost_per_audio_token": 4.0e-5,
+ "input_cost_per_audio_token": 4e-05,
"output_cost_per_token": 1e-05,
- "output_cost_per_audio_token": 8.0e-5,
+ "output_cost_per_audio_token": 8e-05,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -594,7 +594,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 1.5e-06,
"output_cost_per_token": 6e-06,
- "cache_read_input_token_cost": 0.375e-06,
+ "cache_read_input_token_cost": 3.75e-07,
"litellm_provider": "openai",
"mode": "responses",
"supports_pdf_input": true,
@@ -744,10 +744,10 @@
"max_tokens": 100000,
"max_input_tokens": 200000,
"max_output_tokens": 100000,
- "input_cost_per_token": 20e-06,
- "input_cost_per_token_batches": 10e-06,
- "output_cost_per_token_batches": 40e-06,
- "output_cost_per_token": 80e-06,
+ "input_cost_per_token": 2e-05,
+ "input_cost_per_token_batches": 1e-05,
+ "output_cost_per_token_batches": 4e-05,
+ "output_cost_per_token": 8e-05,
"litellm_provider": "openai",
"mode": "responses",
"supports_function_calling": true,
@@ -774,10 +774,10 @@
"max_tokens": 100000,
"max_input_tokens": 200000,
"max_output_tokens": 100000,
- "input_cost_per_token": 20e-06,
- "input_cost_per_token_batches": 10e-06,
- "output_cost_per_token_batches": 40e-06,
- "output_cost_per_token": 80e-06,
+ "input_cost_per_token": 2e-05,
+ "input_cost_per_token_batches": 1e-05,
+ "output_cost_per_token_batches": 4e-05,
+ "output_cost_per_token": 8e-05,
"litellm_provider": "openai",
"mode": "responses",
"supports_function_calling": true,
@@ -806,7 +806,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 2e-06,
"output_cost_per_token": 8e-06,
- "cache_read_input_token_cost": 0.5e-06,
+ "cache_read_input_token_cost": 5e-07,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -837,7 +837,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 2e-06,
"output_cost_per_token": 8e-06,
- "cache_read_input_token_cost": 0.5e-06,
+ "cache_read_input_token_cost": 5e-07,
"litellm_provider": "openai",
"mode": "chat",
"supports_function_calling": true,
@@ -2685,7 +2685,7 @@
"max_output_tokens": 100000,
"input_cost_per_token": 1.5e-06,
"output_cost_per_token": 6e-06,
- "cache_read_input_token_cost": 0.375e-06,
+ "cache_read_input_token_cost": 3.75e-07,
"litellm_provider": "azure",
"mode": "responses",
"supports_pdf_input": true,
@@ -4295,8 +4295,8 @@
"max_tokens": 40000,
"max_input_tokens": 40000,
"max_output_tokens": 40000,
- "input_cost_per_token": 0.5e-6,
- "output_cost_per_token": 1.5e-6,
+ "input_cost_per_token": 5e-07,
+ "output_cost_per_token": 1.5e-06,
"litellm_provider": "mistral",
"mode": "chat",
"source": "https://mistral.ai/pricing#api-pricing",
@@ -4309,7 +4309,7 @@
"max_tokens": 40000,
"max_input_tokens": 40000,
"max_output_tokens": 40000,
- "input_cost_per_token": 0.5e-06,
+ "input_cost_per_token": 5e-07,
"output_cost_per_token": 1.5e-06,
"litellm_provider": "mistral",
"mode": "chat",
@@ -4579,9 +4579,9 @@
"output_cost_per_token": 4e-06,
"litellm_provider": "xai",
"mode": "chat",
+ "supports_reasoning": true,
"supports_function_calling": true,
"supports_tool_choice": true,
- "supports_reasoning": true,
"supports_response_schema": false,
"source": "https://x.ai/api#pricing",
"supports_web_search": true
@@ -4616,21 +4616,6 @@
"source": "https://x.ai/api#pricing",
"supports_web_search": true
},
- "xai/grok-3-mini-fast-latest": {
- "max_tokens": 131072,
- "max_input_tokens": 131072,
- "max_output_tokens": 131072,
- "input_cost_per_token": 6e-07,
- "output_cost_per_token": 4e-06,
- "litellm_provider": "xai",
- "mode": "chat",
- "supports_reasoning": true,
- "supports_function_calling": true,
- "supports_tool_choice": true,
- "supports_response_schema": false,
- "source": "https://x.ai/api#pricing",
- "supports_web_search": true
- },
"xai/grok-vision-beta": {
"max_tokens": 8192,
"max_input_tokens": 8192,
@@ -6803,7 +6788,8 @@
"supports_web_search": true,
"supports_url_context": true,
"tpm": 8000000,
- "rpm": 100000
+ "rpm": 100000,
+ "supports_pdf_input": true
},
"gemini-2.5-flash": {
"max_tokens": 65535,
@@ -6845,7 +6831,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-preview-tts": {
"max_tokens": 65535,
@@ -6925,7 +6912,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-preview-04-17": {
"max_tokens": 65535,
@@ -6966,7 +6954,8 @@
"text"
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-flash-lite-preview-06-17": {
"max_tokens": 65535,
@@ -7010,7 +6999,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-lite",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini-2.5-flash-preview-05-20": {
"max_tokens": 65535,
@@ -7052,7 +7042,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini-2.5-flash-preview-04-17": {
"max_tokens": 65535,
@@ -7093,7 +7084,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-flash-lite-preview-06-17": {
"max_tokens": 65535,
@@ -7135,7 +7127,8 @@
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini-2.0-flash": {
"max_tokens": 8192,
@@ -7281,7 +7274,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-pro-preview-05-06": {
"max_tokens": 65535,
@@ -7326,7 +7320,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.5-pro-preview-03-25": {
"max_tokens": 65535,
@@ -7368,7 +7363,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview",
"supports_parallel_function_calling": true,
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini-2.0-flash-preview-image-generation": {
"max_tokens": 8192,
@@ -7693,7 +7689,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-pro-preview-05-06": {
"max_tokens": 65535,
@@ -7731,7 +7728,8 @@
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
"supports_web_search": true,
- "supports_url_context": true
+ "supports_url_context": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.5-pro-preview-03-25": {
"max_tokens": 65535,
@@ -7768,7 +7766,8 @@
"text"
],
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro-preview",
- "supports_web_search": true
+ "supports_web_search": true,
+ "supports_pdf_input": true
},
"gemini/gemini-2.0-flash-exp": {
"max_tokens": 8192,
@@ -8606,13 +8605,13 @@
"litellm_provider": "vertex_ai-image-models",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
+ },
"vertex_ai/imagen-4.0-fast-generate-preview-06-06": {
"output_cost_per_image": 0.02,
"litellm_provider": "vertex_ai-image-models",
"mode": "image_generation",
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing"
- },
+ },
"vertex_ai/imagen-3.0-generate-002": {
"output_cost_per_image": 0.04,
"litellm_provider": "vertex_ai-image-models",
@@ -14941,7 +14940,7 @@
},
"deepgram/nova-3": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14955,7 +14954,7 @@
},
"deepgram/nova-3-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14969,7 +14968,7 @@
},
"deepgram/nova-3-medical": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00008667,
+ "input_cost_per_second": 8.667e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14983,7 +14982,7 @@
},
"deepgram/nova-2": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -14997,7 +14996,7 @@
},
"deepgram/nova-2-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15011,7 +15010,7 @@
},
"deepgram/nova-2-meeting": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15025,7 +15024,7 @@
},
"deepgram/nova-2-phonecall": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15039,7 +15038,7 @@
},
"deepgram/nova-2-voicemail": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15053,7 +15052,7 @@
},
"deepgram/nova-2-finance": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15067,7 +15066,7 @@
},
"deepgram/nova-2-conversationalai": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15081,7 +15080,7 @@
},
"deepgram/nova-2-video": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15095,7 +15094,7 @@
},
"deepgram/nova-2-drivethru": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15109,7 +15108,7 @@
},
"deepgram/nova-2-automotive": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15123,7 +15122,7 @@
},
"deepgram/nova-2-atc": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15137,7 +15136,7 @@
},
"deepgram/nova": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15151,7 +15150,7 @@
},
"deepgram/nova-general": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15165,7 +15164,7 @@
},
"deepgram/nova-phonecall": {
"mode": "audio_transcription",
- "input_cost_per_second": 0.00007167,
+ "input_cost_per_second": 7.167e-05,
"output_cost_per_second": 0.0,
"litellm_provider": "deepgram",
"supported_endpoints": [
@@ -15437,4 +15436,4 @@
"notes": "Deepgram's hosted OpenAI Whisper models - pricing may differ from native Deepgram models"
}
}
-}
+}
\ No newline at end of file
diff --git a/test_script.py b/test_script.py
index 8458b95de38..0dce4b62563 100644
--- a/test_script.py
+++ b/test_script.py
@@ -4,10 +4,21 @@ import json
gemini_model_cost_map = json.load(open("model_prices_and_context_window.json"))
for model, model_info in gemini_model_cost_map.items():
- if model_info.get("litellm_provider") == "gemini" and model_info.get("mode") == "chat" and "gemini-2" in model:
+ if (
+ (
+ model_info.get("litellm_provider") == "gemini"
+ or model_info.get("litellm_provider") == "vertex_ai-language-models"
+ )
+ and model_info.get("mode") == "chat"
+ and ("gemini-2.5" in model and "tts" not in model)
+ and model_info.get("supports_pdf_input") is None
+ ):
"""
- Update all gemini chat models to support web search
+ Update all gemini chat models to support pdf input
"""
- model_info["supports_web_search"] = True
+ model_info["supports_pdf_input"] = True
+ print(f"Updated {model} to support pdf input")
-json.dump(gemini_model_cost_map, open("model_prices_and_context_window.json", "w"), indent=4)
\ No newline at end of file
+json.dump(
+ gemini_model_cost_map, open("model_prices_and_context_window.json", "w"), indent=4
+)
diff --git a/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py b/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py
index 58b1243d3ae..34097669699 100644
--- a/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py
+++ b/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py
@@ -218,6 +218,7 @@ def test_map_tool_choice():
assert result["type"] == "none"
print(result)
+
def test_transform_response_with_prefix_prompt():
import httpx
@@ -262,3 +263,8 @@ def test_transform_response_with_prefix_prompt():
== "You are a helpful assistant. The grass is green."
)
+
+def test_get_supported_params_thinking():
+ config = AnthropicConfig()
+ params = config.get_supported_openai_params(model="claude-sonnet-4-20250514")
+ assert "thinking" in params
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.py
new file mode 100644
index 00000000000..3153b6fcda9
--- /dev/null
+++ b/tests/test_litellm/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py
@@ -0,0 +1,22 @@
+import asyncio
+import json
+import os
+import sys
+
+import pytest
+
+# Ensure the project root is on the import path so `litellm` can be imported when
+# tests are executed from any working directory.
+sys.path.insert(0, os.path.abspath("../../../../../.."))
+
+from litellm.llms.bedrock.chat.invoke_transformations.anthropic_claude3_transformation import (
+ AmazonAnthropicClaude3Config,
+)
+
+
+def test_get_supported_params_thinking():
+ config = AmazonAnthropicClaude3Config()
+ params = config.get_supported_openai_params(
+ model="anthropic.claude-sonnet-4-20250514-v1:0"
+ )
+ assert "thinking" in params
diff --git a/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py b/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py
index 3ea939397c0..4a65b692a49 100644
--- a/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py
+++ b/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py
@@ -1,5 +1,5 @@
-import sys
import os
+import sys
import pytest
@@ -14,15 +14,21 @@ from litellm.llms.vertex_ai.vertex_ai_partner_models.anthropic.transformation im
@pytest.mark.parametrize(
"model, expected_thinking",
[
- ("claude-sonnet-4@20250514", True),
+ ("claude-sonnet-4@20250514", True),
],
)
def test_vertex_ai_anthropic_thinking_param(model, expected_thinking):
supported_openai_params = VertexAIAnthropicConfig().get_supported_openai_params(
- model=model
- )
-
+ model=model
+ )
+
if expected_thinking:
assert "thinking" in supported_openai_params
else:
assert "thinking" not in supported_openai_params
+
+
+def test_get_supported_params_thinking():
+ config = VertexAIAnthropicConfig()
+ params = config.get_supported_openai_params(model="claude-sonnet-4")
+ assert "thinking" in params