-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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]: Valid config keys have changed in V2 #7560
Labels
bug
Something isn't working
Comments
I suspect this is caused by the changes introduced in v1.56.2 with #7421, where you can see the following in class UserAPIKeyLabelValues(BaseModel):
end_user: Optional[str] = None
user: Optional[str] = None
hashed_api_key: Optional[str] = None
api_key_alias: Optional[str] = None
team: Optional[str] = None
team_alias: Optional[str] = None
requested_model: Optional[str] = None
model: Optional[str] = None
litellm_model_name: Optional[str] = None
tags: List[str] = []
model_id: Optional[str] = None
api_base: Optional[str] = None
api_provider: Optional[str] = None
exception_status: Optional[str] = None
exception_class: Optional[str] = None
status_code: Optional[str] = None
class Config:
fields = {
"end_user": {"alias": UserAPIKeyLabelNames.END_USER},
"user": {"alias": UserAPIKeyLabelNames.USER},
"hashed_api_key": {"alias": UserAPIKeyLabelNames.API_KEY_HASH},
"api_key_alias": {"alias": UserAPIKeyLabelNames.API_KEY_ALIAS},
"team": {"alias": UserAPIKeyLabelNames.TEAM},
"team_alias": {"alias": UserAPIKeyLabelNames.TEAM_ALIAS},
"requested_model": {"alias": UserAPIKeyLabelNames.REQUESTED_MODEL},
"model": {"alias": UserAPIKeyLabelNames.v1_LITELLM_MODEL_NAME},
"litellm_model_name": {"alias": UserAPIKeyLabelNames.v2_LITELLM_MODEL_NAME},
"model_id": {"alias": UserAPIKeyLabelNames.MODEL_ID},
"api_base": {"alias": UserAPIKeyLabelNames.API_BASE},
"api_provider": {"alias": UserAPIKeyLabelNames.API_PROVIDER},
"exception_status": {"alias": UserAPIKeyLabelNames.EXCEPTION_STATUS},
"exception_class": {"alias": UserAPIKeyLabelNames.EXCEPTION_CLASS},
"status_code": {"alias": UserAPIKeyLabelNames.STATUS_CODE},
} |
same issue. reverted back to 1.55.12 as a workaround. |
SmartManoj
added a commit
to SmartManoj/litellm
that referenced
this issue
Jan 6, 2025
Fixes BerriAI#7560 Remove the `Config` class from the `UserAPIKeyLabelValues` class in `litellm/types/integrations/prometheus.py`. * Remove the `fields` key in the `Config` class which was causing the pydantic warning. * Ensure the `UserAPIKeyLabelValues` class no longer uses the `Config` class. * Fix the pydantic warning related to the 'fields' config key removed in V2. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/BerriAI/litellm/issues/7560?shareId=XXXX-XXXX-XXXX-XXXX).
Same issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
An annoying pydantic warning triggered by:
litellm/litellm/types/integrations/prometheus.py
Line 224 in f1540ce
Would be amazing if you could fix this.
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
latest
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: