Skip to content

(fix) don't block proxy startup if license check fails & using prometheus #6839

Merged
ishaan-jaff merged 6 commits intomainfrom
litellm_fix_prom_checks
Nov 21, 2024
Merged

(fix) don't block proxy startup if license check fails & using prometheus #6839
ishaan-jaff merged 6 commits intomainfrom
litellm_fix_prom_checks

Conversation

@ishaan-jaff
Copy link
Copy Markdown
Contributor

@ishaan-jaff ishaan-jaff commented Nov 21, 2024

  1. Modify license check to be non-blocking for Prometheus, preventing startup interruption
  2. Create comprehensive tests validating proxy initialization, health endpoints, and chat completion functionality

Relevant issues

Type

🐛 Bug Fix

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

Description by Korbit AI

What change is being made?

Modify the code to prevent blocking the proxy startup if the license check fails while using Prometheus and add comprehensive tests for basic proxy startup functionality, including testing health endpoints and chat completions.

Why are these changes being made?

These changes improve the robustness of the proxy startup by allowing it to continue operating with non-premium features despite license check failures, thereby enhancing user experience. The additional tests are crucial to ensure that fundamental proxy functionalities operate correctly under various scenarios, mitigating the risk of undetected issues during deployment.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 21, 2024

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 Nov 21, 2024 1:30am

Copy link
Copy Markdown

@korbit-ai korbit-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary by Korbit AI

Code Health Comments

  • Improve clarity of Prometheus access log for non-premium users to enhance user experience.
Files scanned
File Path Reviewed
litellm/proxy/common_utils/callback_utils.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Current Korbit Configuration

General Settings
Setting Value
Review Schedule Automatic excluding drafts
Max Issue Count 10
Automatic PR Descriptions
Issue Categories
Category Enabled
Naming
Database Operations
Documentation
Logging
Error Handling
Systems and Environment
Objects and Data Structures
Readability and Maintainability
Asynchronous Processing
Design Patterns
Third-Party Libraries
Performance
Security
Functionality

Feedback and Support

Comment on lines +245 to +247
verbose_proxy_logger.warning(
f"Prometheus metrics are only available for premium users. {CommonProxyErrors.not_premium_user.value}"
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

category Logging

Revise user-facing warning message for clarity.

Tell me more

Logging issue identified: The warning message Prometheus metrics are only available for premium users. {CommonProxyErrors.not_premium_user.value} might be confusing for end-users as it includes system-centric error codes. It would be more helpful to tailor this message towards the user's perspective, indicating that they cannot access Prometheus metrics due to their non-premium status. Please consider revising this log message for better clarity and user experience.

Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant