forked from phoenix/litellm-mirror
fix(proxy_server.py): fix model info check
This commit is contained in:
parent
5bcf92f4f5
commit
c81c9c2583
2 changed files with 46 additions and 1 deletions
|
@ -6409,6 +6409,9 @@ async def add_new_model(model_params: ModelParams):
|
|||
async def model_info_v2(
|
||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||
):
|
||||
"""
|
||||
BETA ENDPOINT. Might change unexpectedly. Use `/v1/model/info` for now.
|
||||
"""
|
||||
global llm_model_list, general_settings, user_config_file_path, proxy_config
|
||||
|
||||
# Load existing config
|
||||
|
@ -6550,7 +6553,7 @@ async def model_info_v1(
|
|||
|
||||
if len(user_api_key_dict.models) > 0:
|
||||
model_names = user_api_key_dict.models
|
||||
all_models = [m for m in config["model_list"] if m in model_names]
|
||||
all_models = [m for m in config["model_list"] if m["model_name"] in model_names]
|
||||
else:
|
||||
all_models = config["model_list"]
|
||||
for model in all_models:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue