Skip to content

chore(litellm): bump proxy v1.92.0 -> v1.108.13 (LTS) - #1369

Merged
PixelJonas merged 2 commits into
mainfrom
chore/litellm-1108-lts
Nov 23, 2026
Merged

PixelJonas merged 2 commits into
mainfrom
chore/litellm-1108-lts

Conversation

@PixelJonas

@PixelJonas PixelJonas commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Bumps the shared LiteLLM proxy from v1.92.0 (2026-07-12) to v1.108.13, the newest 1.108.x LTS patch.

 components-apps/litellm/litellm-app.yaml
   image:
     repository: ghcr.io/berriai/litellm
-    digest: sha256:9ef6f45b…   # v1.92.0
+    tag: v1.108.13-lts@sha256:65a9631f…   (multi-arch index; v1.108.13, v1.108.13-lts and lts all resolve to it)

Merge on 2026-11-23 (after the 3-day quarantine), and only after #1370.

Why: PixelJonas/ingestbuddy#155. LiteLLM turns response_format: json_schema into a forced json_tool_call tool for vertex_ai/claude-sonnet-5. The tool input isn't enforced, and v1.92.0 only unwraps a values key. So 5 of 88 tax extractions came back as {"object": {…}}, {"value": {…}} or {"json_value": {…}}. Upstream fixed this in BerriAI/litellm#45871 ("unwrap tool-emulated json_schema envelopes and send output_config.format for Claude"), with the follow-up #46337. Both are in v1.108.0 and later, so v1.108.13 has them. The fix applies to every consumer (taxbuddy has the same client-side gap). ingestbuddy keeps its own workaround from PR 156.

Why it sat on v1.92.0: it wasn't held on purpose. Commit a4730b4 (2026-07-24, a hardening spike) replaced tag: with a digest-only pin. Renovate's app-template regex needs repository: + tag:, so it hasn't seen this image since then (the Renovate Dashboard lists only app-template for this file). This PR pins the image as tag: v1.108.13-lts@sha256:…. The digest still fixes the content (a4730b4's goal), and the tag makes the image visible to Renovate again. With docker versioning, the -lts suffix keeps updates on the LTS line. #1370 turns automerge off for this image and puts the dump checklist into every LiteLLM Renovate PR. Merge #1370 first, so no LTS patch can be automerged in between.

Evidence

