From 150051c3e457433087b052dd4dab74c0c3fa8ff6 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 20 Feb 2025 14:59:16 -0800 Subject: [PATCH] build(model_prices_and_context_window.json): add amazon.rerank model to model cost map --- litellm/model_prices_and_context_window_backup.json | 13 +++++++++++++ model_prices_and_context_window.json | 13 +++++++++++++ tests/llm_translation/base_rerank_unit_tests.py | 1 + 3 files changed, 27 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index c2c4140933a..b1cc47b63a3 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -5982,6 +5982,19 @@ "litellm_provider": "bedrock", "mode": "chat" }, + "amazon.rerank-v1:0": { + "max_tokens": 32000, + "max_input_tokens": 32000, + "max_output_tokens": 32000, + "max_tokens_per_doc": 512, + "max_query_tokens": 32000, + "max_documents_per_query": 100, + "input_cost_per_token": 0.0, + "input_cost_per_query": 0.001, + "output_cost_per_token": 0.0, + "litellm_provider": "bedrock", + "mode": "rerank" + }, "amazon.titan-text-lite-v1": { "max_tokens": 4000, "max_input_tokens": 42000, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index c2c4140933a..b1cc47b63a3 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -5982,6 +5982,19 @@ "litellm_provider": "bedrock", "mode": "chat" }, + "amazon.rerank-v1:0": { + "max_tokens": 32000, + "max_input_tokens": 32000, + "max_output_tokens": 32000, + "max_tokens_per_doc": 512, + "max_query_tokens": 32000, + "max_documents_per_query": 100, + "input_cost_per_token": 0.0, + "input_cost_per_query": 0.001, + "output_cost_per_token": 0.0, + "litellm_provider": "bedrock", + "mode": "rerank" + }, "amazon.titan-text-lite-v1": { "max_tokens": 4000, "max_input_tokens": 42000, diff --git a/tests/llm_translation/base_rerank_unit_tests.py b/tests/llm_translation/base_rerank_unit_tests.py index 76412e9dfca..707de7d86ce 100644 --- a/tests/llm_translation/base_rerank_unit_tests.py +++ b/tests/llm_translation/base_rerank_unit_tests.py @@ -96,6 +96,7 @@ class BaseLLMRerankTest(ABC): assert response.results is not None assert response._hidden_params["response_cost"] is not None + assert response._hidden_params["response_cost"] > 0 assert_response_shape( response=response, custom_llm_provider=custom_llm_provider.value