test(llms): annotate local_model_cost_map fixtures in phase 6 tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yuneng 2026-09-20 07:48:07 +00:00
parent e1d2789d29
commit 4048062e53
2 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@ Source: litellm/llms/chatgpt/responses/transformation.py
"""
import json
from collections.abc import Generator
from unittest.mock import MagicMock, patch
import httpx
@ -20,7 +21,7 @@ from litellm.utils import ProviderConfigManager
@pytest.fixture
def local_model_cost_map(monkeypatch):
def local_model_cost_map(monkeypatch: pytest.MonkeyPatch) -> Generator[None, None, None]:
monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url=""))
litellm.get_model_info.cache_clear()

View file

@ -1,3 +1,4 @@
from collections.abc import Generator
from datetime import datetime, timezone
from typing import Final
@ -9,7 +10,7 @@ from litellm.types.utils import ModelResponse, PromptTokensDetailsWrapper, Usage
@pytest.fixture
def local_model_cost_map(monkeypatch):
def local_model_cost_map(monkeypatch: pytest.MonkeyPatch) -> Generator[None, None, None]:
monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url=""))
litellm.get_model_info.cache_clear()