mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(router): read the context window fallbacks through the typed fallback list helper
This commit is contained in:
parent
04a0f9ae6f
commit
fc4ad87a6c
1 changed files with 7 additions and 1 deletions
|
|
@ -10524,7 +10524,13 @@ class PythonCore(DeprecatedRouterMembers):
|
|||
return False
|
||||
if self._stream_can_fall_back(model_group, kwargs):
|
||||
return True
|
||||
configured: Final = kwargs.get("context_window_fallbacks", self._core_context_window_fallbacks)
|
||||
configured: Final = _request_fallback_list(
|
||||
kwargs,
|
||||
"context_window_fallbacks",
|
||||
cast( # cast-ok: list is invariant and the helper takes list[object]
|
||||
"list[object] | None", self._core_context_window_fallbacks
|
||||
),
|
||||
)
|
||||
if not configured:
|
||||
return False
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue