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

[Bug]: #7923

Open
mbrisson-ivadolabs opened this issue Jan 22, 2025 · 0 comments
Open

[Bug]: #7923

mbrisson-ivadolabs opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mbrisson-ivadolabs
Copy link

What happened?

We are currently having a user warning when we start our application using litellm.

.venv/lib/python3.13/site-packages/pydantic/_internal/_config.py:345: UserWarning: Valid config keys have changed in V2:

  • 'fields' has been removed
    warnings.warn(message, UserWarning)

Adding a break point in pydantic _config.py file row 345, the input config_dict raising the warning is from UserAPIKeyLabelNames class

And going up the call stack it goes to the file litellm/types/integrations/prometheus.py:203

Where we can see class UserAPIKeyLabelValues using pydantic Config fields causing the warning

Relevant log output

`config_dict = {dict: 1} {'fields': {'api_base': {'alias': <UserAPIKeyLabelNames.API_BASE: 'api_base'>}, 'api_key_alias': {'alias': <UserAPIKeyLabelNames.API_KEY_ALIAS: 'api_key_alias'>}, 'api_provider': {'alias': <UserAPIKeyLabelNames.API_PROVIDER: 'api_provider'>}, 'end_user': {
 'fields' = {dict: 16} {'api_base': {'alias': <UserAPIKeyLabelNames.API_BASE: 'api_base'>}, 'api_key_alias': {'alias': <UserAPIKeyLabelNames.API_KEY_ALIAS: 'api_key_alias'>}, 'api_provider': {'alias': <UserAPIKeyLabelNames.API_PROVIDER: 'api_provider'>}, 'end_user': {'alias': <UserAPIKeyLabelNames.END_USER: 'end_user'>}, 'exception_class': {'alias': <UserAPIKeyLabelNames.EXCEPTION_CLASS: 'exception_class'>}, 'exception_status': {'alias': <UserAPIKeyLabelNames.EXCEPTION_STATUS: 'exception_status'>}, 'fallback_model': {'alias': <UserAPIKeyLabelNames.FALLBACK_MODEL: 'fallback_model'>}, 'hashed_api_key': {'alias': <UserAPIKeyLabelNames.API_KEY_HASH: 'hashed_api_key'>}, 'litellm_model_name': {'alias': <UserAPIKeyLabelNames.v2_LITELLM_MODEL_NAME: 'litellm_model_name'>}, 'model': {'alias': <UserAPIKeyLabelNames.v1_LITELLM_MODEL_NAME: 'model'>}, 'model_id': {'alias': <UserAPIKeyLabelNames.MODEL_ID: 'model_id'>}, 'requested_model': {'alias': <UserAPIKeyLabelNames.REQUESTED_MODEL: 'requested_model'>}, 'status_code': {...
  'end_user' = {dict: 1} {'alias': <UserAPIKeyLabelNames.END_USER: 'end_user'>}
  'user' = {dict: 1} {'alias': <UserAPIKeyLabelNames.USER: 'user'>}
  'hashed_api_key' = {dict: 1} {'alias': <UserAPIKeyLabelNames.API_KEY_HASH: 'hashed_api_key'>}
  'api_key_alias' = {dict: 1} {'alias': <UserAPIKeyLabelNames.API_KEY_ALIAS: 'api_key_alias'>}
  'team' = {dict: 1} {'alias': <UserAPIKeyLabelNames.TEAM: 'team'>}
  'team_alias' = {dict: 1} {'alias': <UserAPIKeyLabelNames.TEAM_ALIAS: 'team_alias'>}
  'requested_model' = {dict: 1} {'alias': <UserAPIKeyLabelNames.REQUESTED_MODEL: 'requested_model'>}
  'model' = {dict: 1} {'alias': <UserAPIKeyLabelNames.v1_LITELLM_MODEL_NAME: 'model'>}
  'litellm_model_name' = {dict: 1} {'alias': <UserAPIKeyLabelNames.v2_LITELLM_MODEL_NAME: 'litellm_model_name'>}
  'model_id' = {dict: 1} {'alias': <UserAPIKeyLabelNames.MODEL_ID: 'model_id'>}
  'api_base' = {dict: 1} {'alias': <UserAPIKeyLabelNames.API_BASE: 'api_base'>}
  'api_provider' = {dict: 1} {'alias': <UserAPIKeyLabelNames.API_PROVIDER: 'api_provider'>}
  'exception_status' = {dict: 1} {'alias': <UserAPIKeyLabelNames.EXCEPTION_STATUS: 'exception_status'>}
  'exception_class' = {dict: 1} {'alias': <UserAPIKeyLabelNames.EXCEPTION_CLASS: 'exception_class'>}
  'status_code' = {dict: 1} {'alias': <UserAPIKeyLabelNames.STATUS_CODE: 'status_code'>}
  'fallback_model' = {dict: 1} {'alias': <UserAPIKeyLabelNames.FALLBACK_MODEL: 'fallback_model'>}`

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.58.2

Twitter / LinkedIn details

No response

@mbrisson-ivadolabs mbrisson-ivadolabs added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant