From a7026e42464615c207597e14262f6b71f9af8a4d Mon Sep 17 00:00:00 2001 From: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:49:30 -0700 Subject: [PATCH] test(cost): align catalog assertions with mirrored main data --- .../test_agentcore_search_transformation.py | 7 +++-- tests/unit/test_utils.py | 28 +++++++++++++++++-- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/tests/unit/llms/bedrock/search/test_agentcore_search_transformation.py b/tests/unit/llms/bedrock/search/test_agentcore_search_transformation.py index 4526c428f1a..ce0524b7c86 100644 --- a/tests/unit/llms/bedrock/search/test_agentcore_search_transformation.py +++ b/tests/unit/llms/bedrock/search/test_agentcore_search_transformation.py @@ -8,10 +8,10 @@ the sharded CI (coverage collection runs against this tree). import json import os +from unittest.mock import AsyncMock, MagicMock, patch import httpx import pytest -from unittest.mock import AsyncMock, patch, MagicMock import litellm from litellm.llms.base_llm.search.transformation import SearchResponse @@ -636,7 +636,10 @@ class TestAgentCoreSearchEdgeCases: from litellm.search.cost_calculator import search_provider_cost_per_query monkeypatch.setattr(litellm, "model_cost", GetModelCostMap.load_local_model_cost_map()) - assert search_provider_cost_per_query(model="agentcore/search", custom_llm_provider="agentcore") == (0.0, 0.0) + assert search_provider_cost_per_query(model="agentcore/search", custom_llm_provider="agentcore") == ( + litellm.model_cost["agentcore/search"]["input_cost_per_query"], + 0.0, + ) def _transform_text(text: str) -> SearchResponse: diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 1d8162a8f97..64dfac831c4 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -851,10 +851,19 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "cache_creation_input_token_cost_above_200k_tokens_batches": {"type": "number"}, "cache_creation_input_token_cost_above_272k_tokens_batches": {"type": "number"}, "cache_creation_input_token_cost_batches": {"type": "number"}, + "cache_creation_input_token_cost_decisions": {"type": "number"}, + "cache_creation_input_token_cost_above_272k_tokens_decisions": {"type": "number"}, + "cache_read_input_token_cost_decisions": {"type": "number"}, + "cache_read_input_token_cost_above_272k_tokens_decisions": {"type": "number"}, + "input_cost_per_token_decisions": {"type": "number"}, + "input_cost_per_token_above_272k_tokens_decisions": {"type": "number"}, + "output_cost_per_token_decisions": {"type": "number"}, + "output_cost_per_token_above_272k_tokens_decisions": {"type": "number"}, "cache_creation_input_token_cost_flex": {"type": "number"}, "cache_creation_input_token_cost_priority": {"type": "number"}, "cache_creation_input_token_cost_ultrafast": {"type": "number"}, "cache_read_input_token_cost": {"type": "number"}, + "explicit_cache_read_input_token_cost": {"type": "number"}, "cache_read_input_token_cost_above_32k_tokens": {"type": "number"}, "cache_read_input_token_cost_above_100k_tokens": {"type": "number"}, "cache_read_input_token_cost_above_100k_tokens_batches": {"type": "number"}, @@ -925,6 +934,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "input_cost_per_request": {"type": "number"}, "cost_per_second": {"type": "number"}, "input_cost_per_second": {"type": "number"}, + "input_cost_per_text_message": {"type": "number"}, "input_cost_per_token": {"type": "number"}, "input_cost_per_token_above_128k_tokens": {"type": "number"}, "input_cost_per_audio_token_batches": {"type": "number"}, @@ -961,6 +971,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "image_edit", "embedding", "evaluation", + "extraction", "guardrail", "image_generation", "video_generation", @@ -1041,9 +1052,6 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "supports_box_questions": {"type": "boolean"}, "supports_vision": {"type": "boolean"}, "supports_web_search": {"type": "boolean"}, - "supports_bedrock_runtime_chat_completions_tools_with_reasoning": {"type": "boolean"}, - "supports_bedrock_runtime_chat_completions_response_format": {"type": "boolean"}, - "supports_bedrock_runtime_chat_completions_inline_reasoning": {"type": "boolean"}, "token_count_framing": {"type": "integer"}, "token_count_model": { "type": "object", @@ -1051,6 +1059,10 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "required": ["model"], }, "token_count_tokenizer": {"type": "string", "enum": ["kimi_k3"]}, + "supports_bedrock_runtime_chat_completions_tools_with_reasoning": {"type": "boolean"}, + "supports_bedrock_runtime_chat_completions_response_format": {"type": "boolean"}, + "supports_bedrock_runtime_chat_completions_inline_reasoning": {"type": "boolean"}, + "supports_bedrock_converse_tool_result_images": {"type": "boolean"}, "supports_url_context": {"type": "boolean"}, "supports_multimodal": {"type": "boolean"}, "uses_embed_content": {"type": "boolean"}, @@ -1147,6 +1159,16 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "type": "string", "enum": ["per_prompt", "per_query"], }, + "search_free_requests": { + "type": "object", + "properties": { + "count": {"type": "integer", "minimum": 1}, + "period": {"type": "string", "enum": ["day", "month"]}, + "shared_group": {"type": "string"}, + }, + "required": ["count", "period", "shared_group"], + "additionalProperties": False, + }, "citation_cost_per_token": {"type": "number"}, "supported_modalities": { "type": "array",