Skip to content

fix(helm): default litellm-helm to the ghcr.io/berriai/litellm image - #37491

Merged
yassin-berriai merged 1 commit into
litellm_internal_stagingfrom
litellm_helm_default_litellm_image
Aug 19, 2026
Merged

yassin-berriai merged 1 commit into
litellm_internal_stagingfrom
litellm_helm_default_litellm_image

Conversation

@yassin-berriai

@yassin-berriai yassin-berriai commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Chart default image is the legacy litellm-database repository
  • That image no longer differs from ghcr.io/berriai/litellm
  • Chart README, release notes and cosign docs all say litellm

How it solves it:

  • Point image.repository at ghcr.io/berriai/litellm
  • Update the chart's tests and README to match
  • Bump chart version to 1.1.2

User Flow

Before: a platform engineer installing the chart gets an image the project's own release notes never mention, so they cannot verify what they are running

  1. They run helm install litellm oci://ghcr.io/berriai/litellm-helm with a Postgres endpoint and no image.repository override
  2. The proxy pod and the migrations Job both come up on ghcr.io/berriai/litellm-database:v1.85.1
  3. They open the chart's own README, which documents the image.repository default as berriai/litellm, and it disagrees with what is running
  4. They follow the release notes to verify the image signature, and the published cosign verify command names ghcr.io/berriai/litellm, which is not the image they pulled

After: the same install runs the image the docs describe, so verification and the README line up

  1. They run the same helm install with no image.repository override
  2. The proxy pod and the migrations Job both come up on ghcr.io/berriai/litellm:v1.85.1
  3. The chart README's documented default now matches what is running
  4. The cosign verify command from the release notes names the image they pulled
  5. Anyone who had pinned image.repository to ghcr.io/berriai/litellm-database keeps working, since that repository is still published

Relevant issues

Linear ticket

