Rolling back a LiteLLM upgrade safely

When a new LiteLLM release misbehaves, the safe response is a planned return to the previous stable release, with a verified PostgreSQL backup, an unchanged LITELLM_SALT_KEY and a reviewed config.yaml. This page explains each step and what drives the effort.

On this page

How to roll back a LiteLLM upgrade safely

When a newer LiteLLM release misbehaves and callers are affected, the safe response is to return the proxy to the previous stable release after you have taken a verified PostgreSQL backup and reviewed two things first: the LITELLM_SALT_KEY value, which must stay unchanged, and the config.yaml settings the newer version added. Rollback is the right move when the fault is in the new release itself and the cause is not yet clear, when a fix would take longer than restoring service, or when callers need a known state quickly. Fixing forward is usually better when the problem is a single misconfiguration you can correct in place, or when the older release cannot read the database changes already made. Either way, decide before you change anything, and write down which option you chose and why.

The target version should sit inside the supported release line. LiteLLM states that it maintains support for the four most recent stable minor versions for both open source and Enterprise deployments, so a rollback target that falls outside that window may get no fixes if you hit a fault later. The latest release listed on the LiteLLM GitHub releases page at the time of writing is v1.105.1, published October 14, 2026. Confirm your own target from that page, pick the stable release immediately before the one you are leaving, and check that it still falls within the four-minor-version window. Note that a database migrated by the newer release may not match the older release's expectations, which is why the later sections on migration records matter.

Which upgrade changes make a rollback harder

This table compares five kinds of change in a LiteLLM upgrade and how each one affects a return to the previous release. Read each row before you start the upgrade, so you know which changes need a backup, a config review or a manual cleanup step. Check the release notes between your current and target versions for any extra breaking changes.

ChangeImpact on rollbackAction needed
Database schema migrations applied by the newer releaseThe older release does not know about tables or columns the newer one added, so it can crash on startup. The safe rollback guide says to roll back to the previous stable release and take a database snapshot or pg_dump before any change.Take a pg_dump or snapshot of PostgreSQL first. Plan for the older release to start against a schema it does not expect, and clear migration records it never applied.
LITELLM_SALT_KEY and encrypted provider credentialsThe salt key decrypts provider credentials stored in the database. The guide warns that changing it breaks access to those credentials.Keep LITELLM_SALT_KEY unchanged across the upgrade and the rollback. Store it in your secret manager and confirm the value before you roll back.
Settings in config.yaml introduced in the newer versionAn older release may not recognize settings added in the newer version, so it can fail to start or ignore them.Review config.yaml and remove or comment out settings introduced in the version you are rolling back from. Keep a copy of the original file for re-upgrade.
Helm chart revision and image taghelm rollback returns the chart to an earlier revision, but the image tag must point at the previous stable release for the rollback to take effect as intended.Record the current chart revision and image tag before upgrading. Use helm rollback to the earlier revision, then confirm the running image tag matches it.
DISABLE_SCHEMA_UPDATE=true on the podsWhen this is set, migrations do not run on restart, so the schema may not match the release the pods run. Migration cleanup must be handled manually.Check the pod environment before and after rollback. Plan the manual migration record cleanup, and confirm with the release notes how the schema should look for the older version.

What to prepare before touching a running gateway

A rollback is only as safe as the state you can return to. The four cards below cover the artifacts and records to secure before a change, so the team can move the proxy back to a known release without losing provider credentials, schema state or deployment history. Each item should be confirmed in your own environment, not assumed from the release notes.

Tested PostgreSQL snapshot

Take a pg_dump or a database snapshot before any change, because the rollback guide recommends one before any change to the proxy. A backup that has never been restored is an assumption, not a recovery path. Confirm that the dump completes, that its size and table list look right, and that a restore into a scratch database succeeds before you start the upgrade. Record who can run the restore and how long it took.

Safe rollback guide

Custody of the salt and master keys

Do not change LITELLM_SALT_KEY during a rollback. The rollback guide warns that it decrypts the provider credentials stored in the database, so a changed or lost value leaves stored model credentials unreadable. Confirm that the current LITELLM_SALT_KEY and LITELLM_MASTER_KEY are held in your secret manager, that the copy matches what the running pods use, and that the older release will read the same values. Note who holds break-glass access.

Inventory of config.yaml settings

