mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
fix(tests): revert casting of litellm_logging_obj to correctly inject mocks
This commit is contained in:
parent
8b0164d5b2
commit
9e5a710e8e
1 changed files with 3 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue