mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
instantly add deployment on /model/new
This commit is contained in:
parent
bb22f0718b
commit
23ce5c2fad
1 changed files with 6 additions and 1 deletions
|
@ -6900,7 +6900,7 @@ async def add_new_model(
|
||||||
model_params: Deployment,
|
model_params: Deployment,
|
||||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||||
):
|
):
|
||||||
global llm_router, llm_model_list, general_settings, user_config_file_path, proxy_config, prisma_client, master_key, store_model_in_db
|
global llm_router, llm_model_list, general_settings, user_config_file_path, proxy_config, prisma_client, master_key, store_model_in_db, proxy_logging_obj
|
||||||
try:
|
try:
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
|
@ -6939,6 +6939,11 @@ async def add_new_model(
|
||||||
"updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name,
|
"updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
await proxy_config.add_deployment(
|
||||||
|
prisma_client=prisma_client, proxy_logging_obj=proxy_logging_obj
|
||||||
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=500,
|
status_code=500,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue