Skip to content

feat(k8s): fall back from Sonnet to DeepSeek - #3154

Merged
dan-petty merged 4 commits into
mainfrom
feat/3152-fall-back-from-claude-sonnet-to-deepseek
Nov 2, 2026
Merged

dan-petty merged 4 commits into
mainfrom
feat/3152-fall-back-from-claude-sonnet-to-deepseek

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

What changes

The gateway falls back from claude-sonnet-5-5 to deepseek-v4.1-flash-1017 when a Sonnet call fails (an Anthropic error, a rate limit or a spend limit).

  • k8s/llm/gateway/config.yaml: one fallback, claude-sonnet-5-5: [deepseek-v4.1-flash-1017].
  • The hosted-group check: a fallback may link a hosted group to a hosted group, and fails when a group that is not hosted falls back to a hosted group (new broken edit). A context-window fallback or a routing group still may not name a hosted group.
  • k8s/README.md and SECURITY.md rule 12: the prompt of a failed Claude call goes to OpenRouter, not to Anthropic.

Why

Hosted groups had no fallback, and the Claude account reached its spend limit on 2026-11-02. In the review of 12 golden plans, DeepSeek found 38% of the known defects (48% of the major ones) against 56% (68%) for Sonnet 5.5. Haiku 5.5 found 36% and costs more per token. The Gemini Flash Lite, Gemma 4 and older Gemini models found 7 to 25%, Gemini 2.5 answers 404 for a new account, and Gemma 4 on the free tier takes only 16000 input tokens a minute, so none of them is a fallback.

Verification

  • A LiteLLM v1.103.0 Router built from the two groups and this fallback answers a failed Sonnet call with openrouter/deepseek/deepseek-v4.1-flash-1017:floor. Without the fallback, it raises InternalServerError.
  • The gateway, manifest, docs and secret tests pass (964 tests).

Closes #3152

@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 2, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 2, 2026 05:50
@dan-petty
dan-petty merged commit 11dc347 into main Nov 2, 2026
19 checks passed
@dan-petty
dan-petty deleted the feat/3152-fall-back-from-claude-sonnet-to-deepseek branch November 2, 2026 05:50
dan-petty pushed a commit that referenced this pull request Nov 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.41.0](v0.40.0...v0.41.0)
(2026-11-02)


### Features

* **k8s:** fall back from Sonnet to DeepSeek
([#3154](#3154))
([11dc347](11dc347)),
closes [#3152](#3152)
* **roadmap:** plan the stage job with a read-only toolbox
([#3160](#3160))
([9179b22](9179b22)),
closes [#3037](#3037)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): fall back from claude-sonnet-5-5 to deepseek-v4.1-flash-1017

1 participant