docs(model_management.md): update docs to clarify calling /model/info

This commit is contained in:
Krrish Dholakia 2024-07-11 09:47:50 -07:00
parent 8fa2cf15ee
commit 070ab9f469
2 changed files with 7 additions and 2 deletions

View file

@ -15,9 +15,9 @@ model_list:
metadata: "here's additional metadata on the model" # returned via GET /model/info metadata: "here's additional metadata on the model" # returned via GET /model/info
``` ```
## Get Model Information ## Get Model Information - `/model/info`
Retrieve detailed information about each model listed in the `/models` endpoint, including descriptions from the `config.yaml` file, and additional model info (e.g. max tokens, cost per input token, etc.) pulled the model_info you set and the litellm model cost map. Sensitive details like API keys are excluded for security purposes. Retrieve detailed information about each model listed in the `/model/info` endpoint, including descriptions from the `config.yaml` file, and additional model info (e.g. max tokens, cost per input token, etc.) pulled the model_info you set and the litellm model cost map. Sensitive details like API keys are excluded for security purposes.
<Tabs <Tabs
defaultValue="curl" defaultValue="curl"

View file

@ -2673,6 +2673,11 @@ async def startup_event():
def model_list( def model_list(
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
): ):
"""
Use `/model/info` - to get detailed model information, example - pricing, mode, etc.
This is just for compatibility with openai projects like aider.
"""
global llm_model_list, general_settings global llm_model_list, general_settings
all_models = [] all_models = []
## CHECK IF MODEL RESTRICTIONS ARE SET AT KEY/TEAM LEVEL ## ## CHECK IF MODEL RESTRICTIONS ARE SET AT KEY/TEAM LEVEL ##