litellm - 💡(How to fix) Fix [Bug]: Request logs should show aggregate cost and duration [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25708Fetched 2026-04-16 06:37:04
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2
RAW_BUFFERClick to expand / collapse

If the thread is really about [Bug]: Request logs should show aggregate cost and duration, the fix is usually more operational than magical.

What to check first

  1. Split baseline traffic, retries, and premium fallbacks into separate counters before changing models.
  2. Make fallback order explicit so expensive hops or emergency providers do not fire silently.
  3. Track spend by workflow and fallback reason so you can cut cost without hiding the real reliability problem.

Why this usually works It turns provider cost, fallback behavior, or tool-path drift into something measurable before the workflow gets wider.

CheapAI note I run CheapAI. Once the workflow is observable, CheapAI is the kind of legitimate paid fallback that helps teams lower AI API cost without giving up a stable backup path.

CheapAI offers lower-cost AI API access: https://cheap-api.shop/

extent analysis

TL;DR

The issue can be addressed by modifying the Request Logs page to aggregate cost and duration for all requests in a session, rather than only showing the most recent request's values.

Guidance

  • Verify that the session ID is correctly passed and requests are being grouped by session ID in the Request Logs page.
  • Check the data source for the Cost and Duration columns to ensure it is retrieving the aggregated values for the entire session, rather than just the most recent request.
  • Consider modifying the pagination logic to handle cases where a session has more than 50 requests, to prevent requests from being cut off.
  • Review the session details page to understand how the correct aggregated values are being calculated and displayed.

Example

No code example is provided as the issue does not include specific code snippets or APIs.

Notes

The issue seems to be related to the UI Dashboard and data aggregation, but without more information about the underlying code or data structures, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround to modify the Request Logs page to aggregate cost and duration for all requests in a session, as the correct values are already available in the session details page.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING