Repository navigation
EN-132: update the SDK proxy and vulnerable Python dependencies - #1196
Merged
Merged
Conversation
LiteLLM 1.91.0 has two proxy bugs that hit benchflow's gateway: - A streaming response stalls and then times out when the cached upstream HTTP handler that issued it is evicted and garbage collected mid-stream (BerriAI/litellm#24929). Fixed in 1.103.0 by BerriAI/litellm#34829, which keeps the handler alive while a response it issued is still reading. - When a client disconnects from a stream whose request carries "metadata": null, the 499 cleanup raises TypeError ("'NoneType' object does not support item assignment") and the rest of that cleanup is skipped. Fixed in 1.93.0 (part of BerriAI/litellm#32258). 1.103.3 is the newest patch on the 1.103 line. It also carries the fix for GHSA-7hp6-4w63-5g45 (1.103.0 itself is affected) and is outside the range of the PYSEC-2026-4066 advisory that pip-audit reports for 1.91.0. Two in-proxy patches needed changes to keep working on 1.103: - LiteLLM now calls AnthropicConfig._is_adaptive_thinking_model with the provider as a second argument. The Bedrock startup patch replaced it with a one-argument gate, so every Claude request through the proxy failed with TypeError. The gate now forwards extra arguments, and the preflight calls the gate the way the transforms do, so this kind of breakage fails closed before the agent starts. - The Gemma pass-through patch switched itself off once EndpointType.GEMINI existed, but LiteLLM's pass-through route still classifies AI Studio generateContent URLs as Vertex AI, so Gemma streams lost their callback (usage and trajectory) again. The patch now stays installed and only intercepts AI Studio paths LiteLLM labelled as Vertex AI. The relock lets cryptography resolve to 50.0.2, which fixes every advisory the pip-audit job was ignoring, so the ignores are removed.
xdotli
temporarily deployed
to
pypi-internal-preview
October 25, 2026 10:52 — with
GitHub Actions
Inactive
xdotli
temporarily deployed
to
pypi-internal-preview
October 25, 2026 10:55 — with
GitHub Actions
Inactive
xdotli
temporarily deployed
to
pypi-internal-preview
October 25, 2026 11:00 — with
GitHub Actions
Inactive
xdotli
marked this pull request as ready for review
October 25, 2026 11:06
xdotli
temporarily deployed
to
pypi-internal-preview
October 25, 2026 11:06 — with
GitHub Actions
Inactive
xdotli
added a commit
that referenced
this pull request
Nov 6, 2026
The 0.9 line, from the accepted 0.9.0 source: the Python SDK and CLI rebuilt after 0.7.11, with the static bfx helper for sandbox operations. 0.9.1 is 0.9.0 with ten fixes from the 0.10 line, LiteLLM 1.103.3 with patched TLS and HTTP clients (as #1196), the two trajectory fixes of #1165, the build backend pinned (hatchling 1.32.4), refreshed default models and a leak gate on every release artifact. CHANGELOG.md lists the changes under [0.9.1] and [0.9.0].
This branch was previously 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.
The SDK's pinned proxy is affected by the authenticated admin-escalation/RCE advisory GHSA-7hp6-4w63-5g45, and its lock contains vulnerable TLS, HTTP and environment-creation dependencies. Pin the proxy to LiteLLM 1.103.3 and update the affected packages while preserving the provider behavior needed for scoring and trajectory capture.
This PR incorporates both commits from #1166 with their authorship/history, retaining the Bedrock adaptive-thinking gate/preflight and Google AI Studio logging compatibility fixes. A bare dependency bump would break those paths. The original contributor's fork is untouched; this organization branch provides one reviewable candidate including the security updates.
Changes:
Validation:
uv lock --check,uv pip check,ruff check .,ty check src/and changed-file formatting all pass..pth,sitecustomize.pyorusercustomize.pystartup hooks.uv runsubprocess timeout. That same judge fail-closed case passes in 4.06 seconds with the shared package-artifact cache and the same scrubbed HOME/environment, without bypassing synchronization. No production credentials are supplied; the bundled LiteLLM cost map is used.The non-required external agents-manifest parity check fails only on OpenClaw
install_cmd: agents main installs its canonical prompt helper plus threaded/effort-aware shim, whereas SDK core embeds an older monolithic shim. The remaining config fields and version pins match. Resolving that drift requires a separately reviewed OpenClaw adapter adoption; branch protection does not require this check.Compatibility and rollout: LiteLLM releases after 1.91 use native wheels. Linux hosts need glibc >=2.28 or a compatible musl wheel; older hosts require an image update or source-build toolchain. Merge/review this candidate, then publish through the existing release process and rebuild/reinstall consumers and sandbox images. Existing exact-version consumers do not acquire these changes automatically. No SDK release, running job, service or deployed environment is changed by this PR.
Linear: EN-132. Dependency work is also tracked under EN-133.
Remaining bootstrap reproducibility gap: boto3, dynamically requested provider packages and their transitive dependencies still resolve independently of
uv.lock; the fallback pip upgrade and the existing uv installer are also unpinned. The current installer has no hash/constraint-file anchoring support. This patch pins the reviewed security-sensitive application requirements without introducing a cross-platform lock over dynamic provider extras; a fully hashed gateway wheelhouse/image remains separate release work.