Skip to content

chore(release): backport #32256, #32277, #32236, #32416, #32405, #32524 onto patch-1.92.0rc1 - #32553

Merged
yuneng-berri merged 6 commits into
patch-1.92.0rc1from
litellm_backport_patch_192rc1
Jul 8, 2026
Merged

yuneng-berri merged 6 commits into
patch-1.92.0rc1from
litellm_backport_patch_192rc1

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Backports six already-merged litellm_internal_staging fixes onto patch-1.92.0rc1 (the branch cut at the v1.92.0-rc.1 tag) so they ride the pending 1.92.0 release. No version bump: the rc pyproject already holds 1.92.0 and that version is unreleased (no v1.92.0 image on DockerHub or GHCR, no tag, no release branch), so the picks join the pending version rather than cutting a new one.

The set covers three areas. Two proxy fixes make DB-sourced model configs resolve os.environ/ references the same way the YAML config path does, so Bedrock (and any other) auth fields stored as env refs reach the provider as the real secret instead of the literal string. One infra change bumps the wolfi-base image digest to pick up patched glibc (2.43-r10). Two OpenTelemetry v2 changes restore the error.* span attributes and stamp time-to-first-chunk on streaming spans. One UI change stops the MCP server create modal from discarding an in-flight OAuth token exchange on the post-redirect remount.

Linear ticket

Pre-Submission checklist

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

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Every pick was cherry-picked with -x provenance onto patch-1.92.0rc1, then verified on the line.

Targeted unit tests, judged as a delta against a pre-pick baseline captured on the rc tip. Baseline was 239 passed / 0 failed across the four target files; post-pick is 250 passed / 0 failed, so the eleven tests the picks add all pass and nothing that passed before regressed

# baseline (before any pick), from inside the worktree
$ uv run --extra proxy pytest -q tests/test_litellm/proxy/proxy_server/test_proxy_config.py \
    tests/test_litellm/integrations/otel/test_otel_v2_components.py \
    tests/test_litellm/integrations/otel/test_otel_v2_sources_of_truth.py \
    tests/test_litellm/integrations/otel/test_otel_v2_logger.py
239 passed, 3 warnings in 28.80s

# after the six picks
$ uv run --extra proxy pytest -q <same four files>
250 passed, 3 warnings in 30.40s

Live proxy sanity on the picked branch (real OpenAI call, not a mock), before and after the picks, to confirm the proxy still boots and serves after the proxy_server.py changes

$ curl -s -X POST "http://localhost:4001/v1/chat/completions" \
    -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
    -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"reply with exactly: backport-post-ok"}],"max_tokens":20}' \
    | jq -r '.choices[0].message.content, .usage.total_tokens'
backport-post-ok
19

