Repository navigation
chore(release): backport #32256, #32277, #32236, #32416, #32405, #32524 onto patch-1.92.0rc1 - #32553
Conversation
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)
|
|
| and isinstance(decrypted_value, str) | ||
| and decrypted_value.startswith("os.environ/") | ||
| ): | ||
| if isinstance(decrypted_value, str) and decrypted_value.startswith("os.environ/"): |
There was a problem hiding this comment.
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.
PR overviewThis 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 |
Relevant issues
Backports six already-merged
litellm_internal_stagingfixes ontopatch-1.92.0rc1(the branch cut at thev1.92.0-rc.1tag) so they ride the pending1.92.0release. No version bump: the rc pyproject already holds1.92.0and that version is unreleased (nov1.92.0image 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 theerror.*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
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
Every pick was cherry-picked with
-xprovenance ontopatch-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
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.pychangesThe DB-sourced env-ref fix runs only under
store_model_in_dbwith 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_paramis byte-identical toorigin/litellm_internal_stagingafter #32405 and that the removed whitelist symbols have no remaining live referencesType
🐛 Bug Fix
🆕 New Feature
🚄 Infrastructure
Changes
Picks in staging merge order, each
git cherry-pick -x:c61ac69->42df77a)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-xfooter points at the recognizable merge SHA and the applied net diff equals the PR's own file changes. A side effect of-m 1is 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_paramon this branch is byte-identical toorigin/litellm_internal_staging, and the_DB_LITELLM_PARAM_ENV_REF_KEYSwhitelist 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 underlitellm/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.