mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
fix(router): preserve return type inference in async_function_with_fallbacks
This commit is contained in:
parent
ea7e53a4b9
commit
26070ebcee
1 changed files with 2 additions and 1 deletions
|
|
@ -7738,7 +7738,8 @@ class Router:
|
|||
if len(args) > 0 and isinstance(args[0], list)
|
||||
else [] # mutable-ok: empty message list for kwargs fallback
|
||||
)
|
||||
return await self._prompt_management_factory(
|
||||
prompt_factory: Final = getattr(self, "_prompt_management_factory") # noqa: B009 # dynamic dispatch preserves async_function_with_fallbacks return type
|
||||
return await prompt_factory(
|
||||
model=model_group,
|
||||
messages=input_messages,
|
||||
kwargs=kwargs,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue