Skip to content

fix: backport the third batch of rc/1.107.0 CI triage fixes from main - #47174

Merged
yuneng-berri merged 6 commits into
rc/1.107.0from
litellm_still_meadow_1805
Oct 17, 2026
Merged

yuneng-berri merged 6 commits into
rc/1.107.0from
litellm_still_meadow_1805

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • rc/1.107.0 at 1738b8a169 still has reds on CircleCI integration and Buildkite e2e
  • Each fix already merged on main, this lands the third batch on the rc in one PR

How it solves it:

  • git cherry-pick -x of six squash commits from main, in their merge order
  • Every pick applied cleanly and its added and removed lines match the main commit exactly

Product fix:

Test-only fixes:

User Flow

Before: a team on the 1.107.0 rc routes Claude through a Bedrock application profile with the response cache on, and loses prompt cache stickiness

  1. They send POST https://litellm-domain/v1/messages to a deployment whose model is an application profile ARN and whose model_info.base_model names the Claude model
  2. The same request comes back from the response cache
  3. The routing pin for that conversation now lasts 5 minutes while Bedrock's prompt cache is still warm for an hour, so a turn after 5 minutes can land on another deployment and pay a fresh cache write

After: the cache hit keeps the 1h pin

  1. They send the same POST https://litellm-domain/v1/messages
  2. The same request comes back from the response cache
  3. The routing pin lasts an hour, matching the TTL sent to Bedrock, so later turns stay on the warm deployment

Affected release

Fixes found on the 1.107.0 rc cut

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

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

The end-to-end proof for each change is in its main PR. The checks below show the rc tree carries each change exactly and still builds and passes around it

Before (1738b8a)

  1. rc/1.107.0 tip, none of the six commits are ancestors (git merge-base --is-ancestor <sha> origin/rc/1.107.0 fails for each)

After (fa8f352)

  1. For every pick, the added and removed lines match its main commit exactly, all six report identical
  2. pytest on every changed unit test file plus tests/unit/integration_support/test_process.py and tests/unit/caching/test_caching_handler.py gives 183 passed, 1 skipped
  3. pytest --collect-only on the changed integration files collects 104 tests, and on the RSS e2e test and the pin TTL integration file collects 55, with no import errors

Type

🐛 Bug Fix
✅ Test

Caveats (if any)

Medium

  • The CircleCI integration and Buildkite e2e runs on the rc after this merges are the real gate
    • Locally the integration and e2e tests were only collected, not run

Low

QA runbook

The changed e2e tests come from #47160 and #47170 unchanged. Each of those PRs carries its own runbook, and they apply here as written

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

…it wire tests on their own proxy (#47152)

* test(integration): run the bedrock mantle prompt cache and output limit wire tests on their own proxy

These two files register deployments with their own model settings on the
gateway. They now boot a module-scoped proxy on a scratch database, so their
setup cannot affect other tests that share the worker's proxy

* test(integration): seed the isolated gateway with the same router settings as the worker gateway

(cherry picked from commit 603ba6f)
…47160)

#46484 moved the litellm_redis_circuit_breaker_* metrics behind service_callback prometheus_system, so the chaos proxy, which only set callbacks prometheus, stopped exposing them and the breaker assertion read 0

(cherry picked from commit 519906e)
…it as gone (#47148)

WorkerKill returned once the victim's main thread was a zombie. On Linux the
process keeps its sockets open until its last thread exits, so a pooled
keep-alive connection to the killed worker still looked idle and the next
request through it got ECONNRESET. A zombie now counts as gone only once
num_threads() is at most 1. Where psutil cannot read threads of a zombie
(macOS) it raises ZombieProcess, a NoSuchProcess, so the old behavior holds

(cherry picked from commit 0431e75)
…ead order (#47093)

Sync success callbacks run on a thread pool, so the miss and the two
hits can reach the logger in any order. Compare counts instead of the
list order.

(cherry picked from commit 77c2ac1)
…red batches (#47170)

The 48 MB budget on the third batch kept failing on the x86 release gate with no
leak behind it. Isolated rc/1.107.0 and v1.105.1 stacks both grew about 60 MB on
the third batch with gc-tracked objects flat, and both levelled off to a couple of
MB per batch after twenty batches. Measure batches 3-4 against a 200 MB per-worker
ceiling instead, which a native leak of 400 KB per failed request still trips. The
stored-request size check stays the deterministic catch for the v1.100.0 leak

(cherry picked from commit e0514d9)
…n a cache hit (#47144)

* fix(router): read an application profile's base model from metadata on a cache hit

The 1h prompt-cache pin check read base_model only from the top level of
litellm_params. On a response-cache hit the params it sees carry the base
model only under metadata.model_info, so an application-profile ARN
resolved to itself and the pin was written for 5 minutes while the wire
carried a 1h TTL. Read it through get_base_model_from_metadata, which
also checks metadata.model_info

* test(router): pin top-level base_model precedence over metadata model_info

(cherry picked from commit 1e3641a)
@yuneng-berri
yuneng-berri merged commit ab58c55 into rc/1.107.0 Oct 17, 2026
3 of 4 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_still_meadow_1805 branch October 17, 2026 21:21

This branch was successfully deployed

No deployments
e2e-changed — fa8f352e Deployed Oct 17, 2026 by yuneng-berri via oauth #5951
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.

1 participant