Repository navigation
Compare spend-log rows with daily request counts - #53
Merged
Merged
Conversation
Signed-off-by: Vijay <evijay@gmail.com>
Signed-off-by: Vijay <evijay@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add optional
investigate --litellm-daily-spend FILEcoverage beside aLiteLLM request export, for both two-period and session-review modes.
failed request counts. Keep unknown and partial-day coverage explicit.
preserves existing report bytes.
using one repeatable-read, read-only transaction.
coverage itself is unreleased and is not a v0.8.0 capability.
Evidence And Limits
Pinned LiteLLM v1.104.0 and PostgreSQL 17.11 were exercised with a loopback
mock provider and network-disabled containers, without paid API calls or
direct insertion of the request/count evidence rows.
Two successful requests sharing a provider response ID produced one persisted
request row but two daily increments. The fixture reports 8 exported rows
versus 9 daily requests, one missing row, followed by a matching next day.
Token totals remain unchanged.
Success, failure, streaming, response-cache hits, absent user identity and UTC
day boundaries are covered. Disabling failure logging omits the failed request
from both tables. Matching counts cannot prove universal request completeness;
matching scope, retention and settled writers remain prerequisites.
Verification
Linux amd64 hosted run exhausted the five-minute limit while running the
expanded database suite; no assertion failed, and all tests remain enabled.
Both historical v0.7.0 reader-compatibility checks passed using the retained
release binary matched to its authenticated archive, published checksums and
recorded signed GitHub provenance verification. No new download was needed.
The checks cover additive-column synthetic exports and actual database exports.
Hosted checks on the submitted exact head remain required. No release,
deployment ranking, pricing adjustment or completeness certification is included.