forked from phoenix/litellm-mirror
fix(proxy_server.py): skip to next model if invalid model (raise logger.error)
This commit is contained in:
parent
eaf81ed31c
commit
1ee78c39e9
2 changed files with 4 additions and 2 deletions
|
@ -2415,9 +2415,10 @@ class ProxyConfig:
|
|||
)
|
||||
_litellm_params = LiteLLM_Params(**_litellm_params)
|
||||
else:
|
||||
raise Exception(
|
||||
verbose_proxy_logger.error(
|
||||
f"Invalid model added to proxy db. Invalid litellm params. litellm_params={_litellm_params}"
|
||||
)
|
||||
continue # skip to next model
|
||||
|
||||
if m.model_info is not None and isinstance(m.model_info, dict):
|
||||
if "id" not in m.model_info:
|
||||
|
@ -2436,7 +2437,7 @@ class ProxyConfig:
|
|||
|
||||
llm_model_list = llm_router.get_model_list()
|
||||
except Exception as e:
|
||||
raise e
|
||||
verbose_proxy_logger.error("{}".format(str(e)))
|
||||
|
||||
|
||||
proxy_config = ProxyConfig()
|
||||
|
|
|
@ -137,6 +137,7 @@ async def test_add_models():
|
|||
key_gen = await generate_key(session=session)
|
||||
key = key_gen["key"]
|
||||
await add_models(session=session)
|
||||
await asyncio.sleep(60)
|
||||
await chat_completion(session=session, key=key)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue