Repository navigation
test(ci): repair stale tests and flaky CI infrastructure - #43983
Merged
Merged
Conversation
…lden #43063 stamps used_client_oauth_token into spend-log metadata, so test_async_gcs_pub_sub_v1 failed on main with an extra metadata key
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ability debounce #42625 keeps Save disabled while a 300ms-debounced availability check runs. This test waits for Save right after the change, so the whole debounce lands inside waitFor's 1s default and it times out under CI load. It is the recurring UI Unit Tests failure on main since #42625 landed
…served at default #42870 added both the rule that a served default or standard tier bills at base pricing and records no service_tier, and streamed tests expecting the row to record 'default'. They have failed on every scheduled litellm-e2e run since. The tests now map the served tier to the pricing basis the bill must record and check input is billed at that basis's rate; the messages case registers custom rates so the rate check has something to compare against
The row the spec hovers is already on the unfiltered first page, so it was found before the search request returned. The search response then re-rendered the table under the mouse, and the Base UI tooltip never opened. Reproduced with Playwright against a local proxy: hovering right after the fill never shows the tooltip, hovering after the search response shows the call id every time
… with reasoning off The case picked the cheapest Together row flagged supports_response_schema. DeepSeek-V4-Flash-0731 hit its cost-map deprecation date on 2026-09-29, so the pick moved to GLM-5.3-Flash, a reasoning-only model that spends the 1024-token budget thinking and returns content=None. Qwen3.5-9B is the pinned hybrid model the reasoning_effort=none case already exercises, and Together lists it with structured output support
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 05:30 — with
GitHub Actions
Error
…e in spend logs The MCP shard runs under xdist against one database, and a sibling file creates a default_on pre_mcp_call content filter there. The owned proxy reloads DB guardrails, so that filter's 'success' entry could land first in guardrail_information and the test read it instead of the agent 365 verdict
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 05:40 — with
GitHub Actions
Error
…r push-failure log check gc.collect() inside the caplog window can collect a pending task an earlier test left on a closed loop, and asyncio logs 'Task was destroyed but it is pending' into this test's records. The check still counts every LiteLLM logger, and unretrieved task exceptions on this loop still go through the asserted exception handler
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 05:43 — with
GitHub Actions
Error
#42949 added 'Filter by tag name' and 'Filter by description' inputs to the Tag Management page, so page-wide getByLabel('Tag Name') and getByLabel('Description') match two elements and Playwright's strict mode fails the create step
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 06:09 — with
GitHub Actions
Error
yucheng-berri
approved these changes
Oct 1, 2026
Multi-worker proxies start each uvicorn worker in a fresh process, so every worker reads the license from its environment. Forward LITELLM_LICENSE into the proxy and test runner environments
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 07:53 — with
GitHub Actions
Error
… to 5.5.5 Every pull request saved its own uv, maturin, Rust and Prisma caches, about 4.5 GB per PR, so the repository's 10 GB cache budget evicted main's entries within minutes. Pull request jobs then missed every cache, downloaded all dependencies from PyPI and hit the install step timeouts. Pull requests now restore only, and main keeps the caches warm for them. test-linting and check-ui-api-types run only on pull requests and keep saving codecov-action 5.5.4 imports its signing key from the deleted codecovsecurity keybase account, so every upload failed signature verification. 5.5.5 reads it from codecovsecops; the key ID matches the one signing the current CLI
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 08:11 — with
GitHub Actions
Error
…ds instead of 5 refused connections The proxy retries the database about every 30 seconds and each retry opens roughly one connection, so a 5-connection outage took 3 to 4 retries to clear and recovery landed between 60 and 90 seconds, straddling the test's 80 second reset window. A fixed 10 second outage still refuses the immediate reconnect and recovers on the next retry
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 08:32 — with
GitHub Actions
Error
check_workflow_startup_safety sums every setup step's timeout, so the save and restore variants each counted 5 minutes although only one runs. One composite step keeps the setup ceiling at 35 minutes
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 08:33 — with
GitHub Actions
Error
6 tasks done
…s_1001 # Conflicts: # .github/workflows/test-postgres.yml
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 16:57 — with
GitHub Actions
Error
The rust_bridge tokenizer tests loaded o200k_base before any test in their xdist worker had imported default_encoding, so tiktoken fell back to the temp cache and tried to download under pytest-socket. Move the session fixture from litellm_core_utils/conftest.py to the root unit conftest.
yuneng-berri
had a problem deploying
to
e2e-changed
October 1, 2026 17:14 — with
GitHub Actions
Error
…ire tests The router's periodic upstream model info refresh sends GET /v1/models to hosted_vllm deployments, so a wire server that is live during a refresh sees an extra request. Answer the probe with an empty model list and leave it out of the provider-call assertions, matching the responses bridge tests.
yuneng-berri
requested a deployment
to
e2e-changed
October 1, 2026 17:39 — with
GitHub Actions
Waiting
yuneng-berri
enabled auto-merge (squash)
October 1, 2026 17:45
2 of 5 tasks
Merged
11 tasks done
3 of 14 tasks
yuneng-berri
added a commit
that referenced
this pull request
Oct 3, 2026
) * test(e2e): align completion, SAIL, and spend-log fixtures with supported contracts (#43902) Partial backport to rc/1.104.0: only the text completion endpoint test moves off the deprecated gpt-3.5-turbo-instruct to openai/gpt-5.4-nano. The SAIL, spend-log and coverage registry repairs target tests or behavior this line does not need for the e2e suite (cherry picked from commit e61733b) * test(ci): repair stale tests and flaky CI infrastructure (#43983) Partial backport to rc/1.104.0: only the Together AI structured-output e2e case moves to the hybrid reasoning backend with reasoning off, since the reasoning-only model it picked returned no content. The CI infrastructure and other test repairs are not needed for this line's e2e suite (cherry picked from commit 6ca90b9)
Merged
4 of 14 tasks
haowang1013
pushed a commit
to directivegames/litellm
that referenced
this pull request
Oct 12, 2026
Partial backport to stable/1.103.x: only the Together AI structured-output e2e case moves to the hybrid reasoning backend with reasoning off, since the reasoning-only model it picked returned no content. The CI infrastructure and other test repairs are not needed for this line's e2e suite (cherry picked from commit 6ca90b9)
This branch is waiting to be deployed
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
Problem this solves:
How it solves it:
used_client_oauth_tokenfrom feat(proxy): record in spend logs whether a request used a client-forwarded Anthropic OAuth token #43063User Flow
Before: a contributor's PR inherits red CI jobs that have nothing to do with their change
run-cilabelunit,logging_testing,integration-mcp,integration-extensionsande2e_ui_testing, GHA UI unit tests, and the scheduled Buildkitelitellm-e2ebuild fail on tests their diff never touchedAfter: those jobs only go red when LiteLLM behavior actually changes
run-cilabelScreenshots / Proof of Fix
Tests-only PR, so there is no customer-facing request to curl. Product code is identical in Before and After; the proof is that each repaired test fails the way CI does on the old test, passes on the new one, and fails again when the guarded behavior is mutated
Before (6d7d183)
GCS pub/sub golden
pytest tests/logging_callback_tests/test_gcs_pub_sub.py::test_async_gcs_pub_sub_v1Failed: Dictionary mismatch: ['Extra key in actual: metadata.used_client_oauth_token']Auto-router threshold save
npx vitest run src/components/edit_auto_router/edit_auto_router_modal.integration.test.tsxwith the availability debounce raised to 1000ms to make the CI race deterministicStreamed service tier
pytest tests/e2e/quota_management/spend_tracking/test_service_tier_pricing_e2e.pyagainst a local proxy and live OpenAIdefault, but a default-served call is now billed at base rates with no tierLogs call-id tooltip
Together structured output
litellm-e2e336 to 338 failtest_response_format_json_schema_shapes_the_replyNoneAgent 365 guardrail status
default_onpre_mcp_callcontent filter in the shared database, astest_mcp_accounting_guardrails.pycreates it under xdistpytest "tests/integration/mcp/test_mcp_agent_365_guardrail.py::test_a_missing_or_malformed_caller_bearer_blocks_on_every_entry_point_whatever_the_fallback[fail_closed]"assert ['success', ...] == ['guardrail_intervened', ...], the same failure as CircleCIintegration-mcpBudget limiter push failure
unitpytest tests/unit/router_strategy/test_budget_limiter_hotpath.py::test_push_task_failure_is_logged_once_and_not_leakedTask was destroyed but it is pending!record from asyncio, the same failure as CircleCIunitTag management create
./run_e2e.sh tests/tagManagement/tagManagement.spec.tsfromtests/e2e/ui, which builds the dashboard from source and serves it from a local proxyAggregateError: Action and cleanup failed, matching CircleCIe2e_ui_testing, whose trace names the cause:strict mode violation: getByLabel('Tag Name') resolved to 2 elements, the second being the newFilter by tag nameinputAzure Storage on multi-worker proxies
integration-extensionson 2684cd6 runs the Azure Storage files from fix(azure_storage): keep the DataLakeServiceClient alive until its TTL elapses #43082 and fix(azure_storage): name Data Lake objects without base64 padding or slashes #43914AzureBlobStorageLogger is only available for premium usersabout 100 times; the single-worker case passesCI infrastructure
auth-checks,proxy-server-core,proxy-utilsandproxy-behaviortime out in "Install dependencies": the uv cache misses even on its prefix, only pull-request-scoped caches exist (about 4.5 GB per PR in a 10 GB budget), and 18 of 55 packages finish downloading in 8 minutesproxy-behavioruploads fail withgpg: Can't check signature: No public keyafter all 929 tests pass;https://keybase.io/codecovsecurity/pgp_keys.ascnow returnsSELF-SIGNED PUBLIC KEY NOT FOUNDbase_sdk_installis killed at "Build the wheel" withToo long with no output (exceeded 10m0s)in about 30% of recent runsIntegration and unit harness races
integration-mcp: an owned proxy logs[Errno 98] ... address already in useright after startup completes, and the test fails withOwned proxy exited before readinessintegration-management:httpx.ReadError: [Errno 104] Connection reset by peeron the first request after the test waits on Redis reconnects; reproduced with a bare uvicorn server as 9 resets in 450 requests reused 4.99 to 5.02 seconds after the last oneintegration-accounting: the budget reset never lands within 80 seconds; a relay probe shows recovery needs 3 to 4 proxy retries because each retry uses about one of the 5 refused connectionsunit:test_finalizer_on_live_loop_disposes_foreign_loop_session_without_schedulingfailsassert session.closed; a probe that makes the pool worker linger 0.5 seconds after setting its result reproduces it every timeunit: the rust_bridgeo200k_basetokenizer cases fail withSocketConnectBlockedErrorwhen their xdist worker has not importeddefault_encodingyet, so tiktoken skips the bundled cache; running the file alone with no temp cache fails all 8 casesintegration-providers:test_only_string_reasoning_content_is_forwarded_to_hosted_vllm[null-dropped]sees('GET', '/v1/models')ahead of the chat call. The router's periodic upstream model info refresh probes hosted_vllm deployments, and with the refresh interval forced to 1 second locally the original file fails 3 of 21After (8325201)
GCS pub/sub golden
used_client_oauth_tokenfrom the stamped spend-log metadata keys makes it failAuto-router threshold save
Streamed service tier
Logs call-id tooltip
Together structured output
together_ai/Qwen/Qwen3.5-9Bwithreasoning_effort="none", which Together lists as hybrid with structured outputsAgent 365 guardrail status
successon a rejected call fails the test with the polluter still presentBudget limiter push failure
Tag management create
Azure Storage on multi-worker proxies
LITELLM_LICENSEset:pytest tests/integration/observability/test_azure_storage_client_ttl.py tests/integration/observability/test_azure_storage_chaos.py tests/integration/observability/test_azure_storage_file_names.pyCI infrastructure
codecovsecopskey imports as806BB28AED779869, the key ID on the current CLI'sSHA256SUM.sigcircleci config validatepasses with the 30 minute window on the wheel buildIntegration and unit harness races
address already in useand the second launch serves the testo200k_baseatcl100k_basestill fails 4 casesreasoning_contentpass through still fails 3 casesType
✅ Test
🚄 Infrastructure
Caveats (if any)
Medium
QA runbook
tests/e2e/quota_management/spend_tracking/test_service_tier_pricing_e2e.py::TestServiceTierPricing::test_streamed_call_records_and_bills_the_served_tier - a streamed chat call OpenAI served at default records no tier and bills base input rates
OPENAI_API_KEY)"stream": trueand noservice_tierservice_tierin the cost breakdown, and fresh input tokens billed at the base input ratetests/e2e/quota_management/spend_tracking/test_service_tier_pricing_e2e.py::TestServiceTierPricing::test_responses_stream_records_the_served_tier - the same for a streamed /v1/responses call
"stream": trueagainst the same custom-priced modeltests/e2e/quota_management/spend_tracking/test_service_tier_pricing_e2e.py::TestServiceTierPricing::test_messages_stream_records_the_served_tier - a streamed /v1/messages call bills at the rate matching the tier it recorded
"stream": trueagainst the same custom-priced modeltests/e2e/ui/tests/logs/logs.spec.ts "a served request's Logs row and drawer show its x-litellm-call-id" - the Logs page finds a request by call id and shows it in the row tooltip
x-litellm-call-idresponse headerx-litellm-call-id: <call id>tests/e2e/llm_translation/test_together_ai_e2e.py::test_response_format_json_schema_shapes_the_reply - a json_schema response format on Together returns JSON matching the schema
model: together_ai/Qwen/Qwen3.5-9B,reasoning_effort: "none", and ajson_schemaresponse format (needsTOGETHERAI_API_KEY)tests/e2e/ui/tests/tagManagement/tagManagement.spec.ts "creates, edits, reopens, and reads back a tag" - a tag created and edited on the Tag Management page reads back with the edited description
Final Attestation