Settings added for a newer version may not be recognized by an older one, so the rollback guide says to review config.yaml and remove or comment out those settings. Build a list of every key in your config, mapped to the release that introduced it, using the release notes between your current and target versions. Keep the reviewed file in version control so the exact pre-upgrade and rollback versions can be compared line by line.

Helm revision and image tag record

With Helm, the rollback guide uses helm rollback to return to an earlier chart revision, so the revision number must be known before the upgrade. Record the current revision from helm history, the exact image tag for the proxy, and the values file used for that revision. Confirm that the older image tag still exists in your registry, because a rollback that points at a deleted image fails at the same point as a bad release.

Restored test environment

Restore a recent database backup into a test environment and run the candidate and previous releases against it before production. This exposes schema changes, config keys the older release rejects and pod startup failures without touching callers. Confirm that the test copy uses the same LITELLM_SALT_KEY as production, that it has realistic virtual keys and budgets, and that rollback steps have been rehearsed there. Record how long each step took so the production window is planned from evidence.

Rollback starts with classifying the fault and backing up before any change

The path starts at the symptom and first asks whether the fault is in configuration or in the release itself. A configuration fault is fixed in place. A release fault moves to recovery: take a pg_dump backup, confirm LITELLM_SALT_KEY is unchanged, and remove settings the older version does not know. Then roll back the Helm revision or image tag. Check DISABLE_SCHEMA_UPDATE next, because if it is set, migration records must be cleared by hand. Finish by checking health and caller traffic before choosing between a later retry and a stop.

Decision path for rolling back a LiteLLM release, from symptom to retry or stop.

How to roll back a LiteLLM upgrade step by step

This sequence takes a LiteLLM gateway from a misbehaving release back to the previous stable release with its keys, routes and spend history intact, and it names the check that closes each step.

  1. Freeze changes and notify callers

    The platform owner pauses further deployments, config edits and key changes, and tells application teams, tool owners and anyone who scripts against the proxy that a rollback is starting. Record the currently running image tag, Helm chart revision, and config.yaml version so you know exactly what you are returning from. Done when the change freeze is announced in your incident channel and the current versions are written into the change ticket.

  2. Take and verify the PostgreSQL backup

    Before any change, the database owner takes a database snapshot or a pg_dump of the database the proxy uses, following the LiteLLM safe rollback guide and your own backup tooling. Confirm the backup completes without errors, check its size is plausible for your spend log and key tables, and test that it can be read by restoring it to a scratch instance or listing its contents. Done when a restorable copy exists and someone other than the operator has signed off on it.

  3. Confirm LITELLM_SALT_KEY matches the pre-upgrade value

    The platform engineer compares the LITELLM_SALT_KEY value in the secret manager and in the running deployment with the value recorded before the upgrade. The salt decrypts provider credentials stored in the database, so the rollback must keep it unchanged. If the value differs, stop and restore the original before going further. Done when the key matches the recorded value and the secret version used for the rollback is noted in the change ticket.

  4. Remove config settings the older release does not know

    The platform engineer reviews config.yaml against the release notes for the version being rolled back from, then removes or comments out any setting introduced in that version. Keep a copy of the original file so the change can be reversed. Confirm the exact keys with the release notes and the safe rollback guide, since the list depends on your own configuration. Done when a diff shows only the intended removals and a dry-run or validation step accepts the file under the target version.

  5. Return to the earlier release

    If you deploy with Helm, the platform engineer runs helm rollback to the chart revision that ran before the upgrade, after confirming the revision number with helm history. If you deploy from plain manifests, restore the previous image tag and roll the deployment. Confirm exact commands against your own chart and the safe rollback guide. Done when all pods report ready on the earlier image and the rollout has finished without restarts.

  6. Handle migration records the older release never applied

    Check whether the pods run with DISABLE_SCHEMA_UPDATE=true. If they do, migrations did not run on restart and the team must clean up migration records by hand, because the older release will not recognize entries from the newer schema. Inspect the migration table and compare it with the schema the target version expects before changing anything, and keep the backup available. Done when the proxy starts cleanly on the earlier release, the migration history matches what that release expects, and the decision and queries used are recorded.

  7. Verify model routes, virtual keys and spend logging

    Run a health check on the proxy, then send a test request through each model route your callers use. Confirm that a sample of virtual keys authenticates, that their model restrictions and budgets display correctly, and that new requests create spend log entries with the expected key, team and model attributes. Check the admin UI and any SSO login as well. Done when each route and key test passes, spend logging records the test traffic, and the results are shared with the change owner before the freeze is lifted.

