Skip to content

chore(release): backport #32256, #32405, #32524 to stable/1.91.x and cut 1.91.1 - #32552

Merged
yuneng-berri merged 5 commits into
stable/1.91.xfrom
litellm_backport_1_91_x_0708
Jul 8, 2026
Merged

chore(release): backport #32256, #32405, #32524 to stable/1.91.x and cut 1.91.1#32552
yuneng-berri merged 5 commits into
stable/1.91.xfrom
litellm_backport_1_91_x_0708

Conversation

@yuneng-berri

Copy link
Copy Markdown
Collaborator

Relevant issues

Backports three merged fixes from litellm_internal_staging onto stable/1.91.x and cuts 1.91.1.

The first two restore consistent os.environ/ reference resolution for DB-sourced models, matching what the YAML config path has always done. On 1.91.0 a model stored in the DB with an env-ref auth field (for example aws_role_name: os.environ/BEDROCK_ASSUME_ROLE_ARN) reached the provider as the literal string instead of the resolved value, because an earlier change (#30867, present on this line) stopped expanding those references at request time and the DB-load path only re-expanded a short hardcoded allowlist. #32256 extends that allowlist to cover every AWS auth field; #32405 then removes the allowlist and the team-scope short-circuit entirely so the DB-load resolver expands os.environ/ on every string field, which is the same behavior as the YAML path and removes the recurring "add one more field to the allowlist" failure mode.

The third restores v1-parity error detail on OpenTelemetry v2 failure spans (#32524, LIT-4179) so backends that index span attributes see the full error shape again, not only error.type.

Linear ticket

Pre-Submission checklist

  • 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 received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

What is included

Cherry-picked from staging in merge order, each with a cherry picked from commit footer:

Followed by the version bump to 1.91.1 and the uv.lock refresh. 1.91.0 has already shipped, so the line needs a new patch.

Behavior note worth calling out for reviewers: #32405 removes the _db_model_is_team_scoped short-circuit, so after this change team-scoped DB models resolve os.environ/ references the same way admin-scoped rows do. That is intentional and matches the staging change; the write side stays gated (only an admin can author unscoped rows, only a team admin can author that team's rows) and the request-body vector remains blocked by _BANNED_REQUEST_BODY_PARAMS.

Adaptation notes

Known noise on this line

None. The targeted baseline (the three test files these PRs touch) was fully green on the bare line tip before any pick: 166 passed, 0 failures. After the picks it is 174 passed, 0 failures (the delta is the new regression tests the picks add).

Screenshots / Proof of Fix

Live proxy on this branch, backed by a real Postgres with store_model_in_db: true. Model rows are created through /model/new (so they travel the DB-load path this change touches) and read back through /v2/model/info.

Admin-scoped model, aws_role_name set to an env-ref, resolves to the real value:

$ export FOO_ARBITRARY="admin-arbitrary-resolved"
$ curl -sS -X POST http://localhost:4011/model/new -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
    -d '{"model_name":"repro-admin","litellm_params":{"model":"openai/gpt-4o-mini","api_key":"sk-fake-not-used","aws_role_name":"os.environ/FOO_ARBITRARY"}}'

$ curl -sS "http://localhost:4011/v2/model/info" -H "Authorization: Bearer sk-1234" | jq -c '.data[] | select(.model_name=="repro-admin") | {model_name, aws_role_name: .litellm_params.aws_role_name}'
{"model_name":"repro-admin","aws_role_name":"admin-arbitrary-resolved"}

Arbitrary non-allowlisted field resolves too, which is the point of dropping the allowlist:

$ curl -sS -X POST http://localhost:4011/model/new -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
    -d '{"model_name":"repro-arbitrary","litellm_params":{"model":"openai/gpt-4o-mini","api_key":"sk-fake-not-used","some_future_field":"os.environ/FOO_ARBITRARY"}}'

$ curl -sS "http://localhost:4011/v2/model/info" -H "Authorization: Bearer sk-1234" | jq -c '.data[] | select(.model_name=="repro-arbitrary") | {model_name, some_future_field: .litellm_params.some_future_field}'
{"model_name":"repro-arbitrary","some_future_field":"admin-arbitrary-resolved"}

Negative control, the request-body vector stays blocked:

$ curl -sS -o /dev/null -w "HTTP=%{http_code}\n" -X POST http://localhost:4011/v1/chat/completions -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
    -d '{"model":"repro-admin","messages":[{"role":"user","content":"hi"}],"aws_role_name":"os.environ/DATABASE_URL"}'
HTTP=401

The team-scoped resolution path (/model/new with a team_id) is Enterprise-gated at write time, so it is not shown here as a live curl; it is covered by the unit test test_ProxyConfig__add_deployment_resolves_team_env_refs, and mechanically it now follows the exact same resolver shown above once the team-scope short-circuit is removed.

#32524 is additive observability behavior on OTel v2 failure spans; it is covered by the extended tests under tests/test_litellm/integrations/otel/ (including a byte-for-byte v1 attribute-key parity test and a per-field guard), which pass on this branch. The staging PR carries the Jaeger before/after capture.

Targeted test delta on this branch: 174 passed, 0 failures (baseline 166 passed, 0 failures). A deep multi-agent behavioral stress-test (confirm and refute lenses plus an audit pass) returned SURVIVED on all three sub-claims (every referenced symbol resolves; the picks' own tests pass as a positive delta over the clean baseline; no existing caller of the modified functions breaks) with zero verified findings.

Type

🐛 Bug Fix

Changes

litellm/proxy/proxy_server.py: DB-load env-ref resolution no longer gates on a key allowlist or on team-scope; ProxyConfig._resolve_db_litellm_param expands any string value beginning with os.environ/. The _DB_LITELLM_PARAM_ENV_REF_KEYS allowlist and the _db_model_is_team_scoped helper are removed.

litellm/integrations/otel/: the v2 emitter stamps error.code, error.stack_trace, error.llm_provider, and error.message in addition to error.type on failure spans, with keys matching the v1 integration; the detail keys are stamped per field so message-only errors are not padded with empty attributes.

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

(cherry picked from commit 7d13f03)
…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)
@yuneng-berri
yuneng-berri requested a review from a team July 8, 2026 22:44
@BerriAI BerriAI deleted a comment from greptile-apps Bot Jul 8, 2026
@BerriAI BerriAI deleted a comment from veria-ai Bot Jul 8, 2026
@BerriAI BerriAI deleted a comment from veria-ai Bot Jul 8, 2026
@yuneng-berri
yuneng-berri enabled auto-merge July 8, 2026 23:00
@yuneng-berri
yuneng-berri merged commit cdc8c72 into stable/1.91.x Jul 8, 2026
50 of 52 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_backport_1_91_x_0708 branch July 8, 2026 23:01
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request Jul 9, 2026
….1) (#1475)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | patch | `v1.91.0` → `v1.91.1` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.91.1`](https://github.com/BerriAI/litellm/releases/tag/v1.91.1)

[Compare Source](BerriAI/litellm@v1.91.1...v1.91.1)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.91.1/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(release): backport [#&#8203;32256](BerriAI/litellm#32256), [#&#8203;32405](BerriAI/litellm#32405), [#&#8203;32524](BerriAI/litellm#32524) to stable/1.91.x and cut 1.91.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;32552](BerriAI/litellm#32552)

**Full Changelog**: <BerriAI/litellm@v1.91.0...v1.91.1>

### [`v1.91.1`](https://github.com/BerriAI/litellm/releases/tag/v1.91.1)

[Compare Source](BerriAI/litellm@v1.91.0...v1.91.1)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.91.1/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(release): backport [#&#8203;32256](BerriAI/litellm#32256), [#&#8203;32405](BerriAI/litellm#32405), [#&#8203;32524](BerriAI/litellm#32524) to stable/1.91.x and cut 1.91.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;32552](BerriAI/litellm#32552)

**Full Changelog**: <BerriAI/litellm@v1.91.0...v1.91.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1475
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request Jul 9, 2026
….1) (#488)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | patch | `v1.91.0` → `v1.91.1` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.91.1`](https://github.com/BerriAI/litellm/releases/tag/v1.91.1)

[Compare Source](BerriAI/litellm@v1.91.1...v1.91.1)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.91.1/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(release): backport [#&#8203;32256](BerriAI/litellm#32256), [#&#8203;32405](BerriAI/litellm#32405), [#&#8203;32524](BerriAI/litellm#32524) to stable/1.91.x and cut 1.91.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;32552](BerriAI/litellm#32552)

**Full Changelog**: <BerriAI/litellm@v1.91.0...v1.91.1>

### [`v1.91.1`](https://github.com/BerriAI/litellm/releases/tag/v1.91.1)

[Compare Source](BerriAI/litellm@v1.91.0...v1.91.1)

##### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](BerriAI/litellm@0112e53).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.91.1/cosign.pub \
  ghcr.io/berriai/litellm:v1.91.1
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

##### What's Changed

- chore(release): backport [#&#8203;32256](BerriAI/litellm#32256), [#&#8203;32405](BerriAI/litellm#32405), [#&#8203;32524](BerriAI/litellm#32524) to stable/1.91.x and cut 1.91.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;32552](BerriAI/litellm#32552)

**Full Changelog**: <BerriAI/litellm@v1.91.0...v1.91.1>

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/488
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.

2 participants