mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
fix(proxy): default missing fallback list to empty and pass model to update_config_state
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
fafea684e8
commit
356f44a397
2 changed files with 3 additions and 3 deletions
|
|
@ -139,7 +139,7 @@ async def create_fallback(
|
|||
existing_fallbacks: Final[list[dict[str, list[str]]]] = (
|
||||
list( # mutable-ok: copy so edits stay off the frozen config
|
||||
cast( # cast-ok: entries are model -> fallback models maps
|
||||
"list[dict[str, list[str]]]", router_settings.get(fallback_key)
|
||||
"list[dict[str, list[str]]]", router_settings.get(fallback_key) or ()
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -316,7 +316,7 @@ async def delete_fallback(
|
|||
existing_fallbacks: Final[list[dict[str, list[str]]]] = (
|
||||
list( # mutable-ok: copy so edits stay off the frozen config
|
||||
cast( # cast-ok: entries are model -> fallback models maps
|
||||
"list[dict[str, list[str]]]", router_settings.get(fallback_key)
|
||||
"list[dict[str, list[str]]]", router_settings.get(fallback_key) or ()
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1055,7 +1055,7 @@ def _live_router_and_db(db_rows: list):
|
|||
from litellm.proxy.proxy_server import ProxyConfig
|
||||
|
||||
proxy_config = ProxyConfig()
|
||||
proxy_config.update_config_state({})
|
||||
proxy_config.update_config_state(ProxyRuntimeConfig())
|
||||
fake_router = MagicMock()
|
||||
fake_router.search_tools = list(db_rows)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue