Repository navigation
revert: "feat(usage): search keys beyond the top-N usage subset (#42827)" - #43378
Conversation
|
|
|
| apiKeyTruncation={spendFetchState.apiKeyTruncation} | ||
| searchKeys={searchKeys} | ||
| /> | ||
| <KeyActivityPanel keyMetrics={keyMetrics} apiKeyTruncation={spendFetchState.apiKeyTruncation} /> |
There was a problem hiding this comment.
Key search misses existing keys
When more keys have activity than the top-N limit, this panel now searches only the loaded keys. Searching for an existing lower-spend key therefore shows “No keys match.” This revert also removes the search API, so existing clients calling it receive a 404. The repository requires avoiding backwards-incompatible changes without a user-controlled flag, but this revert provides no way to retain the previous behavior.
Rule Used: What: avoid backwards-incompatible changes without user-controlled flags Why: This breaks current behaviour for users using existing functionality Example of BAD: this PR (#22164) introduced run_post_custom... (source)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
2b00ce9 to
0ac3f5b
Compare
05784eb to
5aafae2
Compare
4337d93 to
04633e2
Compare
a1b7975 to
32bc265
Compare
04633e2 to
a12070b
Compare
32bc265 to
b5aa93a
Compare
…r the usage dashboard (#41324)" (#43595) * Revert "Merge pull request #41324 from BerriAI/litellm_daily_global_spend_table" * Revert "Merge pull request #41293 from BerriAI/litellm_usage_key_free_aggregate_split" (#43596) Co-authored-by: yassin <yassin@berri.ai> --------- Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
| WHERE {where_clause} | ||
| GROUP BY GROUPING SETS ( | ||
| (date), | ||
| (date, api_key), |
There was a problem hiding this comment.
Low: Unbounded per-key usage response
An authenticated user can request aggregated activity for a key-heavy user or team and force the proxy to materialize every per-key grouping row, look up metadata for every distinct key, and serialize the full result without pagination. Repeated requests against a large history can exhaust worker memory. Keep the overall totals complete, but bound or paginate the per-key breakdowns separately.
PR overviewThis PR reverts the change that searched usage keys beyond the top-N usage subset. The affected code handles daily activity aggregation and per-key usage breakdowns. One issue remains open: an authenticated user can request a large per-key activity breakdown that is materialized and returned without a bound or pagination. Repeated requests for key-heavy users or teams could exhaust proxy worker memory. No issues have been addressed yet. Open issues (1)
Fixed/addressed: 0 · PR risk: 5/10 |
…sage view (#42857)" (#43377) * Revert "feat(usage): search team keys beyond the top-N in the Team usage view (#42857)" * revert: "feat(usage): search keys beyond the top-N usage subset (#42827)" (#43378) * Revert "feat(usage): search keys beyond the top-N usage subset (#42827)" * revert: "feat(proxy): add LiteLLM_DailyGlobalSpend key-free rollup for the usage dashboard (#41324)" (#43595) * Revert "Merge pull request #41324 from BerriAI/litellm_daily_global_spend_table" * Revert "Merge pull request #41293 from BerriAI/litellm_usage_key_free_aggregate_split" (#43596) Co-authored-by: yassin <yassin@berri.ai> --------- Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Reverts #42827
TLDR
Problem this solves:
How it solves it:
git revertof the squash commit 5a8ec13, no conflictsGET /user/daily/activity/aggregated/searchroute, its types, tests and the Key Activity panel's remote searchUser Flow
Before: on Usage > Key Activity, typing the alias of a key below the top 100 finds it through a server search
After: the page behaves as it did before #42827
Type
🧹 Refactoring
Caveats (if any)
Low
🤖 Generated with Claude Code