From e3130a87bc0f87a141dd07d84ab4fadea65c23a5 Mon Sep 17 00:00:00 2001 From: mateo Date: Fri, 11 Sep 2026 19:50:27 +0000 Subject: [PATCH] test(cost-map): type the monkeypatch fixture in cerebras and inception registry tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../llms/cerebras/test_cerebras_chat_transformation.py | 4 +++- .../llms/inception/test_inception_chat_transformation.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/llms/cerebras/test_cerebras_chat_transformation.py b/tests/test_litellm/llms/cerebras/test_cerebras_chat_transformation.py index 6a438888a8a..a47180e9511 100644 --- a/tests/test_litellm/llms/cerebras/test_cerebras_chat_transformation.py +++ b/tests/test_litellm/llms/cerebras/test_cerebras_chat_transformation.py @@ -1,3 +1,5 @@ +import pytest + import litellm from litellm.llms.cerebras.chat import CerebrasConfig @@ -62,7 +64,7 @@ def test_map_openai_params_preserves_max_retries_zero_falsy() -> None: ) -def test_qwen_3_8_27b_cost_and_tokens(monkeypatch) -> None: +def test_qwen_3_8_27b_cost_and_tokens(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True") monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url="")) model = "cerebras/qwen-3.8-27b" diff --git a/tests/test_litellm/llms/inception/test_inception_chat_transformation.py b/tests/test_litellm/llms/inception/test_inception_chat_transformation.py index e3bc4d7992d..04813143fae 100644 --- a/tests/test_litellm/llms/inception/test_inception_chat_transformation.py +++ b/tests/test_litellm/llms/inception/test_inception_chat_transformation.py @@ -7,6 +7,7 @@ import os from unittest import mock import httpx +import pytest import litellm from litellm.llms.inception.chat.transformation import InceptionChatConfig @@ -307,7 +308,7 @@ def test_inception_completion_targets_inception_endpoint(): assert response.choices[0].message.content == "hi" -def test_inception_mercury_2_5_cost_and_tokens(monkeypatch): +def test_inception_mercury_2_5_cost_and_tokens(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True") monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url="")) model = "inception/mercury-2.5"