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
Litellm dev 02 25 2025 p1 (#8816)
Krish Dholakiab8294755870a
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 5cb77d778ce..00e4bd0f0cb 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -2748,6 +2748,43 @@"deprecation_date": "2025-10-01","supports_tool_choice": true},+ "claude-3-5-haiku-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000001,+ "output_cost_per_token": 0.000005,+ "cache_creation_input_token_cost": 0.00000125,+ "cache_read_input_token_cost": 0.0000001,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "tool_use_system_prompt_tokens": 264,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-10-01",+ "supports_tool_choice": true+ },+ "claude-3-opus-latest": {+ "max_tokens": 4096,+ "max_input_tokens": 200000,+ "max_output_tokens": 4096,+ "input_cost_per_token": 0.000015,+ "output_cost_per_token": 0.000075,+ "cache_creation_input_token_cost": 0.00001875,+ "cache_read_input_token_cost": 0.0000015,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 395,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-03-01",+ "supports_tool_choice": true+ },"claude-3-opus-20240229": {"max_tokens": 4096,"max_input_tokens": 200000,@@ -2784,6 +2821,25 @@"deprecation_date": "2025-07-21","supports_tool_choice": true},+ "claude-3-5-sonnet-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "cache_creation_input_token_cost": 0.00000375,+ "cache_read_input_token_cost": 0.0000003,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 159,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-06-01",+ "supports_tool_choice": true+ },"claude-3-5-sonnet-20240620": {"max_tokens": 8192,"max_input_tokens": 200000,@@ -2803,6 +2859,25 @@"deprecation_date": "2025-06-01","supports_tool_choice": true},+ "claude-3-7-sonnet-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "cache_creation_input_token_cost": 0.00000375,+ "cache_read_input_token_cost": 0.0000003,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 159,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-06-01",+ "supports_tool_choice": true+ },"claude-3-7-sonnet-20250219": {"max_tokens": 8192,"max_input_tokens": 200000,@@ -6468,6 +6543,21 @@"supports_response_schema": true,"supports_tool_choice": true},+ "us.anthropic.claude-3-7-sonnet-20250219-v1:0": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "litellm_provider": "bedrock_converse",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "supports_tool_choice": true+ },"us.anthropic.claude-3-haiku-20240307-v1:0": {"max_tokens": 4096,"max_input_tokens": 200000,diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.htmldeleted file mode 100644index 679d843976e..00000000000--- a/litellm/proxy/_experimental/out/onboarding.html+++ /dev/null@@ -1 +0,0 @@-<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/ui/_next/static/chunks/webpack-75a5453f51d60261.js"/><script src="/ui/_next/static/chunks/fd9d1056-524b80e1a6b8bb06.js" async=""></script><script src="/ui/_next/static/chunks/117-883150efc583d711.js" async=""></script><script src="/ui/_next/static/chunks/main-app-475d6efe4080647d.js" async=""></script><title>LiteLLM Dashboard</title><meta name="description" content="LiteLLM Proxy Admin UI"/><link rel="icon" href="/ui/favicon.ico" type="image/x-icon" sizes="16x16"/><meta name="next-size-adjust"/><script src="/ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><script src="/ui/_next/static/chunks/webpack-75a5453f51d60261.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/ui/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/ui/_next/static/css/86f6cc749f6b8493.css\",\"style\"]\n3:HL[\"/ui/_next/static/css/2a6af5dc23d92a9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[12846,[],\"\"]\n6:I[19107,[],\"ClientPageRoot\"]\n7:I[12011,[\"665\",\"static/chunks/3014691f-0b72c78cfebbd712.js\",\"441\",\"static/chunks/441-79926bf2b9d89e04.js\",\"899\",\"static/chunks/899-354f59ecde307dfa.js\",\"250\",\"static/chunks/250-fd088aaa064b7d46.js\",\"461\",\"static/chunks/app/onboarding/page-801b31bb95fa3d1c.js\"],\"default\",1]\n8:I[4707,[],\"\"]\n9:I[36423,[],\"\"]\nb:I[61060,[],\"\"]\nc:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"Z74g7wOKfx1z1d_BuB0ip\",\"assetPrefix\":\"/ui\",\"urlParts\":[\"\",\"onboarding\"],\"initialTree\":[\"\",{\"children\":[\"onboarding\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"onboarding\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}],null],null],null]},[null,[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"onboarding\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ui/_next/static/css/86f6cc749f6b8493.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/ui/_next/static/css/2a6af5dc23d92a9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_cf7686\",\"children\":[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$La\"],\"globalErrorComponent\":\"$b\",\"missingSlots\":\"$Wc\"}]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"LiteLLM Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"LiteLLM Proxy Admin UI\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/ui/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"meta\",\"5\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>\ No newline at end of filediff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yamlindex fec1defa62e..0145043a338 100644--- a/litellm/proxy/_new_secret_config.yaml+++ b/litellm/proxy/_new_secret_config.yaml@@ -1,16 +1,5 @@model_list:- - model_name: anthropic/claude-3-7-sonnet-20250219+ - model_name: claude-3.5litellm_params:- model: anthropic/claude-3-7-sonnet-20250219- api_key: os.environ/ANTHROPIC_API_KEY- - model_name: gpt-4- litellm_params:- model: openai/gpt-3.5-turbo- api_key: os.environ/OPENAI_API_KEY- api_base: http://0.0.0.0:8090- - model_name: deepseek-r1- litellm_params:- model: bedrock/deepseek_r1/arn:aws:bedrock:us-west-2:888602223428:imported-model/bnnr6463ejgf- - model_name: deepseek-r1-api- litellm_params:- model: deepseek/deepseek-reasoner+ model: claude-3-5-sonnet-latest+ api_key: os.environ/ANTHROPIC_API_KEY\ No newline at end of filediff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 5cb77d778ce..00e4bd0f0cb 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -2748,6 +2748,43 @@"deprecation_date": "2025-10-01","supports_tool_choice": true},+ "claude-3-5-haiku-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000001,+ "output_cost_per_token": 0.000005,+ "cache_creation_input_token_cost": 0.00000125,+ "cache_read_input_token_cost": 0.0000001,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "tool_use_system_prompt_tokens": 264,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-10-01",+ "supports_tool_choice": true+ },+ "claude-3-opus-latest": {+ "max_tokens": 4096,+ "max_input_tokens": 200000,+ "max_output_tokens": 4096,+ "input_cost_per_token": 0.000015,+ "output_cost_per_token": 0.000075,+ "cache_creation_input_token_cost": 0.00001875,+ "cache_read_input_token_cost": 0.0000015,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 395,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-03-01",+ "supports_tool_choice": true+ },"claude-3-opus-20240229": {"max_tokens": 4096,"max_input_tokens": 200000,@@ -2784,6 +2821,25 @@"deprecation_date": "2025-07-21","supports_tool_choice": true},+ "claude-3-5-sonnet-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "cache_creation_input_token_cost": 0.00000375,+ "cache_read_input_token_cost": 0.0000003,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 159,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-06-01",+ "supports_tool_choice": true+ },"claude-3-5-sonnet-20240620": {"max_tokens": 8192,"max_input_tokens": 200000,@@ -2803,6 +2859,25 @@"deprecation_date": "2025-06-01","supports_tool_choice": true},+ "claude-3-7-sonnet-latest": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "cache_creation_input_token_cost": 0.00000375,+ "cache_read_input_token_cost": 0.0000003,+ "litellm_provider": "anthropic",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "tool_use_system_prompt_tokens": 159,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "deprecation_date": "2025-06-01",+ "supports_tool_choice": true+ },"claude-3-7-sonnet-20250219": {"max_tokens": 8192,"max_input_tokens": 200000,@@ -6468,6 +6543,21 @@"supports_response_schema": true,"supports_tool_choice": true},+ "us.anthropic.claude-3-7-sonnet-20250219-v1:0": {+ "max_tokens": 8192,+ "max_input_tokens": 200000,+ "max_output_tokens": 8192,+ "input_cost_per_token": 0.000003,+ "output_cost_per_token": 0.000015,+ "litellm_provider": "bedrock_converse",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_vision": true,+ "supports_assistant_prefill": true,+ "supports_prompt_caching": true,+ "supports_response_schema": true,+ "supports_tool_choice": true+ },"us.anthropic.claude-3-haiku-20240307-v1:0": {"max_tokens": 4096,"max_input_tokens": 200000,diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.pyindex f5c75b80bba..b1995a6b230 100644--- a/tests/local_testing/test_completion.py+++ b/tests/local_testing/test_completion.py@@ -1756,9 +1756,12 @@ async def test_openai_compatible_custom_api_base(provider):assert "hello" in mock_call.call_args.kwargs["extra_body"]-@pytest.mark.parametrize(- "provider", ["openai", "hosted_vllm",]+ "provider",+ [+ "openai",+ "hosted_vllm",+ ],) # "vertex_ai",@pytest.mark.asyncioasync def test_openai_compatible_custom_api_video(provider):@@ -1774,7 +1777,7 @@ async def test_openai_compatible_custom_api_video(provider):{"type": "video_url","video_url": {"url": "https://www.youtube.com/watch?v=29_ipKNI8I0"},- }+ },],}]@@ -1797,7 +1800,6 @@ async def test_openai_compatible_custom_api_video(provider):print(e)mock_call.assert_called_once()-def test_lm_studio_completion(monkeypatch):@@ -4136,7 +4138,7 @@ def test_completion_gemini(model):@pytest.mark.asyncioasync def test_acompletion_gemini():litellm.set_verbose = True- model_name = "gemini/gemini-pro"+ model_name = "gemini/gemini-1.5-flash"messages = [{"role": "user", "content": "Hey, how's it going?"}]try:response = await litellm.acompletion(model=model_name, messages=messages)