forked from phoenix/litellm-mirror
fix(proxy_server.py): fix setting model id for db models
get model_id and use that as it's id in router, this enables `/model/delete` to work with the given id from `/model/info`
This commit is contained in:
parent
afd2d73b33
commit
b137cea230
2 changed files with 7 additions and 2 deletions
|
@ -2597,6 +2597,11 @@ class ProxyConfig:
|
|||
|
||||
Return model info w/ id
|
||||
"""
|
||||
_id: Optional[str] = getattr(model, "model_id", None)
|
||||
if _id is not None:
|
||||
model.model_info["id"] = _id
|
||||
model.model_info["db_model"] = True
|
||||
|
||||
if model.model_info is not None and isinstance(model.model_info, dict):
|
||||
if "id" not in model.model_info:
|
||||
model.model_info["id"] = model.model_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue