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

fix(spend_tracking): /spend/logs with no filter #4998

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

Conversation

MrOrz
Copy link

@MrOrz MrOrz commented Aug 1, 2024

Title

Fix /spend/logs "cannot access local variable 'spend_log' where it is not associated with a value" error caused by a typo in implementation.

Relevant issues

No issue. But the bug does exist.

Steps to reproduce the bug

  1. Spin up LiteLLM proxy at localhost:4000
  2. curl localhost:4000/spend/logs -H 'Authorization: Bearer <key here>'

Expected output

Spending logs

Actual output

{"error":{"message":"/spend/logs Errorcannot access local variable 'spend_log' where it is not associated with a value","type":"internal_error","param":"None","code":"500"}}

Type

🐛 Bug Fix

Changes

  • Fix typo spend_logs --> spend_log in the handling logic when no filter is set
  • Remove unused variable spend_logs at greater scope

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

curl localhost:4000/spend/logs -H 'Authorization: Bearer <key here>' can now work properly.
image

All failed tests are failing before change.
image

Copy link

vercel bot commented Aug 1, 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 Aug 1, 2024 7:32pm

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