Skip to content

chore(k8s): plan the LiteLLM upgrade beyond 1.103 #4406

Not planned

Description

@dan-petty

Problem

The gateway image was bumped from v1.103.0 to v1.103.10 (PR #4374) to fix two critical advisories (GHSA-7hp6-4w63-5g45, GHSA-w4c7-34wj-hqm8). The newest release is v1.108.4 (2026-11-09), five minors ahead. The 1.103 line may get no more fixes, and later releases add fixes for MCP, cost maps (for example claude-sonnet-5-5 entries) and other parts that the project uses.

What to find out

  1. Whether the 1.103 line still gets security fixes, and which advisories apply to later lines.
  2. The breaking changes and migration notes between v1.103.10 and the newest stable release; whether litellm-proxy-extras adds migrations; whether k8s/llm/gateway/config.yaml still loads (12 model groups, fallbacks, and the Jev pass-through for /v1/systemone). Read the wheel source in a new empty scratch directory (python -I), and load the config with Router as the earlier bump did.
  3. Whether a hosted-group call (claude-sonnet-5-5, gemini-3.8-flash, DeepSeek) still works after the upgrade. A short live call to each hosted group is a person's or an agent's step after the merge.
  4. The Renovate or release policy for this image (the digest pin; no minimum release age, owner direction of 2026-11-11).

Done when

A written plan with the target version, the risk list, the test steps and the rollback is in this issue. The bump itself is a separate fix issue.

Related: #4370 and PR #4374 (the security bump), #4289, #4296.

Proposed design

Problem statement

The gateway image runs LiteLLM v1.103.10, five minors behind the newest release. The v1.103 line may get no more security fixes, and later releases fix MCP and cost-map entries that the project uses. The repository holds no plan for the upgrade, so the bump has no target version, risk list, test steps or rollback.

Acceptance criteria

Requirement: Target version

The upgrade plan SHALL name one target LiteLLM version newer than v1.103.10 and the date of its release.

Scenario: Plan names a released target

  • WHEN A test reads the plan document
  • THEN It finds one version tag newer than v1.103.10 with a release date.

Requirement: Breaking changes and migrations

The plan SHALL state the breaking changes, the migration notes and the litellm-proxy-extras migrations between v1.103.10 and the target version.

Scenario: Each intervening release has an entry

  • WHEN A test reads the plan and counts the release sections between v1.103.10 and the target
  • THEN Each minor release in that range has one section that states its breaking changes or states that it has none.

Requirement: Config load result

The plan SHALL record the result of loading k8s/llm/gateway/config.yaml with Router of the target version in a new empty directory.

Scenario: Plan records the load result

  • WHEN A test reads the config-load section of the plan
  • THEN It finds the command, the target version, 12 model groups, 6 fallback rules, the /v1/systemone path and a pass or fail result.

Requirement: Hosted group test steps

The plan SHALL give one live test step and the required key for each hosted model group.

Scenario: Each hosted group has a step

  • WHEN A test reads the test-step section of the plan
  • THEN Each of claude-sonnet-5-5, claude-haiku-5-5, gemini-3.8-flash and deepseek-v4.1-flash-1017 has one step and the name of its environment key.

Requirement: Rollback

The plan SHALL state the rollback to v1.103.10 and the command that applies it.

Scenario: Rollback restores the previous image

  • WHEN A test reads the rollback section of the plan
  • THEN It finds the version v1.103.10, the file k8s/llm/gateway/deployment.yaml and the command that restores the image.

Requirement: Security support and advisories

The plan SHALL state whether the v1.103 line still receives security fixes and name each advisory that affects a later line.

Scenario: Support statement has a source

  • WHEN A test reads the support section of the plan
  • THEN It finds a supported or unsupported statement with the URL of its source.

Requirement: Update policy

The plan SHALL state the update policy of the gateway image and its digest pin, and whether the target version is the newest release that fixes the known security and bug issues and that the config and the clients support.

Scenario: Version rule is checked

  • WHEN A test reads the policy section of the plan
  • THEN It finds the version rule and a statement that the target version meets or fails it.

Existing Tool Considered

No alternatives check has run. Renovate covers the version detection and the digest pin of the gateway image. It lacks the breaking-change analysis, the offline Router config load and the hosted-group smoke steps, so the plan states those by hand. This item builds no code: it adds one document, k8s/llm/gateway/UPGRADE.md.

Key questions

  • Where does the upgrade plan live so that one pull request delivers it?: In k8s/llm/gateway/UPGRADE.md, next to the config and the deployment that it plans. The pull request that adds it closes the issue. (best practice) [sources: CONTEXT.md, k8s/llm/gateway/config.yaml, k8s/llm/gateway/deployment.yaml]
    • Chosen: k8s/llm/gateway/UPGRADE.md. It sits with the files that it plans, and one pull request adds it and closes the issue.
    • Rejected: docs/litellm-upgrade.md. It puts a k8s plan away from the manifests and needs a new directory.
    • Rejected: The issue body only. An item is delivered by one pull request, and a comment on the issue delivers no change.
  • Which target version does the plan name?: The newest stable release at the time of the bump, which the issue names as v1.108.4, if the config loads and the tests pass with it. No minimum release age applies. Otherwise the plan names the newest release that passes and states the cause. (best practice) [sources: k8s/llm/gateway/deployment.yaml]
    • Chosen: The newest stable release. It carries the most fixes, and the config load and the tests decide when the bump can land.
    • Rejected: The next minor only. It leaves four minors of fixes, cost-map entries and MCP fixes behind.
  • Which procedure loads the config under the target version?: A new empty directory, python -I, a virtual environment, the target wheel of litellm[proxy], and a Router built from the model list and the router settings of k8s/llm/gateway/config.yaml. (best practice) [sources: k8s/llm/gateway/config.yaml, k8s/llm/gateway/deployment.yaml]
    • Chosen: A scratch directory with the target wheel and Router. It reads the wheel source and loads the real config, as the earlier bump did.
    • Rejected: A new test module in CI. CI must test the version that the cluster runs, and the cluster still runs v1.103.10.
  • Which model groups and fallback rules must the config-load check assert?: 12 model groups, 6 fallback rules and the /v1/systemone pass-through. [sources: k8s/llm/gateway/config.yaml]
  • Does the gateway run database migrations at start-up, which the target version must keep working on a read-only root file system?: Yes. The gateway migrates on a read-only root file system, and a failed migration ends the start-up. The plan checks the litellm-proxy-extras migrations for this. [sources: openspec/specs/llm-gateway-database/spec.md, k8s/llm/gateway/deployment.yaml]
  • Which existing test fails when the Jev pass-through path changes?: tests/ai/test_jev_gateway_route.py fails when the pass-through path and the client path differ, so the plan runs it as a step. [sources: k8s/llm/gateway/config.yaml, tests/ai/test_jev_gateway_route.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-18: not-applicable.
Class: chore, no search.
Tool: none found.

Activity

  1. added
    source/agent
    type/chore
    scope/k8s
    status/new
    value/medium
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/chore. The chore prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. The 1.103 line may stop receiving fixes, but the current version is patched and functional, so this is important but not urgent.
    • Value: Medium. A written plan reduces risk for the next gateway upgrade and keeps the project current with security and feature fixes.
    • Effort: Medium. Requires researching breaking changes, loading config in a scratch environment, checking hosted-group compatibility, and writing a plan document.
    • Related: fix(k8s): bump the LiteLLM gateway to v1.103.10 for advisories #4370, which asks for a different change. Both concern the LiteLLM gateway version, but #4370 delivered the v1.103.10 security bump while this candidate plans the next upgrade beyond that line.
  3. added
    priority/p2-medium
    on Nov 10, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at efe3884 (see proposed design in issue body).

    Moved to new items: #4428.

  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: chore. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  7. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Owner direction of 2026-11-11:

    not sure about the "at least two weeks old" rule, sometimes security updates and bugfixes need to be used within minues of their release, as long as the tooling supports that version, it is fine to update

    New rule: no minimum release age for dependencies, images, charts or tools. Pin the newest release that fixes the known security and bug issues and that the surrounding tools support (the tests pass).

    Body changes: the plan states the digest pin and whether the target is the newest release that fixes the known issues and that the config and the clients support. The two-week age rule is removed from item 4, the update-policy requirement, its scenario, the tool note and the target-version answer. .github/renovate.json sets no minimum release age for the gateway image, so the tool note no longer says that Renovate applies one.

  8. added
    owner/service
    on Nov 22, 2026
  9. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Plan state: branch chore/4406-plan-the-litellm-upgrade-beyond-1, draft pull request #6776. The pull request plans the item and closes no issue. The stage job and the step fix-plan edit this comment, and a comment of each run tells what the run did.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. Create the plan with the target release, the release sections, the update policy, the advisories and the config load: 42946 tokens
    2. State the litellm-proxy-extras migrations between the pinned release and the target: 27624 tokens
    3. Add the risk list, the linked smoke steps and the rollback: 41832 tokens
    4. Link the upgrade plan from the Kubernetes guide: 23725 tokens

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • major ignores_existing_code at tasks (3): Group 3 writes a live call and the key variable for each hosted group into UPGRADE.md, but k8s/README.md already documents them in "Smoke check after a gateway upgrade": one call for four of the five groups, the structured call, and a table of each group's provider key. The plan should link that section and add only the missing deepseek-v4.1-flash call, instead of duplicating it. Evidence: "| claude-sonnet-5-5 | ANTHROPIC_API_KEY |"
    • major criterion_dropped at issue (The plan SHALL state the breaking changes, the migration notes and the litellm-proxy-extras migrations between v1.103.10 and the target version.): No group states the litellm-proxy-extras migrations between the pinned release and the target. Group 1 gives one section per release with its breaking changes only, and group 3's database entry is the gateway's start-up migration on the read-only file system, not the migrations of the litellm-proxy-extras package. Evidence: "The plan SHALL state the breaking changes, the migration notes and the litellm-proxy-extras migrations between v1.103.10 and the target version."
    • minor other at design (decisions): The decision tells the builder to link the page with its repository path. A relative link in k8s/README.md resolves from the k8s/ directory, so k8s/llm/gateway/UPGRADE.md names k8s/k8s/llm/gateway/UPGRADE.md and the invariant test in group 2 fails; the link must be llm/gateway/UPGRADE.md. Evidence: "Link the page from k8s/README.md with the repository path of the page."
    • major criterion_dropped at issue (The plan SHALL state the update policy of the gateway image and its digest pin, and whether the target version is the newest release that fixes the known security and bug issues and that the config and the clients support.): The Update policy criterion requires the plan to state the gateway image's digest pin, but the plan's update rule states only the release-age rule and the version choice; no task says how the image is pinned, and the repository pins a tag rather than a digest. Evidence: "State the update rule in the same section: no minimum release age, and the newest release that answers the known security and bug issues and that the config and the clients support, with CONTRIBUTING.md as its source"
    • minor false_premise at proposal (security): The plan claims devops scan secrets fails when it finds a key value, but the command renders the findings and exits 0; tests/security/test_security_gitleaks.py asserts res_scan.exit_code == 0 for a file with a GitHub token, so the claimed security check does not fail. Evidence: "uv run devops scan secrets k8s/llm/gateway/UPGRADE.md fails when a key value lands in the page"
    • minor false_premise at proposal (feasibility): The feasibility says the Router load needs no checkout of the repository, but group 1 reads the model_list and router_settings from k8s/llm/gateway/config.yaml, a file of the checkout; the same feasibility block also says the scratch directory goes under the checkout. Evidence: "the call needs a network to PyPI for the wheel as its precondition, and no checkout of the repository and no client of a service"
    • minor other at tasks (2): Group 2 reads the pinned release's litellm-proxy-extras version from the wheel metadata in the scratch directory, but group 1 installs only the target wheel with uv run --with and leaves the scratch directory empty, so the pinned release's metadata is not there; the pinned version is only in the archive proposal that the group also reads. Evidence: "Read the litellm-proxy-extras version that the litellm[proxy] wheel pins, for the pinned release and for the target, from the wheel metadata in the scratch directory."
    • major false_premise at proposal (feasibility): The feasibility says the gateway config holds 12 model groups, but the config's model_list has 13 distinct model names: the 12 the comment counts plus deepseek-v4.1-flash. The config-load section and the page's count would therefore be wrong. Evidence: "- model_name: deepseek-v4.1-flash"
  10. 64 remaining items

  11. added
    status/planned
    owner/service
    status/in-progress
    and removed
    status/planned
    on Nov 22, 2026
  12. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-implement-devops-cli-4406-975fa5 ended: failed.
    Image digest: sha256:ac37478e14c1fda5565036365e77c0539d823e66d1366aeeb98a059076972fb4

    The last lines of its log:

    Disk use of the worktree and the home at the end of step Create the plan with the target release, the release sections, the update policy, the advisories and the config load: 2.5 GB. Largest folders: .cache 1.1 GB, worktree/.venv 1.1 GB, worktree/node_modules 86.8 MB, worktree/openspec 68.9 MB, worktree/.git 56.1 MB, .data 53.0 MB, worktree/tests 32.9 MB, .npm 20.0 MB.
    ✗ Could not run the phase: The model refused the key (HTTP 403).
    

    Failure class: ci_infra.
    Action taken: none.
    Action left: retry: run the item again.

    The Job left this item without a result. The item is Blocked. When a retry can fix the class of the stop, the Service starts a new Job in the next round. The limit is roadmap.implement.continuations_per_item, and the comment of that round says so. If no continuation is left, fix the cause. Then comment implement: retry. A new runner image also clears the stop. This holds only if a retry can fix the class of the stop. The limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item must also allow it.

  13. added
    status/blocked
    and removed
    owner/service
    status/in-progress
    on Nov 22, 2026
  14. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Returned under rule 2 (premise stale against origin/main): k8s/llm/gateway/deployment.yaml:46 already runs ghcr.io/berriai/litellm:1.110.2 (updated from v1.103.11 in commit fb349e537, PR #6817). The current plan assumes v1.103.11 is the pinned running image and rollback target and documents releases between v1.103.11 and a target beyond 1.103. Note that .github/renovate.json:255 still references #4406, so this should either be re-scoped to a general k8s/llm/gateway/UPGRADE.md against 1.110.2 or closed alongside updating .github/renovate.json.

  15. added
    status/new
    and removed
    status/blocked
    on Nov 25, 2026
  16. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    Closed: the gateway is already past the planned upgrade.

    dan-petty/homelab pins LiteLLM 1.111.0, newer than the 1.108.4 that this item planned for, and Renovate there takes later releases. The gateway manifests left this repository, so k8s/llm/gateway/UPGRADE.md has no home. The unused plan folder openspec/changes/4406-plan-the-litellm-upgrade-beyond-1/ can be removed.

  17. removed
    status/new
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions