mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(router): normalize model_info to dict in set_model_list
This commit is contained in:
parent
e2d7c226e0
commit
6878adca2b
1 changed files with 6 additions and 1 deletions
|
|
@ -9428,7 +9428,12 @@ class Router:
|
|||
if isinstance(v, str) and v.startswith("os.environ/"):
|
||||
_litellm_params[k] = get_secret(v)
|
||||
|
||||
_model_info: dict = model.pop("model_info", {})
|
||||
_raw_model_info = model.pop("model_info", {})
|
||||
_model_info: dict = (
|
||||
_raw_model_info.model_dump(exclude_none=True)
|
||||
if hasattr(_raw_model_info, "model_dump")
|
||||
else (_raw_model_info or {})
|
||||
)
|
||||
|
||||
declared_id = None if _model_info.get("id") is None else str(_model_info["id"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue