From a7aef366c15500947f76ae486e0e5275a9e68f4f Mon Sep 17 00:00:00 2001 From: shivam Date: Wed, 9 Sep 2026 23:52:07 +0000 Subject: [PATCH] feat(perplexity): add Agent API Nemotron models to cost map Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../model_prices_and_context_window_backup.json | 2 ++ model_prices_and_context_window.json | 2 ++ tests/test_litellm/test_utils.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 54ebdc85be9..e05ada47bcf 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -61230,6 +61230,7 @@ "litellm_provider": "perplexity", "mode": "responses", "supports_web_search": true, + "supports_reasoning": true, "supports_function_calling": true, "input_cost_per_token": 1.15e-08, "output_cost_per_token": 1.7e-07, @@ -61240,6 +61241,7 @@ "litellm_provider": "perplexity", "mode": "responses", "supports_web_search": true, + "supports_reasoning": true, "supports_function_calling": true, "input_cost_per_token": 2.5e-07, "output_cost_per_token": 2.5e-06, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 54ebdc85be9..e05ada47bcf 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -61230,6 +61230,7 @@ "litellm_provider": "perplexity", "mode": "responses", "supports_web_search": true, + "supports_reasoning": true, "supports_function_calling": true, "input_cost_per_token": 1.15e-08, "output_cost_per_token": 1.7e-07, @@ -61240,6 +61241,7 @@ "litellm_provider": "perplexity", "mode": "responses", "supports_web_search": true, + "supports_reasoning": true, "supports_function_calling": true, "input_cost_per_token": 2.5e-07, "output_cost_per_token": 2.5e-06, diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index e42608c9904..000fb41dd4a 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -188,6 +188,8 @@ def test_get_model_info_resolves_provider_prefixed_model_ids(local_model_cost_ma ("perplexity/perplexity/kimi-k3", True), ("perplexity/perplexity/deepseek-v4-flash-0731", True), ("perplexity/perplexity/kimi-k2.7-code", False), + ("perplexity/perplexity/nemotron-3.5-lightning-30b-a3b", True), + ("perplexity/perplexity/nemotron-3-ultra-550b-a55b", True), ): assert litellm.supports_reasoning(model=model) is reasoning, model @@ -199,6 +201,18 @@ def test_get_model_info_resolves_provider_prefixed_model_ids(local_model_cost_ma assert via_provider["output_cost_per_token"] == 4.4e-06 assert via_provider["mode"] == "responses" + lightning = litellm.get_model_info( + model="perplexity/nemotron-3.5-lightning-30b-a3b", custom_llm_provider="perplexity" + ) + assert lightning["key"] == "perplexity/perplexity/nemotron-3.5-lightning-30b-a3b" + assert lightning["input_cost_per_token"] == 1.15e-08 + assert lightning["output_cost_per_token"] == 1.7e-07 + assert lightning["cache_read_input_token_cost"] == 1.15e-09 + assert lightning["mode"] == "responses" + + ultra = litellm.get_model_info(model="perplexity/perplexity/nemotron-3-ultra-550b-a55b") + assert ultra["key"] == "perplexity/perplexity/nemotron-3-ultra-550b-a55b" + def test_get_model_info_strips_openai_finetune_ids_without_a_custom_suffix(local_model_cost_map): info = litellm.get_model_info(model="ft:gpt-4o-2024-08-06:my-org::abc123", custom_llm_provider="openai")