Offline unwrap proof. This runs litellm.completion(model="vertex_ai/claude-sonnet-5", response_format=json_schema) end to end, with the HTTP POST and the Vertex token mocked. The schema mirrors ingestbuddy's TaxExtractionResult: closed, with required vendor, doc_date, steuerjahr, betrag, ust, dokumenttyp, confidence. All values are synthetic.

  • Before (litellm 1.106.12, which doesn't have the fix either):
    object     -> content==X: False
    value      -> content==X: False
    json_value -> content==X: False
    legit      -> content==X: True
    FAIL
    
    After (litellm 1.108.13):
    object     -> content==X: True
    value      -> content==X: True
    json_value -> content==X: True
    legit      -> content==X: True
    request tools: ['json_tool_call'] | tool_choice: json_tool_call | output_config.format: None
    ALL PASS
    
    On Vertex, claude-sonnet-5 still goes through the forced-tool path, so the unwrap is what fixes PixelJonas/ingestbuddy#155. The native output_config.format path doesn't apply to this model.

Migration rehearsal on a local Postgres 18.6 loaded with the prod schema and the _prisma_migrations ledger (130 rows), schema only, no data:

  • v1.108.13 (--skip_server_startup): Using v2 migration resolver → 90 migrations applied → All migrations have been successfully applied. → Request-log indexes are all in place. Ledger 220/220 finished, total 58 s. The server then boots with our config.yaml, and /health/readiness returns 200 with db: connected.
  • v1.92.0 rollback on the migrated schema: No pending migrations to apply. → No pending migrations — skipping post-migration sanity check. pg_dump --schema-only is identical before and after. The server boots and reads a model and a key that v1.108.13 wrote (the litellm_params encrypted by the new version decrypt fine). It also writes its own.

./scripts/validate_manifests.sh -d components-apps/litellm passes. app-template 5.3.0 renders image: ghcr.io/berriai/litellm:v1.108.13-lts@sha256:65a9631f…. The regex manager captures currentValue: v1.108.13-lts plus currentDigest.

Breaking changes from v1.92.0 to v1.108.13 that touch this deployment

Sources: the 45 !-marked commits and the one BREAKING CHANGE: footer in v1.92.0..v1.108.13, filtered to our providers (vertex_ai Claude, openai, openai-compatible vLLM/kimi/whisper/tts, nvidia_nim, gemini image, elevenlabs) and our settings.

Change Applies because Action
Proxy refuses to boot with an unset, empty or public (sk-1234) master key (fe48053) master key comes from os.environ/LITELLM_MASTER_KEY none. Checked in the pod by hash without printing it: set, non-empty, not the public default.
Config file now wins over DB-stored settings; dashboard writes to config-owned keys return 400 (afa4a6f) config.yaml declares master_key, drop_params, additional_drop_params, set_verbose; the DB also stores litellm_settings none. The DB copies of drop_params/additional_drop_params hold the same values (true, ["dimensions"]). DB-only general_settings/router_settings (fallbacks, aliases, health check, retention) stay DB-owned. Change those two keys in litellm-config.yaml, not the UI.
Prisma: 90 new migrations, v2 resolver now the default (no diff-and-force) the proxy migrates at startup none. All changes to existing tables add a nullable column or a NOT NULL DEFAULT one, plus new indexes, FKs and tables. Rehearsed above. Take the dump below first.
Fallback budget enforced by default (cfe65f7): an over-budget key no longer reaches fallbacks router fallbacks are configured; some keys carry max_budget none today (no key is over budget). Opt-out is general_settings.enforce_fallback_budget: false.
Mock request params (mock_response, …) rejected unless dangerously_allow_mock_testing_request_params (594d0d7) shared proxy none expected; no prod consumer should send them.
More provider-shaped 4xx (unknown model → 400; count_tokens errors returned instead of local counts) (784581b, b21e659) all consumers none. Consumers already handle 4xx. Watch logs (checklist).
safety_identifier refused unless dropped (546402c) drop_params: true none; covered by drop_params.
Per-deployment workload identity on openai non-chat routes (099b914) bge-m3 embeddings, whisper, tts via openai/ none; only applies when workload identity is configured.
Embeddings / additional_drop_params: ["dimensions"] bge-m3 none; still honored. Verified in the checklist.
MCP (stdio off by default, OAuth), JWT key mapping, SSO, guardrails, Bedrock, Lens, shadow eval — n/a: none of these are in use (no MCP servers, JWT mappings or guardrail rows).
Env vars DATABASE_URL, LITELLM_MASTER_KEY, STORE_MODEL_IN_DB, GOOGLE_APPLICATION_CREDENTIALS, NVIDIA_NIM_API_KEY — none; all still read. set_verbose now only logs a deprecation warning.
fix(anthropic)!: drop beta-gated body fields under drop_params (#48793) — not in v1.108.x (only in 1.109.3+ and 1.110.2). Revisit on the next bump.

The spendlog-toolindex-cleanup CronJob only touches LiteLLM_SpendLogToolIndex(start_time, request_id) and LiteLLM_SpendLogs(request_id). Those columns don't change; 1.108 only adds a start_time index, which speeds the job up.

Backup and rollback

Backup, right before merge. CNPG's on-demand Backup isn't available: litellm-db has no backup/plugins config. Use pg_dump per docs/runbooks/database-restore.md: write to a file in the pod, read it back, then make a hash-verified copy.

F=/run/litellm-pre-1108-$(date -u +%Y%m%dT%H%M%SZ).dump      # /run = emptyDir in the DB pod
oc exec -n litellm litellm-db-1 -c postgres -- sh -c \
  "umask 077; pg_dump -U postgres -d litellm -Fc -f $F && pg_restore -f /dev/null $F && stat -c %s $F && sha256sum $F"
oc exec -n litellm litellm-db-1 -c postgres -- cat $F > <durable dir>/litellm-pre-1108.dump
sha256sum <durable dir>/litellm-pre-1108.dump                 # must equal the in-pod hash
oc exec -n litellm litellm-db-1 -c postgres -- rm -f $F

A test run on 2026-11-20 produced 1,133,904 bytes (1.1 MiB, 66 tables with data). The full read-back returned rc 0 and the hashes matched. Both copies were then deleted. The nightly database-psql-backup (03:00) plus VolSync (05:12) are the second layer.

Rollback:

  1. Revert this PR. Argo CD rolls back to the v1.92.0 digest (the digest-only pin, which Renovate doesn't see). v1.92.0 finds no pending migrations, skips its schema diff, and runs on the migrated schema (rehearsed). Columns and tables that 1.108 added stay in place, unused. No DB restore needed for a version rollback.
  2. Restore the DB only if 1.108 damaged data (not just the schema). Pause the app's Argo CD auto-sync, stop the proxy, recreate an empty public schema owned by litellm, then copy the dump in, verify its hash and pg_restore it per the runbook (never oc exec … | psql). Restore the v1.92.0 pin before starting the proxy again.

Post-deploy checklist

Before merging:

  • chore(renovate): track LiteLLM's -lts line without automerge #1370 merged (LiteLLM: no automerge).
  • Dump taken and hash-verified (above).
  • ingestbuddy/taxbuddy have no in-flight LLM work. The Recreate strategy means roughly 1–2 min of LiteLLM downtime (image pull, migrations, boot), and in-flight calls fail. For ingestbuddy, check that the jobs:reocr StartedJobRegistry is empty.

After Argo CD syncs:

  • Pod Running on sha256:65a9631f…. Logs show All migrations have been successfully applied. and Request-log indexes are all in place. _prisma_migrations has 220 rows, all finished, none rolled back.
  • GET /health/readiness → status: healthy, db: connected. GET /model/info lists the same 22 models.
  • claude-sonnet-5 with response_format: json_schema (closed schema, synthetic prompt): content parses as the schema object, with no wrapper key.
  • One chat call per other model family in use: another vertex Claude (claude-sonnet-4-6 / claude-opus-5-5), kimi-k3.1, midgard-qwen3.6-27b, one nvidia-*, gpt-5-nano (429 is expected while the OpenAI account has no credits, same as before). Also whisper-large-v3 (transcription) and tts-local (speech).
  • Embeddings: bge-m3 with dimensions set → 200, dimensions dropped, vector length unchanged.
  • 30 min of ingestbuddy worker, taxbuddy (doc-pipeline, agent-runtime, knowledge-service), taxbuddy-hermes and vehicle-pipeline logs: no new LiteLLM 4xx/5xx.
  • Next night: spendlog-toolindex-cleanup (02:30) and database-psql-backup (03:00) succeed.

Merge Danger

Door: two-way. Schema changes are additive and the rollback to v1.92.0 was rehearsed on the prod schema. Data written into new columns after the upgrade is ignored by v1.92.0.

Blast Radius: shared.

Every LiteLLM consumer goes through this proxy: ingestbuddy, taxbuddy, taxbuddy-hermes, vehicle-pipeline, hogwarts, and external callers via the Route. Expect a short outage during the Recreate rollout. v1.108.13 was published 2026-11-20, so merging on 2026-11-23 matches the 3-day quarantine that Renovate applies everywhere else in this repo.

🤖 Generated with Claude Code

PixelJonas and others added 2 commits November 20, 2026 16:09
v1.108.13 carries BerriAI/litellm#45871 and #46337: on vertex_ai Claude
the response_format json_tool_call answer is unwrapped from invented
envelopes ({"object": ...}, {"value": ...}, {"json_value": ...}).
v1.92.0 only unwrapped "values", which hit 5 of 88 ingestbuddy tax
extractions on claude-sonnet-5 (ingestbuddy#155).

Pinned to the multi-arch index digest of the v1.108.13 tag (same as the
current lts tag). The proxy applies 90 additive Prisma migrations at
startup; a rehearsal on a copy of the prod schema showed v1.92.0 still
boots on the migrated schema, so a pin revert is the rollback.

Also notes on the pin that Renovate does not track digest-only refs,
which is why the image sat on v1.92.0 since the digest pin of 2026-07-24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tag: v1.108.13-lts@sha256:65a9...` resolves to the same index digest as
before (v1.108.13, v1.108.13-lts and lts all point to it), so the content
stays digest-pinned as a4730b4 intended. The tag lets the app-template
regex manager see the image again; with docker versioning the -lts
suffix restricts updates to the LTS line. The LiteLLM packageRule in
.github/renovate/base.json5 turns automerge off for it.

Rendered with app-template 5.3.0:
ghcr.io/berriai/litellm:v1.108.13-lts@sha256:65a9631f...

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PixelJonas added a commit that referenced this pull request Nov 20, 2026
The LiteLLM image sat on v1.92.0 for four months because its digest-only
pin is invisible to the app-template regex manager. home-ops#1369 moves it
to `tag: v1.108.13-lts@sha256:...`; this rule makes sure the resulting
Renovate PRs are never automerged: the proxy applies Prisma migrations at
startup, so each bump needs a DB dump first. The PR body note carries
that checklist.

Docker versioning keeps the -lts suffix, so only LTS releases are
proposed. ghcr.io has no release timestamps, so the 3-day age gate does
not apply to this image; the manual review covers it.

The rule matches no dependency until #1369 lands, so merging it first
leaves no window in which an LTS patch could be automerged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@PixelJonas
PixelJonas marked this pull request as ready for review November 23, 2026 07:56
@PixelJonas
PixelJonas merged commit f143ba0 into main Nov 23, 2026
10 checks passed
@PixelJonas

Copy link
Copy Markdown
Owner Author

Merged 07:56 UTC and rolled out by 07:57:15. Checklist results:

Before merge

  • chore(renovate): track LiteLLM's -lts line without automerge #1370 merged.
  • Dump taken and hash-verified: pg_dump -Fc, 1,461,647 bytes, sha256 ab4a788f…. The in-pod pg_restore -f /dev/null read-back passed, the local copy's hash matches, and the in-pod copy is deleted. It's stored on the operator workstation.
  • No in-flight LLM work: ingestbuddy BUSY 0 (incl. jobs:reocr), taxbuddy RQ with no started or queued jobs, and no LiteLLM call in the last 10 min from taxbuddy, taxbuddy-hermes or vehicle-pipeline.

After sync

  • Pod Running, 0 restarts. imageID sha256:3ee7c8a1…, which is the linux/amd64 entry of the pinned index 65a9631f….
  • The log shows Using v2 migration resolver, All migrations have been successfully applied. and Request-log indexes are all in place, with 0 ERROR/Traceback lines. _prisma_migrations went from 130 to 220, all finished, 0 rolled back.
  • /health/readiness returns healthy, db: connected.
  • /model/info lists 23 models instead of 22. The extra one is auto_router, which has been in LiteLLM_ProxyModelTable since 2026-06-05 (the DB has 23 rows). v1.92 didn't list it; v1.108 does. No model is missing.
  • claude-sonnet-5 with json_schema (closed, strict, synthetic tax-like prompt), 3 runs: keys betrag, confidence, doc_date, vendor, no wrapper key in any run. This is the PixelJonas/ingestbuddy#155 fix.
  • Chat calls:
    • claude-sonnet-4-6, claude-opus-5-5 and kimi-k3.1 return 200.
    • gpt-5-nano returns 429 "no credits", as expected.
    • midgard-qwen3.6-27b times out: midgard is down, its last success was 2026-11-21 16:15, and ingestbuddy doctor reported it unavailable before the merge too.
    • nvidia-glm-5-3-flash didn't answer within 240 s on the client side, but the spend log records the call as a success at 08:02:10. It's slow, not broken, and it had no other calls in 7 days.
  • whisper-large-v3 and tts-local: TTS output fed into whisper came back as exactly "This is a synthetic test.".
  • Embeddings: bge-m3 with dimensions: 256 returns 200 and a vector of length 1024 (dropped as configured).
  • End to end: ingestbuddy doctor (worker) gives 21 ok, 0 fail through the new proxy (kimi-k3.1, claude-sonnet-5, bge-m3).
  • 30 min of consumer logs: follows below.
  • Next night: spendlog-toolindex-cleanup (02:30) and database-psql-backup (03:00).

@PixelJonas
PixelJonas deleted the chore/litellm-1108-lts branch November 23, 2026 09:49
@PixelJonas

Copy link
Copy Markdown
Owner Author

Remaining checklist items, 2026-11-24:

  • Consumer traffic since the upgrade (spend log from 07:58 UTC on 11-23): claude-sonnet-5 77 calls, kimi-k3.1 33, bge-m3 16, whisper-large-v3 8, and the TTS models all succeed. The failure rate hasn't gone up: 6 of 887 calls on 11-23 and 3 of 62 so far on 11-24, against 5–22 a day the week before. Since the upgrade:
    • midgard-qwen3.6-27b 500 and gpt-5-nano 429: my own checklist probes (midgard down, no OpenAI credits).
    • 5 × No api key passed in.: unauthenticated calls, which happened 60 times in the 7 days before the upgrade too.
    • 2 × kimi-k3.1 400 MockTestingParamsDisabledError from key knowhere-hermes-default at 08:55:18. They sent mock_testing_fallbacks, which v1.108 refuses by default (594d0d7, listed in the breaking-changes table). That key made only 3 calls in 8 days, all within 14 s (one success, then the two fallback tests), so it was a one-off test, not a regular consumer. I left dangerously_allow_mock_testing_request_params off.
  • Pod health: litellm-app is Ready with 0 restarts since 07:57 on 11-23.
  • Night jobs: spendlog-toolindex-cleanup (02:30 UTC) and database-psql-backup (03:00 UTC) both succeeded on 11-24.

That closes the checklist.

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.

1 participant