How the rollback differs by deployment method

The LiteLLM safe rollback guide uses Helm as its example, and it returns the release to an earlier chart revision with helm rollback. This restores the image tag and values recorded in that revision, but it does not reverse database changes, so the database backup and the migration checks still apply before you roll back.

  • Find the target revision: Run helm history on the release and identify the revision that ran the previous stable version, then confirm its image tag in the rendered values.
  • Roll back the release: Use helm rollback with that revision number and wait for the rollout to finish before sending traffic checks.
  • Check the schema state: Confirm whether the pods run with DISABLE_SCHEMA_UPDATE=true, because a restored older image will not run migrations on restart.
  • Review values for newer keys: Compare the restored values with config.yaml to find settings the older version does not recognize.

After the rollback, confirm the running image tag, check pod readiness, and send a test request through a virtual key to verify routing, budgets and logging work as expected.

Why the salt key stays fixed and migration records need manual cleanup

The two changes that do the most damage in a LiteLLM rollback are changing LITELLM_SALT_KEY and leaving migration records in a state the older release does not expect. The salt key is used to encrypt the provider credentials that the proxy stores in PostgreSQL, so it decrypts those credentials at runtime. If the rollback target is started with a different value, or someone generates a new key while troubleshooting, the stored provider API keys become unreadable and every model route that depends on them fails. Before you roll back, confirm that the secret your deployment injects as LITELLM_SALT_KEY is the same value used since the database was first populated, and record where that value is kept so the older release receives it unchanged.

The second risk is schema drift. A newer release may have applied migrations that the older image does not know about, so when it starts against that database, its expected schema and the recorded history can disagree. Review the _prisma_migrations table and identify entries the older release never applied before you let pods restart, and remove those entries only as a deliberate step with a backup in hand. If the pods run with DISABLE_SCHEMA_UPDATE=true, startup will not repair the schema for you, so the cleanup falls to your team. For diagnosis of crash loops and the errors that follow, use the separate topic on fixing LiteLLM Prisma migration errors after an upgrade or rollback. If the schema cannot be reconciled with the older release, restoring the database from the backup you took before the upgrade is the fallback, and that restore should be rehearsed before you need it.

What makes a LiteLLM rollback take longer

This table compares the factors that stretch a LiteLLM rollback and shows what each one does to backup, restore and verification effort. Read each row against your own gateway, then time a restore in a test environment before you rely on the estimate. The main takeaway is that database size and the number of configuration changes across releases usually matter more than the rollback command itself.

DriverEffect on effortWhat to check
Size of the PostgreSQL database and spend log tableA larger database takes longer to snapshot with pg_dump and longer to restore, and the spend log table often dominates its sizeMeasure the current database size and time a full dump and restore in a test environment before the upgrade
Number of proxy replicas and whether Redis is sharedMore replicas mean more pods to drain and check, and shared rate limits and router state in Redis must be reset or verified with the rollbackConfirm the replica count, whether Redis 7.0 or newer is in use, and how cached router state will behave after the older version starts
Number of config.yaml settings added across several releasesEach setting introduced after the target version must be found, removed or commented out, and the gateway may not start until every one is handledDiff config.yaml against the older release's documentation for every version between the two, not only the last one
Use of DISABLE_SCHEMA_UPDATE and manual migration handlingIf pods set DISABLE_SCHEMA_UPDATE=true, migrations do not run on restart, so migration records must be cleaned up by hand and the cleanup adds stepsCheck the pod environment and the Helm values for this variable, and document who performs the manual cleanup
Number of teams, virtual keys and callers that depend on the gatewayMore teams and callers mean more coordination, more validation of keys, budgets and model access after the rollback, and a longer window of visible impactCount active teams, keys and calling applications, and agree who confirms each one works after the rollback
Whether the team has a tested restore pathAn untested restore path adds investigation time during the incident itself, while a tested path reduces the number of decisions made under pressureConfirm that a backup has been restored into a separate database, that the Helm revision to return to is recorded, and that the steps are written down

What buyers ask before hiring help with a LiteLLM rollback

How much does a LiteLLM rollback cost?

The cost depends on the scope written into the engagement, which is the part of the bill you control. The main drivers are the number of environments involved, the size of the deployment and its database, how many config.yaml files and Helm values need review for settings the older release does not recognize, and whether a test environment exists where the rollback can be rehearsed first. Without a staging copy, more time goes into safe verification on production. DeployOpen does not publish a price list. Ask for a written scope that lists each environment, each configuration file, the database work, the verification steps and the retest, then compare quotes against that same list.

