test(e2e): skip the batch rate-limiter spend-row test pending LIT-5027 - #35301
Merged
ryan-crabbe-berri merged 1 commit intoJul 31, 2026
Conversation
The batch rate limiter counts input tokens by awaiting litellm.afile_content with no timeout, so a slow Files API holds POST /v1/batches open past any client deadline; stage saw 63.6s against the harness's 60s read timeout. The test times out before reaching the unattributed-spend-row assertion it exists to guard, so it reports an infrastructure hang rather than the contract. Skipping keeps the signal honest until the fetch is bounded.
Contributor
Greptile SummaryTemporarily disables the hanging batch rate-limiter spend-attribution end-to-end test with a ticket-linked explanation.
Confidence Score: 5/5The PR appears safe to merge as a narrowly scoped test quarantine with no product-runtime impact. The only change skips a test that cannot currently reach its assertion because the exercised server path exceeds the client deadline, and the skip clearly records the tracked condition for removal.
|
| Filename | Overview |
|---|---|
| tests/e2e/batches/test_batches_e2e.py | Adds a documented temporary skip to a known hanging end-to-end test; no actionable defect was identified in the change. |
Reviews (1): Last reviewed commit: "test(e2e): skip the batch rate-limiter s..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ryan-crabbe-berri
enabled auto-merge (squash)
July 31, 2026 01:18
yuneng-berri
approved these changes
Jul 31, 2026
ryan-crabbe-berri
deleted the
litellm_skip_batch_rl_unattributed_spend_e2e
branch
July 31, 2026 01:20
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
High level flow for the user:
High level flow on a technical level:
Relevant issues
Linear ticket
Refs LIT-5027
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
This PR adds no product behavior, so there is nothing to curl a green result out of; the thing being proven is that the path under test hangs server-side and that the test can never reach its assertion. Evidence is from the stage e2e run on 2026-07-30 12:42 UTC, gateway pod
litellm-gateway-5645668d45-xthvkin namespacelitellm, at stage image commit38f2e023f1The client issued
POST /v1/batchesat 12:50:05Z right after its input file uploaded cleanly, and gave up at its 60s read timeout:No access-log line is ever emitted for that
POST /v1/batches, and both the gateway and backend pods go silent for the full 60s apart from health probes. The read finally resolves at 12:51:09.33Z, 63.6 seconds after it started, inside the rate limiter:The 404 is a consequence of the client's teardown deleting the file it was still reading, not the cause of the hang. Pod restart, OOM, SIGTERM and DB slowness are all ruled out: that gateway pod served continuously and did not log
Shutting downuntil 14:05:15Z, 74 minutes laterThe unbounded await is visible in the tree;
grep -n timeout litellm/proxy/hooks/batch_rate_limiter.pyreturns no matches, solitellm.afile_contentinherits the OpenAI SDK default of 600s with two retries. This is not a regression; the call has been unbounded since the hook landed in #16075 on 2025-10-29After this PR, at commit
010bf6f793, the test is skipped and the reason travels with it:Type
✅ Test
Changes
Adds a
pytest.mark.skiptotest_rate_limited_batch_create_leaves_no_unattributed_spend_rowwith a reason naming LIT-5027 and describing why the path cannot be exercised today. No other test is touched and no product code changesThe test is the only coverage of the batch rate limiter's input-file read; an unlimited key skips that path entirely, which is why the test deliberately mints a key with generous rpm/tpm limits. Skipping it therefore leaves the LIT-3266 unattributed-spend-row contract uncovered, and that tradeoff is called out in LIT-5027 so the skip is lifted rather than forgotten. The alternative, raising the harness read timeout past the hang, was rejected: it would turn a product defect into a slow green test
QA runbook
tpm_limit=1_000_000andrpm_limit=1_000rather than throughresources.key(), because the limiter only reads the input file when the key carries applicable rpm/tpm limits, and the generous values keep the batch itself unblockedapi_key) over a bounded two-hour window via/spend/logs/v2, so the later comparison measures only what this test introduced and does not read the whole tableFinal Attestation