Upgrade Risk
Tell the user what a LiteLLM upgrade or config change will do to the traffic their proxy serves today. The check is read-only. It never changes the proxy.
Setup
export LITELLM_BASE_URL=https://your-proxy.example.com
export LITELLM_API_KEY=sk-... # proxy admin key
SKILL_DIR=~/.claude/skills/upgrade-risk
If either variable is unset, ask the user to export it in their shell. Do not ask them to paste the key into the chat.
Settings saved from the Admin UI or the API live in the proxy's database, not in config.yaml. The profile reads most of them through the API. To read all of them, ask the user to also export a read-only connection string for the proxy's Postgres database. This needs psql on the machine.
export LITELLM_DATABASE_URL=postgresql://readonly_user:...@db-host:5432/litellm # optional
Ask the user
- The change: a target version (for example
1.110.0), a config change (for example "switchlangfusetolangfuse_otel", or a YAML diff), or both. - Their config.yaml and Helm values, if they can share them with secrets removed. The API exposes only part of
general_settingsand none oflitellm_settings, environment variables or deployment details, so without these files the check is weaker. Say so in the report. - Traffic window in days (default 30).
Step 1: Profile the deployment
python3 $SKILL_DIR/scripts/upgrade_risk.py profile --days 30
The output has the running version, database and cache state, callbacks, models (with provider and non-secret parameter names), guardrails, MCP servers, router and cache settings, and traffic: request and failure counts per endpoint, provider, model group, MCP server and guardrail. Credential values, URLs and hostnames come back as <redacted>.
The proxy merges config.yaml with settings stored in its database, and the profile shows the merged result:
models,config_callbacks,guardrails,mcp_servers,settingsanddb_objects(credentials, agents, vector stores, search tools, prompts, policies) include entries that exist only in the databasegeneral_settingslists each value the API exposes with itssource:dborconfig.yaml. A setting can be set in both places, so a config.yaml change may not take effect while a database value overrides it, and the reversepass_through_endpointslists each custom route and itssourcedb_configis theLiteLLM_Configtable read directly: everygeneral_settings,litellm_settingsandrouter_settingsvalue saved in the database, and the names of stored environment variables. It needsLITELLM_DATABASE_URL. If it saysskippedorerror, list database-onlylitellm_settingsandgeneral_settingsas an unknown in the report
Never assume the user's config.yaml is the whole configuration. When a setting appears in db_config or with source: db, use that value, and tell the user it lives in the database.
unavailable lists the endpoints this proxy version did not serve. Treat each one as an unknown, never as "not used". If version is null, ask the user for the exact version (image tag or pip show litellm). Do not guess it.
Traffic shows what the proxy served, so it proves a feature is in use. An empty count does not prove a feature is unused: a monthly job can fall outside the window, and health checks and UI use are not counted.
Step 2: Collect the changes in range
Skip this step for a config-only change.
python3 $SKILL_DIR/scripts/upgrade_risk.py notes --from <current> --to <target> --out ./upgrade-risk-notes
The output lists, for every release after the current version up to the target:
releases_with_notes[].file: the full release note on diskreleases_with_notes[].flagged_blocks: the text of every breaking-change, warning and known-issue callout in that notenew_migrations[].file: the SQL of every database migration the upgrade appliescompare_url: the code diff between the two tagswarnings: a missing tag or a range with no release notes
Read every flagged block in full. Then search the full notes for the names from the profile: each provider, callback, guardrail type, endpoint with traffic, and setting the user has set.
grep -il "bedrock\|langfuse\|/v1/messages\|mcp" ./upgrade-risk-notes/.litellm-docs/release_notes/v*/index.md
Read each migration file. Flag these: DROP COLUMN, DROP TABLE, ALTER COLUMN ... TYPE, a new NOT NULL column without a default, and CREATE INDEX on LiteLLM_SpendLogs or a daily spend table. An index on a large table can take minutes and hold up startup.
A downgrade is not covered by release notes. If the target is older than the current version, tell the user that migrations applied by the newer version stay in the database, list them with notes --from <target> --to <current>, and recommend a database backup and a test on a copy first.
Step 3: Check a config change
For each setting, callback or integration the user wants to change, read its page under https://docs.litellm.ai/docs/ and, when the proxy is not on the latest version, confirm the setting exists in their version:
git clone --quiet --depth 1 --branch v<current> https://github.com/BerriAI/litellm.git ./upgrade-risk-notes/litellm-current
grep -rn "<setting_name>" ./upgrade-risk-notes/litellm-current/litellm | head
Then answer three questions from the docs and the code: which requests the setting applies to (match these against the traffic), what the old path sent or did that the new path does not (fields in a log payload, metric names, headers, fallback order, cache keys), and what else must change with it (an environment variable, a database or Redis requirement, a dashboard or alert that reads the old output).
Step 4: Match changes to the deployment
Keep a change only when the deployment uses what it touches. For each change that stays, name the evidence: the config entry, or the traffic count ("/v1/messages served 41,200 requests in the last 30 days").
Rate each one:
| Level | Meaning |
|---|---|
| Breaks | Requests fail, the proxy does not start, or data is lost unless the user acts first |
| Changes behavior | Requests work, but a response, log, metric, cost, default or permission is different |
| Check | The change touches something the profile cannot see (general_settings, environment variables, SSO, Helm values, client code) |
Changes that touch nothing in the profile and nothing unknown are left out. Give their count in one line.
Step 5: Report
Use this shape. Put Breaks first.
Upgrade risk: v1.106.0 -> v1.110.0
Deployment: 14 models (bedrock, azure, openai), callbacks: langfuse, prometheus; 2 MCP servers; 1.2M requests in 30 days
BREAKS (1)
1. String fallback targets stop the proxy from starting (v1.108.1)
Applies to you: router fallbacks are set
Do before the upgrade: write each target as a list, `[{"gpt-4": ["gpt-3.5"]}]`
Source: https://docs.litellm.ai/release_notes/v1.108.1/v1-108-1
CHANGES BEHAVIOR (2)
...
CHECK (2)
...
DATABASE
20 new migrations. 1 adds an index on LiteLLM_SpendLogs. Take a backup. Run the migration as one job before the new pods start.
NOT CHECKED
general_settings and environment variables (no config.yaml shared)
42 other changes in this range do not touch this deployment.
Rules for the report:
- Every item has a source: a release note URL (
https://docs.litellm.ai/release_notes/<folder>/<slug from the note's frontmatter>), a docs URL, a pull request, or a migration name. - Every item has an action: what to change before the upgrade, or how to keep the old behavior.
- Never print a credential, an internal hostname or an IP address.
- Say what was not checked. Do not report "safe to upgrade". Report "no known breaking change touches the features found", with the list of unknowns.
- Recommend a test of the top endpoints from the traffic on a staging proxy at the target version, and name those endpoints.