Repository navigation
Description
Problem or Motivation
The hosted groups of the gateway have no fallback. When Anthropic answers an error, a rate limit, or the account reaches its spend limit (this happened on 2026-11-02), a call to claude-sonnet-5-5 fails, and nothing else can answer. The evaluation of 2026-11-02 measured which hosted models can stand in for it.
Review of a plan, recall of the known defects of 12 golden plans (the cited files as context, no tools; matching by an independent agent, .data/agent/scratch/model-eval/):
| Model | Recall | Recall of major defects | Cost of one review (estimate) |
|---|---|---|---|
claude-sonnet-5-5 |
56% | 68% | about 0.03 USD |
deepseek-v4.1-flash-1017 |
38% | 48% | about 0.001 USD |
claude-haiku-5-5 |
36% | 46% | about 0.002 USD |
| Gemini 3 Flash, 3.8 Flash | 24 to 25% | 28 to 34% | free tier, 20 requests a day |
| Gemini 3.1 and 3.5 Flash Lite, Gemini 3.6 Flash, Gemma 4 | 7 to 14% | 8 to 18% | free tier |
Local qwen3.8:27b, qwen3-coder:30b |
22 to 23% | 30 to 32% | none |
Gemini 2.5 Flash and 2.5 Flash Lite answer 404 ("no longer available to new users"). Gemma 4 on the free tier takes 16000 input tokens a minute, below one review prompt of 8 to 16 thousand tokens plus the answer, and below the 19000 tokens of a stage prompt.
Proposed Solution & Architectural Design
Add one fallback to router_settings.fallbacks of k8s/llm/gateway/config.yaml: claude-sonnet-5-5 falls back to deepseek-v4.1-flash-1017. No other hosted group joins a fallback: Flash Lite, Gemma and the older Gemini models find only the missing paths that a deterministic gate already finds, so they are not suitable. Haiku is no better than DeepSeek and costs more per token.
The hosted-group check changes from "no fallback names a hosted group" to: a fallback may link a hosted group to a hosted group only, and never an Ollama group to a hosted group, so a prompt leaves the cluster only when its caller names a hosted group. SECURITY.md rule 12 and the README say that a fallback sends the prompt to the OpenRouter provider and not to Anthropic.
Target Subsystem
k8s/llm/gateway/config.yaml, tests/ai/benchmark/test_k8s_llm_gateway.py, k8s/README.md, SECURITY.md.
Existing Tool Considered
LiteLLM router_settings.fallbacks. No new tool. Cost: about 15k tokens.
Activity
dan-petty commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.Prevents a total outage when Anthropic is unavailable, but the fallback has lower recall so it is a resilience improvement, not a fix.Keeps the gateway responsive during provider failures, though with degraded quality.One YAML entry, one test update, and two doc edits; no new tool or architecture change.Both target k8s/llm/gateway/config.yaml and involve deepseek-v4.1-flash-1017; #3144 adds the model as a gateway group, while this candidate adds a fallback rule that references it.merge: bring in origin/main (#3152)
docs(security): shorten rule 12 under the step cap (#3152)
chore(main): release 0.41.0 (#3161)