-
Notifications
You must be signed in to change notification settings - Fork 4
add sqlite usage and cost monitoring #47
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
Conversation
|
Currently this make fastlite a strict dependency AFAICT, but doesn't add it to settings.ini. I don't think we should make it a dep, since most people won't need this. Probably just moving it to a separate module would suffice? BTW, are we using cachy? If so, why are all the outputs changing? (And if not - we should be! :) ) |
d93c6cb to
f05f4b8
Compare
jph00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we're nearly there! :)
b014e71 to
ab83c50
Compare
|
Thanks! :) |


This PR adds sqlite based usage and cost monitoring.
Important Notes
Total cost calculate by litellm doesn't consider web search requests, here is a relevant issue: [Bug]: Anthropic web search cost BerriAI/litellm#11422. So it might actually be a good idea to export and use the cost calculation utilities mentioned in (2).
Web search requests are not included in litellm usage metrics when
stream=True, created an issue for this: [Bug]:server_tool_usemissing in usage when usingstream=TrueBerriAI/litellm#16631 and a PR: includeserver_tool_usein streaming usage BerriAI/litellm#16826.Litellm PR is not a blocker for this PR, once litellm team merges it, the following formula will give the total AI cost even with
stream=True:Fixes: #49