Resolves LIT-5814

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 (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Why the two images are interchangeable

Dockerfile and docker/Dockerfile.database differ only in comment text and one builder-stage apk package:

$ diff Dockerfile docker/Dockerfile.database
31d30
< # Builder stage
45d43
<     rust \
98d95
< # Runtime stage
127,130c124,129
< # runtime uid can read and that no cache volume mount shadows. The paths are
< # pinned via PRISMA_BINARY_CACHE_DIR / PRISMA_CLI_PATH and recorded into the
< # generated client at build time, so `prisma migrate deploy` on a fresh
< # database needs no npm and no network access (#33650, #24554).
---
> # runtime uid can read and that no cache volume mount shadows (unlike
> # /app/.cache or $HOME/.cache in readOnlyRootFilesystem + emptyDir setups).
> # The paths are pinned via PRISMA_BINARY_CACHE_DIR / PRISMA_CLI_PATH and
> # recorded into the generated client at build time, so `prisma migrate
> # deploy` on a fresh database needs no npm and no network access
> # (#33650, #24554).

rust is a builder-stage compile dependency and does not reach the runtime layer. Both images bake the prisma CLI and engines, schema.prisma, and litellm/proxy/prisma_migration.py, which is the file the migrations Job executes.

Reading both manifests and config blobs straight off GHCR at v1.97.0, linux/amd64, they agree on entrypoint, working dir, prisma configuration and layer count, and the first 11 layer digests are byte-identical:

===== litellm:v1.97.0 =====
Entrypoint: ['docker/prod_entrypoint.sh'] Cmd: ['--port', '4000'] WorkingDir: /app
PRISMA env: ['PRISMA_BINARY_CACHE_DIR=/opt/prisma/binaries',
             'PRISMA_CLI_PATH=/opt/prisma/binaries/node_modules/.bin/prisma',
             'PRISMA_CLI_QUERY_ENGINE_TYPE=binary', 'PRISMA_OFFLINE_MODE=true']
layers: 21

===== litellm-database:v1.97.0 =====
Entrypoint: ['docker/prod_entrypoint.sh'] Cmd: ['--port', '4000'] WorkingDir: /app
PRISMA env: ['PRISMA_BINARY_CACHE_DIR=/opt/prisma/binaries',
             'PRISMA_CLI_PATH=/opt/prisma/binaries/node_modules/.bin/prisma',
             'PRISMA_CLI_QUERY_ENGINE_TYPE=binary', 'PRISMA_OFFLINE_MODE=true']
layers: 21

Three other things already point at the plain image. The chart README documents the image.repository default as berriai/litellm, so values.yaml contradicted the table published beside it. .github/workflows/create-release.yml publishes cosign verify instructions for ghcr.io/berriai/litellm only. And the Grype image scan builds Dockerfile and docker/Dockerfile.non_root, while docker/Dockerfile.database is built only by CircleCI's build_docker_database_image for the bad-DATABASE_URL test, and grep -c grype .circleci/config.yml returns 0.

Review notes

Greptile filed two P2s on 78fe47a34f's predecessor. One taken, one rebutted

Taken, "avoid maintenance-sensitive image commentary" on values.yaml. The second half of my comment asserted that litellm-database "is still published", which is a claim about an external registry's state that rots the day that stops being true, and the bot is right that it does not belong in a values file. Trimmed to one line covering only why this image can run the migrations Job, which is the non-obvious bit a future maintainer needs and cannot drift. Not deleted outright, because comments in values.yaml are this file's documentation convention and render into the chart's values table

Rebutted, "keep product docs centralized" on README.md. helm/litellm-helm/README.md is chart metadata rather than product documentation: it ships inside the chart package, is rendered by Artifact Hub from the packaged chart, and has always lived beside Chart.yaml. Nothing was added here; one existing table cell that already disagreed with values.yaml was corrected, and it would still be wrong after this change if left alone. The real product-docs drift this PR creates is in the litellm-docs repo, where the monolithic values.yaml sample pinned the legacy repository, and that is fixed in BerriAI/litellm-docs#946

Screenshots / Proof of Fix

Shared setup, a real kind cluster with the chart's own bundled Postgres, one namespace per side, both installed from the same values file:

kind create cluster --name lit5814
kind get kubeconfig --name lit5814 > "$SC/kubeconfig"; export KUBECONFIG="$SC/kubeconfig"

# the Before side is the chart exactly as it ships on the base branch
git archive origin/litellm_internal_staging helm/litellm-helm | tar -x -C "$SC/basechart"

cat > "$SC/vals.yaml" <<'EOF'
db:
  deployStandalone: true
migrationJob:
  enabled: true
masterkey: sk-lit5814
proxy_config:
  model_list:
    - model_name: gpt-5.6
      litellm_params:
        model: openai/gpt-5.6
        api_key: os.environ/OPENAI_API_KEY
  general_settings:
    master_key: os.environ/PROXY_MASTER_KEY
EOF

Before (133e72c)

The chart renders and runs the legacy image

  1. Confirm the Before tree genuinely lacks the fix
$ grep -n "repository:" $SC/basechart/helm/litellm-helm/values.yaml | head -1
10:  repository: ghcr.io/berriai/litellm-database

$ grep -c "repository: ghcr.io/berriai/litellm$" $SC/basechart/helm/litellm-helm/values.yaml
0
  1. Render the chart at its defaults
$ helm template lit $SC/basechart/helm/litellm-helm --set migrationJob.enabled=true | grep -n berriai
231:          image: "ghcr.io/berriai/litellm-database:v1.85.1"
540:          image: "ghcr.io/berriai/litellm-database:v1.85.1"
  1. Install it on the cluster and read back what is running
$ helm install lit $SC/basechart/helm/litellm-helm -n before -f $SC/vals.yaml \
    --set environmentSecrets[0]=openai-key --wait --timeout 15m

$ kubectl -n before get job,deploy -o custom-columns='KIND:.kind,NAME:.metadata.name,IMAGE:.spec.template.spec.containers[0].image,SUCCEEDED:.status.succeeded,READY:.status.readyReplicas' --no-headers
Job          lit-litellm-migrations   ghcr.io/berriai/litellm-database:v1.85.1   1        <none>
Deployment   lit-litellm              ghcr.io/berriai/litellm-database:v1.85.1   <none>   1

Both images migrate a fresh Postgres identically

  1. Run the exact command the migrations Job runs, once per image, each against its own empty Postgres
$ docker run --rm --network container:lit5814-pg-database \
    -e DATABASE_URL="postgresql://postgres:pw@127.0.0.1:5432/litellm" -e DISABLE_SCHEMA_UPDATE=false \
    -w /app --entrypoint python ghcr.io/berriai/litellm-database:v1.85.1 litellm/proxy/prisma_migration.py
...
2026-08-19 18:07:35,960 - litellm_proxy_extras - INFO - Migration diff applied successfully
2026-08-19 18:07:35,960 - litellm_proxy_extras - INFO - Post-migration sanity check completed
LiteLLM: Setup complete. Skipping server startup as requested.
--- exit: 0 ---
--- tables created --- 65

$ docker run --rm --network container:lit5814-pg-plain \
    -e DATABASE_URL="postgresql://postgres:pw@127.0.0.1:5432/litellm" -e DISABLE_SCHEMA_UPDATE=false \
    -w /app --entrypoint python ghcr.io/berriai/litellm:v1.85.1 litellm/proxy/prisma_migration.py
...
2026-08-19 18:08:22,304 - litellm_proxy_extras - INFO - Migration diff applied successfully
2026-08-19 18:08:22,304 - litellm_proxy_extras - INFO - Post-migration sanity check completed
LiteLLM: Setup complete. Skipping server startup as requested.
--- exit: 0 ---
--- tables created --- 65
  1. Compare the two resulting schemas
$ diff /tmp/lit5814-database.tables /tmp/lit5814-plain.tables && echo "IDENTICAL TABLE SET"
IDENTICAL TABLE SET

After (78fe47a)

The chart renders and runs the canonical image

  1. Render the chart at its defaults
$ helm template lit helm/litellm-helm --set migrationJob.enabled=true | grep -n berriai
231:          image: "ghcr.io/berriai/litellm:v1.85.1"
540:          image: "ghcr.io/berriai/litellm:v1.85.1"

The full rendered diff against Before is those two lines, the chart version label, and the per-render random master key and Postgres password. Nothing else moves

  1. Install it on the cluster and read back what is running
$ helm install lit helm/litellm-helm -n after -f $SC/vals.yaml \
    --set environmentSecrets[0]=openai-key --wait --timeout 15m

$ kubectl -n after get job,deploy -o custom-columns='KIND:.kind,NAME:.metadata.name,IMAGE:.spec.template.spec.containers[0].image,SUCCEEDED:.status.succeeded,READY:.status.readyReplicas' --no-headers
Job          lit-litellm-migrations   ghcr.io/berriai/litellm:v1.85.1   1        <none>
Deployment   lit-litellm              ghcr.io/berriai/litellm:v1.85.1   <none>   1
  1. Serve a real request through it, against the chart's bundled Postgres
$ kubectl -n after get pods -l app.kubernetes.io/name=litellm -o jsonpath='{.items[0].spec.containers[0].image}'
ghcr.io/berriai/litellm:v1.85.1

$ curl -s http://127.0.0.1:45814/health/readiness
{"status":"healthy","db":"connected"}

$ curl -s http://127.0.0.1:45814/v1/chat/completions \
    -H "Authorization: Bearer sk-lit5814" -H "Content-Type: application/json" \
    -d '{"model":"gpt-5.6","messages":[{"role":"user","content":"Reply with exactly: helm default image works"}]}'
{"id":"chatcmpl-EEfEFgL6RSeoMzDQautTGT4NZwbBR","created":1787163783,"model":"gpt-5.6","object":"chat.completion","choices":[{"finish_reason":"stop","index":0,"message":{"content":"helm default image works","role":"assistant"}}],"usage":{"completion_tokens":7,"prompt_tokens":14,"total_tokens":21}}
  1. Confirm the spend row landed in the Postgres the migrations Job set up
$ kubectl -n after exec lit-postgresql-0 -- psql -U postgres -d litellm \
    -c 'select model, spend, total_tokens, api_base from "LiteLLM_SpendLogs" order by "startTime" desc limit 3;'
     model      |  spend  | total_tokens |          api_base
----------------+---------+--------------+----------------------------
 openai/gpt-5.6 | 0.00028 |           21 | https://api.openai.com/v1/
(1 row)

The chart's own tests

  1. Run what the Helm unit test workflow runs, with the plugin version CI pins (v0.8.2, checksum-verified) and its declared-vs-executed suite guard
$ helm unittest -f 'tests/*.yaml' helm/litellm-helm
Charts:      1 passed, 1 total
Test Suites: 14 passed, 14 total
Tests:       97 passed, 97 total
helm/litellm-helm: all 14 declared test suites ran

$ helm unittest -f 'tests/*.yaml' helm/litellm
Charts:      1 passed, 1 total
Test Suites: 8 passed, 8 total
Tests:       79 passed, 79 total
helm/litellm: all 8 declared test suites ran
  1. Mutation check, restore the old default and require the updated assertion to fail
$ python3 -c '...'   # revert values.yaml to ghcr.io/berriai/litellm-database
MUTATED values.yaml back to litellm-database

$ helm unittest -f 'tests/deployment_tests.yaml' helm/litellm-helm
            Path:   spec.template.spec.containers[0].image
            Expected to equal:
                ghcr.io/berriai/litellm:test
            Actual:
                ghcr.io/berriai/litellm-database:test
Test Suites: 1 failed, 0 passed, 1 total
Tests:       1 failed, 19 passed, 20 total

Type

🐛 Bug Fix
🚄 Infrastructure

Caveats

  • docker/Dockerfile.database and its published image stay
  • Installs pinning image.repository explicitly are unaffected
  • ci_cd/security_scans_readme.md claims a Grype scan on Dockerfile.database; stale, left alone

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

@CLAassistant

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes the Helm chart’s default image repository to the canonical GHCR LiteLLM image and increments the chart patch version.

  • Aligns the documented image repository with the new chart default.
  • Updates deployment and migration-job expectations for the canonical image.
  • Retains an explanatory note about the image’s bundled Prisma tooling.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
helm/litellm-helm/Chart.yaml Bumps the chart patch version for the default-image correction.
helm/litellm-helm/values.yaml Changes the default repository to ghcr.io/berriai/litellm and accurately describes its bundled Prisma tooling.
helm/litellm-helm/README.md Aligns the packaged chart’s values table with the new runtime default.
helm/litellm-helm/tests/deployment_tests.yaml Updates deployment and templated-container expectations to the canonical repository.
helm/litellm-helm/tests/migrations-job_tests.yaml Updates migration-job templating expectations to the canonical repository.

Reviews (2): Last reviewed commit: "fix(helm): default litellm-helm to the g..." | Re-trigger Greptile

Comment thread helm/litellm-helm/README.md Resolved
Comment thread helm/litellm-helm/values.yaml Resolved
The chart shipped ghcr.io/berriai/litellm-database as its image default,
with a comment offering it as the "optimized image with database". That
distinction no longer exists: Dockerfile and docker/Dockerfile.database
differ only in comment text and one builder-stage apk package, and both
published images bake the prisma CLI, engines, schema.prisma and
prisma_migration.py into /app, so either one runs the migrations job.

Point the default at the canonical image the release notes, the cosign
verification instructions and the chart's own README already name, and
update the chart's tests and README so nothing still refers to the
legacy repository.
@yassin-berriai

Copy link
Copy Markdown
Contributor Author

@greptileai please review the current head 78fe47a. Both findings answered inline, with the reasoning in the description's Review notes section.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tin-berri tin-berri left a comment

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.

LGTM — small, well-evidenced fix. The claim that litellm and litellm-database are interchangeable is backed by a real byte-level image diff (only builder-stage rust and comment text differ; 21 layers, first 11 byte-identical), and by an actual kind-cluster before/after install proving both images produce an identical Postgres schema (65 tables) and a working end-to-end request through the new default.

  • README/cosign docs already documented litellm as the default, so this also fixes a pre-existing docs/values.yaml mismatch, not just a preference change.
  • Tests updated across deployment_tests.yaml and migrations-job_tests.yaml to match the new default, plus a mutation check showing the updated assertion actually fails against the old default (not a vacuously-passing test).
  • Caveats section is honest about scope: litellm-database stays published, and explicit image.repository overrides are unaffected — no backward-compat break for anyone already pinned.
  • CI green.

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.

3 participants