Skip to content

fix(ui): repoint dead usage guide link to cost tracking docs - #30859

Merged
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_/nifty-elbakyan-7b78bf
Jun 19, 2026
Merged

fix(ui): repoint dead usage guide link to cost tracking docs#30859
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_/nifty-elbakyan-7b78bf

Conversation

@yuneng-berri

@yuneng-berri yuneng-berri commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Relevant issues

Reported by a customer: the "View Usage Guide" button on the Usage page opens https://docs.litellm.ai/docs/proxy/spending_monitoring, which returns a 404.

Linear ticket

fixes LIT-2724

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

CI (LiteLLM team)

  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

The docs page proxy/spending_monitoring was deleted upstream and never relocated, so the old link 404s. proxy/cost_tracking ("Spend Tracking") is the live, on-topic replacement.

$ curl -s -o /dev/null -w "%{http_code}\n" -L https://docs.litellm.ai/docs/proxy/spending_monitoring
404
$ curl -s -o /dev/null -w "%{http_code}\n" -L https://docs.litellm.ai/docs/proxy/cost_tracking
200

To reproduce in the UI, on a proxy where the spend logs table has crossed ~1M rows (so DISABLE_EXPENSIVE_DB_QUERIES is set), go to http://localhost:4000/ui/?page=usage. The "Database Query Limit Reached" card shows a "View Usage Guide" button. Before this change it opened a 404; after, it opens the Spend Tracking docs page

Type

🐛 Bug Fix

Changes

The "View Usage Guide" button on the legacy Usage page (usage.tsx) linked to docs/proxy/spending_monitoring, which was removed from the docs and now 404s. It is only rendered inside the "Database Query Limit Reached" card, which appears when DISABLE_EXPENSIVE_DB_QUERIES is set (SpendLogs has 1M+ rows). The link is unchanged from the customer's v1.83.7 through the latest 1.89.x, and lives only on the legacy "Old Usage" page; the current Usage page does not carry it

This repoints the button to docs/proxy/cost_tracking, which is live and on-topic. I did not add a unit test: the only thing a unit test could assert here is that the href string equals cost_tracking, which would not catch the actual failure mode (the destination not existing). The meaningful regression guard is that the URL resolves, shown by the HTTP status check above

One thing worth flagging for a follow-up: cost_tracking does not carry the at-scale guidance the deleted page had (exporting logs to S3/GCS, analyzing in Redash/Snowflake, disabling spend logs past 1M rows), while the card's text still says "follow our guide to view usage when SpendLogs has more than 1M rows". Recreating that content in litellm-docs and pointing here would fully close the gap; this PR just removes the 404

The "View Usage Guide" button on the legacy Usage page (shown when
DISABLE_EXPENSIVE_DB_QUERIES is set, i.e. SpendLogs has 1M+ rows) linked
to docs/proxy/spending_monitoring, which was removed from the docs and
now returns 404. Point it at docs/proxy/cost_tracking, which is live.

Fixes LIT-2724
@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a broken docs link in the legacy Usage page's "Database Query Limit Reached" card, where the "View Usage Guide" button pointed to a deleted page that returns 404. The URL is updated to proxy/cost_tracking, which is live and on-topic.

  • Replaces https://docs.litellm.ai/docs/proxy/spending_monitoring (404) with https://docs.litellm.ai/docs/proxy/cost_tracking (200) in the <a href> of the Usage Guide button.
  • The fix is scoped to a single href string in usage.tsx; no logic, state, or other components are affected.

Confidence Score: 5/5

Safe to merge — the change is a one-line href update with no logic impact.

The entire change is swapping one dead URL for a live one in a button anchor. The PR description includes HTTP status verification confirming the old URL 404s and the new URL resolves. No logic, state, or other UI paths are touched.

No files require special attention.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/usage.tsx Single-line change replacing a 404 dead link (spending_monitoring) with the live cost_tracking docs URL in the "Database Query Limit Reached" card button.

Reviews (1): Last reviewed commit: "fix(ui): repoint dead usage guide link t..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yuneng-berri
yuneng-berri enabled auto-merge (squash) June 19, 2026 22:23
@yuneng-berri
yuneng-berri merged commit 60dc842 into litellm_internal_staging Jun 19, 2026
122 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_/nifty-elbakyan-7b78bf branch June 19, 2026 22:31
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…#30859)

The "View Usage Guide" button on the legacy Usage page (shown when
DISABLE_EXPENSIVE_DB_QUERIES is set, i.e. SpendLogs has 1M+ rows) linked
to docs/proxy/spending_monitoring, which was removed from the docs and
now returns 404. Point it at docs/proxy/cost_tracking, which is live.

Fixes LIT-2724
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