litellm - 💡(How to fix) Fix [Feature]: Add Cache Hit column to Request Logs UI [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#23743Fetched 2026-04-08 00:49:26
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1
RAW_BUFFERClick to expand / collapse

The Feature

Add a dedicated "Cache Hit" column (boolean or "yes/no") in the Request Logs table UI.

Motivation, pitch

In the Request Logs UI, cache hits are currently only visible indirectly via the suffix like . This makes it harder to quickly see which requests were served from cache, compare performance, and estimate cost savings.

It would be very helpful to have a dedicated "Cache Hit" column (boolean or "yes/no") in the Request Logs table. The column could be derived from the existing field or from the suffix in .

Example rows from my setup:

This feature would make it easier to:

  • monitor cache effectiveness at a glance,
  • debug when the cache is not being used as expected,
  • communicate cache impact to other stakeholders.

If there is already a hidden option or config to enable such a column, please let me know. Otherwise, I would love to see this as a small UX improvement to the Logs page.

What part of LiteLLM is this about?

UI Dashboard

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

extent analysis

Fix Plan

To add a dedicated "Cache Hit" column in the Request Logs table UI, we can modify the backend to derive this information from the existing fields and then update the UI to display it.

Steps

  • Modify the database query to include a new column for "Cache Hit" based on the existing field or suffix.
  • Update the API endpoint to return this new column in the response.
  • Modify the UI to display the new column in the Request Logs table.

Example Code

# Modified database query
def get_request_logs():
    query = """
        SELECT 
            *,
            CASE 
                WHEN suffix LIKE '%cache%' THEN 'yes'
                ELSE 'no'
            END AS cache_hit
        FROM 
            request_logs
    """
    return query

# Updated API endpoint
@app.route('/request-logs', methods=['GET'])
def get_request_logs_api():
    logs = get_request_logs()
    return jsonify([dict(row) for row in logs])

# Modified UI code
def render_request_logs_table(logs):
    table_data = []
    for log in logs:
        table_data.append({
            'columns': [
                {'name': 'Cache Hit', 'value': log['cache_hit']},
                # other columns...
            ]
        })
    return table_data

Verification

To verify that the fix worked, check the Request Logs table UI for the new "Cache Hit" column and ensure it is populated correctly based on the existing fields or suffix.

Extra Tips

  • Make sure to update the documentation and any related tests to reflect the changes.
  • Consider adding a configuration option to allow users to toggle the visibility of the "Cache Hit" column.

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

litellm - 💡(How to fix) Fix [Feature]: Add Cache Hit column to Request Logs UI [1 participants]