Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: use litellm python SDK to validate models on proxy config.yaml #7525

Closed
ishaan-jaff opened this issue Jan 3, 2025 · 0 comments · Fixed by #7538
Closed

[Feature]: use litellm python SDK to validate models on proxy config.yaml #7525

ishaan-jaff opened this issue Jan 3, 2025 · 0 comments · Fixed by #7538
Assignees
Labels
enhancement New feature or request mlops user request

Comments

@ishaan-jaff
Copy link
Contributor

The Feature

sample config

proxy_config:
  model_list:
  - model_name: gpt-4o-mini
    litellm_params:
      model: gpt-4o-mini
      api_key:  os.environ/OPENAI_API_KEY
  - model_name: gpt-4o
    litellm_params:
      model: gpt-4o
      api_key:  os.environ/OPENAI_API_KEY

if the service is provided a model name gpt-4o or gpt-4o-mini , then it would be validated. however, if the service was provided a model name gpt-100x , then it wouldn't be validated since it doesn't exist in the proxy config

i was trying to use utils.get_valid_models() like this:

valid_models = utils.get_valid_models()
if model_name not in valid_models:
     logger.error(f"Invalid model name: {model_name}. Valid models are: {valid_models}")
     

Motivation, pitch

Are you a ML Ops Team?

Yes

Twitter / LinkedIn details

No response

@ishaan-jaff ishaan-jaff added the enhancement New feature or request label Jan 3, 2025
@krrishdholakia krrishdholakia self-assigned this Jan 3, 2025
krrishdholakia added a commit that referenced this issue Jan 4, 2025
…models based on key (#7538)

* test(test_utils.py): initial test for valid models

Addresses #7525

* fix: test

* feat(fireworks_ai/transformation.py): support retrieving valid models from fireworks ai endpoint

* refactor(fireworks_ai/): support checking model info on `/v1/models` route

* docs(set_keys.md): update docs to clarify check llm provider api usage

* fix(watsonx/common_utils.py): support 'WATSONX_ZENAPIKEY' for iam auth

* fix(watsonx): read in watsonx token from env var

* fix: fix linting errors

* fix(utils.py): fix provider config check

* style: cleanup unused imports
rajatvig pushed a commit to rajatvig/litellm that referenced this issue Jan 16, 2025
…models based on key (BerriAI#7538)

* test(test_utils.py): initial test for valid models

Addresses BerriAI#7525

* fix: test

* feat(fireworks_ai/transformation.py): support retrieving valid models from fireworks ai endpoint

* refactor(fireworks_ai/): support checking model info on `/v1/models` route

* docs(set_keys.md): update docs to clarify check llm provider api usage

* fix(watsonx/common_utils.py): support 'WATSONX_ZENAPIKEY' for iam auth

* fix(watsonx): read in watsonx token from env var

* fix: fix linting errors

* fix(utils.py): fix provider config check

* style: cleanup unused imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mlops user request
Projects
None yet
2 participants