Skip to content

revert: "feat(proxy): server-side Team Usage export beyond the top-N key cap (#42996)" - #43376

Merged
yuneng-berri merged 1 commit into
mainfrom
litellm_revert_42996
Sep 28, 2026
Merged

yuneng-berri merged 1 commit into
mainfrom
litellm_revert_42996

Conversation

@yassin-berriai

Copy link
Copy Markdown
Contributor

Reverts #42996

TLDR

Problem this solves:

How it solves it:

User Flow

Before: with more keys than USAGE_TOP_API_KEYS_LIMIT, a proxy admin can export Team Usage from the server

  1. They open http://localhost:4000/ui/?page=team-usage and click Export Data
  2. The dashboard calls GET http://localhost:4000/team/daily/activity/export?...&export_type=daily_with_keys&format=csv and gets a 200 with a CSV

After: the proxy behaves as it did before #42996

  1. They open http://localhost:4000/ui/?page=team-usage; Export Data is disabled when the key list was truncated, with the tooltip pointing at USAGE_TOP_API_KEYS_LIMIT
  2. GET http://localhost:4000/team/daily/activity/export returns 404

Type

🧹 Refactoring

Caveats (if any)

Low

🤖 Generated with Claude Code

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Removes server-side team usage export feature and related code.

The PR should not merge until the route removal satisfies the repository’s compatibility requirement and the independent test coverage is retained.

Findings

  1. P1 Existing export requests break ▶

Summary

This PR reverts server-side Team Usage export, removing the proxy route, its types and tests, and the dashboard’s server-download path. The dashboard again blocks export when its key list is truncated.

  • The route removal conflicts with the repository’s compatibility requirement.
  • Deleting the export test file also discards an independent spend-log regression test.

Reviews (1) · Last reviewed commit: "Revert "feat(proxy): server-side Team Us..."

@@ -6818,178 +6809,6 @@ async def get_team_daily_activity_aggregated(
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Existing export requests break

Clients that already call /team/daily/activity/export will receive 404 after this route is removed. The repository requires backwards-incompatible changes to have a user-controlled flag, but this removal provides no way to retain the endpoint.

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)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@greptile-apps

greptile-apps Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P2 Independent spend test deleted tests/integration/spend/test_team_daily_activity_export.py:434 ▶

    Deleting this file also removes a test that checks whether a non-streaming OpenAI SDK chat produces exactly one spend-log row. That behavior is independent of the export endpoint, so the deletion weakens regression coverage. The repository requires test changes not to weaken coverage; retain this check in an appropriate test file before merging.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codspeed

codspeed Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_revert_42996 (72fc7e0) with main (7244040)

Open in CodSpeed

@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration
devin-ai-integration Bot enabled auto-merge (squash) September 27, 2026 00:51
@yuneng-berri
yuneng-berri merged commit fe76c24 into main Sep 28, 2026
102 of 103 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_revert_42996 branch September 28, 2026 19:33

This branch is waiting to be deployed

1 waiting deployment
e2e-changed — 72fc7e05 Waiting Sep 26, 2026 by yassin-berriai via oauth #1445
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.

3 participants