mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix: raise correct error
This commit is contained in:
parent
20849cbbfc
commit
346cd1876b
2 changed files with 8 additions and 1 deletions
|
@ -6800,6 +6800,13 @@ async def add_new_model(
|
|||
"updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name,
|
||||
}
|
||||
)
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail={
|
||||
"error": "Set `store_model_in_db: true` in general_settings on your config.yaml"
|
||||
},
|
||||
)
|
||||
return {"message": "Model added successfully"}
|
||||
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue