fix(ui): repoint dead usage guide link to cost tracking docs - #30859
Conversation
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 SummaryThis 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
Confidence Score: 5/5Safe 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.
|
| 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…#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
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
make test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (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_monitoringwas deleted upstream and never relocated, so the old link 404s.proxy/cost_tracking("Spend Tracking") is the live, on-topic replacement.To reproduce in the UI, on a proxy where the spend logs table has crossed ~1M rows (so
DISABLE_EXPENSIVE_DB_QUERIESis 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 pageType
🐛 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 whenDISABLE_EXPENSIVE_DB_QUERIESis 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 itThis 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 equalscost_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 aboveOne thing worth flagging for a follow-up:
cost_trackingdoes 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