Skip to content

chore(release): backport #46711 to stable/1.104.x and cut 1.104.7 - #48293

Merged
yuneng-berri merged 2 commits into
stable/1.104.xfrom
diag-catalog-1.104
Oct 25, 2026
Merged

yuneng-berri merged 2 commits into
stable/1.104.xfrom
diag-catalog-1.104

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

Backports the startup fix from #46711 to stable/1.104.x and cuts 1.104.7. On this line, a proxy or gateway that can't reach the remote model cost map sometimes crashes on boot with an ImportError, and this stops that

Details

TLDR

Problem this solves:

  • Offline or air-gapped boots sometimes exit with a partial-import ImportError
  • The published v1.105.4 images hit it, and this line runs the same code

How it solves it:

User Flow

Before: an operator starts the gateway in a network that can't reach raw.githubusercontent.com and it sometimes dies on boot

  1. They run the gateway image on a network with no outbound DNS
  2. The cost map fetch fails, and the logs warn that it falls back to the local backup
  3. Some starts exit with ImportError: cannot import name 'LoggerContext' from partially initialized module 'litellm.rust_bridge.catalog'

After: the same starts all come up

  1. They run the gateway image on a network with no outbound DNS
  2. The cost map fetch fails, and the logs warn that it falls back to the local backup
  3. The gateway keeps starting and passes its readiness check

Affected release

Regression in v1.104.0, from #42616

What is included

Adaptation notes

#46711 is picked with -x but only its litellm/rust_bridge/diagnostics.py hunk is kept, byte for byte. Its catalog.py, dispatch.py and test_catalog.py hunks are left out because this line's catalog also carries cache and secret manager rule types main didn't have when #46711 landed, so the dispatch.py hunk would read .route off a rule that has none. LoggerRule stays in the catalog with nothing reading it

Known noise on this line

None in the targeted set. The rust_bridge and logging tests pass 1853 of 1853 on stable/1.104.x at 4a8940a and on this branch

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

litellm/rust_bridge/diagnostics.py on stable/1.104.x is byte-identical to stable/1.105.x before and after this change, so the crash and the fix are the same code as #48292. That PR's A/B on the 1.105 gateway image, with the patched file as the only difference, went from 13 of 30 imports and 15 of 45 boots crashing to 0 of both. The same loop against the published 1.104.6 image was not run, see Caveats

Type

🐛 Bug Fix

Caveats (if any)

Medium

Low

  • The boot A/B ran on the 1.105 image only, not on a 1.104.6 image
    • The patched file is identical on both lines
  • LoggerRule stays in this line's catalog with nothing reading it
    • Removing it means touching the cache and secret manager rules too, which main never had to do

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

yujonglee-berri and others added 2 commits October 24, 2026 22:28
…#46711)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit dd0c023)
@yuneng-berri
yuneng-berri merged commit f2a3d34 into stable/1.104.x Oct 25, 2026
9 of 10 checks passed
@yuneng-berri
yuneng-berri deleted the diag-catalog-1.104 branch October 25, 2026 06:01

This branch was successfully deployed

No deployments
e2e-changed — 8fb041eb Deployed Oct 25, 2026 by yuneng-berri via oauth #6043
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