How long does a LiteLLM rollback take?

The timeline is set by the number of environments, the size of the database, the number of configuration changes to review, and the change windows your organization allows. A rollback with a tested backup, a staging rehearsal and a short list of config keys to remove will move much faster than one where the team first has to find which release introduced a setting. Ask the provider to state the phases in the written scope, including backup and restore checks, the Helm rollback, migration cleanup and verification. A duration should appear only in that written scope, not as a general promise.

What do we need to give the provider for a rollback?

Expect to provide access that lets the work be done and verified without guesswork. This usually means read and write access to the PostgreSQL database for the backup and migration cleanup, access to the secret manager that holds LITELLM_SALT_KEY and LITELLM_MASTER_KEY, access to the Kubernetes cluster and Helm release, and a change window approved by your operations team. You should also name owners who can confirm which applications and teams call the gateway, so their traffic can be checked after the rollback. Confirm in the scope which systems are in and out of bounds and who approves each production change.

Can our internal team roll back LiteLLM without outside help?

Yes, a team can do it alone if it has the skills and the time. The work needs someone comfortable with PostgreSQL backups and restores, Kubernetes and Helm release history, reading the release notes between the two versions, and the Prisma migration table that tracks which schema changes were applied. The team also needs someone who understands how the proxy uses the database, so they do not change the encryption key by mistake. If those skills are spread across people who are not available during the change window, a partner can take the operational steps while your staff approve and review each one.

Does a rollback need a new security review?

A rollback that returns to a version you already ran does not usually need a full new assessment, but it does need a targeted check. Confirm that the encryption key is unchanged, that admin and master keys are still held in the secret manager, that the virtual keys and budgets match the pre-upgrade state, and that the access controls and network exposure match your hardening baseline. If the rollback changed any Enterprise setting, SSO configuration or logging path, verify those explicitly. Whether your compliance team needs a formal record is a question for your own auditors, and the answer should appear in your change record.

What should we do after a rollback before retrying the upgrade?

Treat the rollback as the start of a new upgrade plan, not the end of the incident. Before retrying, read every release note between the version you rolled back from and the target, identify the new settings and migrations, and reproduce the failure in a non-production environment with a current database copy. Pin image tags so the running version cannot change unexpectedly. Plan the migration step, including whether schema updates run in a Helm job or on pod start, and set a clear go or no-go check. Ask the provider for a written retest plan that covers callers, keys, budgets and logs before the next production window.

How DeployOpen scopes and delivers a LiteLLM rollback

DeployOpen treats a LiteLLM rollback as a controlled change to a live gateway that holds provider credentials, virtual keys and spend history. We start by confirming the current release, the target release, the database state and how the proxy is deployed, then agree in writing what will be changed, tested and handed over.

How we scope

  • Confirm the running release, the target release and whether pods use DISABLE_SCHEMA_UPDATE or a Helm migrations job
  • Inventory config.yaml settings added in the release being rolled back so each one can be reviewed
  • Record how LITELLM_SALT_KEY and LITELLM_MASTER_KEY are stored and where the secret values are kept
  • Agree the scope in writing as a fixed-scope engagement, with an optional retainer for later upgrades

How we build

  • Take and verify a PostgreSQL backup or pg_dump before any change, and confirm it restores in a test copy
  • Keep LITELLM_SALT_KEY unchanged and check that stored provider credentials still decrypt after the rollback
  • Remove or comment out settings the older version does not recognize, and test startup against a staging copy first
  • Use helm rollback to a known chart revision, then clear migration records the older release never applied

How we hand over

  • Document the backup, the rollback steps, the config changes and the migration cleanup performed
  • Provide a verification checklist covering health checks, a test virtual key call, budgets, routing and logs
  • Record the release pinning and the upgrade runbook so the next attempt follows the same tested path
  • Walk your platform and security teams through the handover and the evidence they can keep for review

How we support

  • Review the next upgrade plan against the release notes between your current and target versions
  • Retest the gateway after the rollback or re-attempted upgrade and report any remaining issues
  • Offer ongoing support, upgrades and continuous testing as a retainer if your team wants a standing partner
  • Confirm response expectations and support terms in the written scope before work begins

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.