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

Add double quotes to prevent view names from being lowercased #7409

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nagomiso
Copy link

@nagomiso nagomiso commented Dec 25, 2024

Add double quotes to prevent view names from being lowercased

Creating the DailyTagSpend View on PostgreSQL without quotes creates a lowercase view named dailytagspend.
This causes a mismatch with the expected value below.

"DailyTagSpend",

And logging in warning message below.

litellm/litellm/proxy/utils.py

Lines 1173 to 1177 in c6ca835

verbose_proxy_logger.warning(
"\n\n\033[93mNot all views exist in db, needed for UI 'Usage' tab. Missing={}.\nRun 'create_views.py' from https://github.com/BerriAI/litellm/tree/main/db_scripts to create missing views.\033[0m\n".format(
missing_views
)
)

This patch prevents those warnings from being logged.

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

  • Improve create view statement to suppress warnings.

Copy link

vercel bot commented Dec 25, 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 Dec 25, 2024 7:15am

@krrishdholakia
Copy link
Contributor

Hi @nagomiso can you share a screenshot of this working for you as expected

@nagomiso
Copy link
Author

nagomiso commented Dec 26, 2024

@krrishdholakia
Since this patch only views name changes in PostgreSQL, I was thinking what screenshots would be appropriate.

Can you accept the following screenshots?

currently implementation

now-implementation

my patch applied

my-patch-applied

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.

2 participants