The DB-sourced env-ref fix runs only under store_model_in_db with rows loaded from Postgres, so its behavioral proof here is the unit set above (which builds DB-shaped rows and asserts resolution of admin, team, and arbitrary fields) rather than a live DB write; the end-to-end live-proxy reproduction against real Postgres is in the source PRs (#32256, #32405)

A multi-agent adversarial regression pass (7 investigation lenses, 2 rounds) came back with no regressions across three checks: every symbol the picks reference resolves on this line, every test each PR adds passes here, and no existing caller of the modified functions breaks. It independently re-confirmed that _resolve_db_litellm_param is byte-identical to origin/litellm_internal_staging after #32405 and that the removed whitelist symbols have no remaining live references

Type

🐛 Bug Fix
🆕 New Feature
🚄 Infrastructure

Changes

Picks in staging merge order, each git cherry-pick -x:

Adaptation notes

Three of the six PRs merged to staging as merge commits rather than squashes (#32256, #32277, #32405), so they were picked with git cherry-pick -x -m 1 <mergeSha>; the -x footer points at the recognizable merge SHA and the applied net diff equals the PR's own file changes. A side effect of -m 1 is that the commit carries the person who merged the PR as author and keeps the "Merge pull request #N" subject line instead of the original commit message. The three squash-merged PRs (#32236, #32416, #32524) were picked directly and preserve original authorship.

#32405 is the only pick flagged ADAPTED by patch-id; a range-diff confirms the only differences from the source are that author and commit-message metadata, with zero code-hunk differences. The resulting _resolve_db_litellm_param on this branch is byte-identical to origin/litellm_internal_staging, and the _DB_LITELLM_PARAM_ENV_REF_KEYS whitelist is removed, so the env-ref section lands exactly as if #32256 then #32405 were merged.

Known noise on this line

The pre-pick baseline for the four target test files was fully green (0 failures), so there is no test noise to discount. The local verification proxy logs Redis connection errors against an unreachable cache host; that is pre-existing infra noise from the shared dev config, present in the baseline, and unrelated to these picks (none touch the cache path).

Pending before release

#32416 changes production UI source (create_mcp_server.tsx). The prebuilt Next.js bundle under litellm/proxy/_experimental/out/ is NOT rebuilt in this PR. The UI must be rebuilt from source so the shipped bundle reflects this change; a Docker image build does this from source automatically, but a PyPI wheel ships the committed bundle, so that path needs the rebuild before it goes out.

yuneng-berri and others added 6 commits July 8, 2026 15:35
fix(proxy): resolve os.environ/ refs for all AWS auth params in DB-sourced models

(cherry picked from commit 7d13f03)
fix(docker): bump wolfi-base digest for glibc 2.43-r10

(cherry picked from commit 7f99148)
…ates

fix(proxy): resolve os.environ/ refs universally in DB-sourced models

(cherry picked from commit ec4f324)
…9) (#32524)

The v2 emitter has never stamped error.message / error.code /
error.stack_trace / error.llm_provider as span attributes; only error.type
reached the wire. Backends that flatten span attributes into label
indexes (Elastic APM labels.error_*, Datadog span tags) lost these
four fields when v2 became the active integration on v1.90+ for
otel_v2-flagged deployments. The pre-existing exception span event
carrying the full message (LIT-3758) is unchanged; the message now
rides both places at once, matching v1s shape.

SpanError grows three optional detail fields; _parse_error threads
them from StandardLoggingPayloadErrorInformation; the emitters error
branch stamps them via a new module-level helper, guarded per field so
guardrail-shape errors are not polluted with empty attributes. New
semconv constants mirror open_inference.ErrorAttributes byte-for-byte,
so v1 and v2 consumers read the same keys.

Regression tests extend the mapped test files under
tests/test_litellm/integrations/otel/. pytest reports 243 passed.

(cherry picked from commit 85d1fe6)
@CLAassistant

CLAassistant commented Jul 8, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ tin-berri
✅ yuneng-berri
✅ yucheng-berri
❌ yassin-berriai
You have signed the CLA already but the status is still pending? Let us recheck it.

@yuneng-berri
yuneng-berri merged commit d2b4f49 into patch-1.92.0rc1 Jul 8, 2026
4 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_backport_patch_192rc1 branch July 8, 2026 23:20
@BerriAI BerriAI deleted a comment from greptile-apps Bot Jul 8, 2026
@BerriAI BerriAI deleted a comment from greptile-apps Bot Jul 8, 2026
@BerriAI BerriAI deleted a comment from greptile-apps Bot Jul 8, 2026
and isinstance(decrypted_value, str)
and decrypted_value.startswith("os.environ/")
):
if isinstance(decrypted_value, str) and decrypted_value.startswith("os.environ/"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High: Team model env references expose server secrets

This now resolves every os.environ/ value from DB rows, including team-scoped models that team admins can create via /model/new. A team admin can store an env ref in a non-sensitive-named LiteLLM param, or combine api_key: os.environ/LITELLM_MASTER_KEY with an attacker-controlled api_base, and have the proxy load the actual server secret and expose it through model metadata or forward it as an upstream credential. Keep env-ref resolution limited to proxy-admin-owned rows, or reject os.environ/ values on team-scoped model params.

@veria-ai

veria-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PR overview

This release backport brings several upstream changes onto the patch-1.92.0rc1 branch, including updates in the LiteLLM proxy server’s handling of stored model configuration parameters.

There is one open security issue involving environment-variable references in team-scoped model configuration. A team admin can cause the proxy to resolve server-side secrets from stored model parameters and potentially expose them or forward them as upstream credentials. No issues have been addressed yet, so the PR still carries a high-impact secret exposure risk until env-reference handling is restricted or rejected for team-owned rows.

Open issues (1)

Fixed/addressed: 0 · PR risk: 8/10

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.

5 participants