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

migrate Pydantic to v2 config #8088

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

chrisgoddard
Copy link

Update Prometheus Pydantic class to use v2 configuration

Relevant issues

Fixes #7560

Type

🐛 Bug Fix

Changes

/litellm/litellm/types/integrations/prometheus.py

  • Updated UserAPIKeyLabelValues - moved validation aliases into Field(validation_alias=...)
  • Had to set validation alias to UserAPIKeyLabelNames.ITEM.value as it needs a string

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 5:16pm

@ishaan-jaff ishaan-jaff changed the base branch from main to litellm_contributor_prs_jan29 January 29, 2025 19:56
@ishaan-jaff
Copy link
Contributor

merging into staging branch to run testing

@ishaan-jaff ishaan-jaff merged commit 705d3d5 into BerriAI:litellm_contributor_prs_jan29 Jan 29, 2025
1 check passed
@ishaan-jaff
Copy link
Contributor

fails linting checks https://app.circleci.com/pipelines/github/BerriAI/litellm/23432/workflows/fb949513-a70e-47a5-947a-c86f82ad9d6b/jobs/185173

can you look into this @chrisgoddard

integrations/prometheus.py:806: error: Missing named argument "model" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:806: error: Missing named argument "litellm_model_name" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:806: error: Missing named argument "model_id" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:806: error: Missing named argument "api_base" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:806: error: Missing named argument "api_provider" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:806: error: Missing named argument "fallback_model" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:848: error: Missing named argument "model" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:848: error: Missing named argument "litellm_model_name" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:848: error: Missing named argument "model_id" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:848: error: Missing named argument "api_base" for "UserAPIKeyLabelValues"  [call-arg]
integrations/prometheus.py:848: error: Missing named argument "api_provider" for "UserAPIKeyLabelValues"  [call-arg]

@ishaan-jaff
Copy link
Contributor

we run mypy for linting checks

@chrisgoddard
Copy link
Author

hmmm - it's a false positive but I can rewrite to use Annotated types. see here #8096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Valid config keys have changed in V2
2 participants