mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
refactor(tests): type the model router spend log kwargs helper
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
cafc8c1455
commit
57b367c78e
1 changed files with 9 additions and 1 deletions
|
|
@ -6,6 +6,8 @@ import sys
|
|||
from datetime import timezone
|
||||
from typing import Any, Final, cast
|
||||
|
||||
from typing_extensions import ReadOnly, TypedDict
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
|
@ -3243,7 +3245,13 @@ def test_get_logging_payload_failed_request_without_standard_logging_payload_lea
|
|||
assert payload["custom_llm_provider"] == ""
|
||||
|
||||
|
||||
def _model_router_spend_log_kwargs(slp_model: str | None) -> dict[str, Any]:
|
||||
class _ModelRouterSpendLogKwargs(TypedDict):
|
||||
model: ReadOnly[str]
|
||||
litellm_params: ReadOnly[dict[str, dict[str, str]]]
|
||||
standard_logging_object: ReadOnly[StandardLoggingPayload]
|
||||
|
||||
|
||||
def _model_router_spend_log_kwargs(slp_model: str | None) -> _ModelRouterSpendLogKwargs:
|
||||
standard_logging_payload: Final = cast(
|
||||
StandardLoggingPayload,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue