fix(tests): revert casting of litellm_logging_obj to correctly inject mocks

This commit is contained in:
KnyazSh 2026-07-08 08:40:44 +00:00
parent 8b0164d5b2
commit 9e5a710e8e

View file

@ -396,13 +396,9 @@ def llm_passthrough_route(
_is_async = bool(kwargs.get("allm_passthrough_route", False))
_raw_logging_obj = kwargs.get("litellm_logging_obj")
if not isinstance(_raw_logging_obj, LiteLLMLoggingObj):
raise TypeError(
"litellm_logging_obj is required and must be a LiteLLMLoggingObj instance; "
f"got {type(_raw_logging_obj).__name__}"
)
litellm_logging_obj: LiteLLMLoggingObj = _raw_logging_obj
litellm_logging_obj = cast(
LiteLLMLoggingObj, kwargs.get("litellm_logging_obj")
) # cast-ok: logging obj is constructed upstream; tests inject mocks
model, custom_llm_provider, api_key, api_base = get_llm_provider(
model=model,