Repository navigation
Description
Context & Rationale
#430 added parameter-count floors (reasoning >=30B, coding >=7B) in src/devops_cli/ai/capability.py. They are inferred from the model name, and a name it cannot parse passes (capability.py:105). The gate runs in GatewayRouter.trigger_failover (src/devops_cli/ai/gateway.py:509) and in ConstellationManager.failover. trigger_failover is a manual CLI path that no live request uses. Live failover is LiteLLM's static fallbacks (k8s/llm/gateway/configmap.yaml:136-138). There, devops-reasoning falls to devops-coder. While both were vLLM deployments (32B AWQ and 14B AWQ) that was the edge the 30B floor forbids; vLLM was removed in #734 and both groups now route to ollama_chat/qwen3-coder:30b on ollama-48gib, so the edge meets the floor but fails over to the same backend. devops-coder falls to devops-reasoning, then to devops-chat (now Qwen3.8 27B). Only the chat task uses these fallbacks. Reviews use devops-review, which has no fallback but shuffles across two models (qwen3-coder:30b and gpt-oss:20b). probe_backend (gateway.py:624) checks health only. gateway tune measures capacity and cost only. vibes' 0%-vs-85%+ figures describe a 70B tier that is not deployed here, and they have not been measured.
Scope & Deliverables
- Context & Rationale*: feat(ai): capability-gated model failover & aimd batch recovery #430 added parameter-count floors (reasoning >=30B, coding >=7B) in
src/devops_cli/ai/capability.py. They are inferred from the model name, and a name it cannot parse passes (capability.py:105). The gate runs inGatewayRouter.trigger_failover(src/devops_cli/ai/gateway.py:509) and inConstellationManager.failover.trigger_failoveris a manual CLI path that no live request uses. Live failover is LiteLLM's staticfallbacks(k8s/llm/gateway/configmap.yaml:136-138). There,devops-reasoningfalls todevops-coder. While both were vLLM deployments (32B AWQ and 14B AWQ) that was the edge the 30B floor forbids; vLLM was removed in feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734 and both groups now route toollama_chat/qwen3-coder:30bonollama-48gib, so the edge meets the floor but fails over to the same backend.devops-coderfalls todevops-reasoning, then todevops-chat(now Qwen3.8 27B). Only thechattask uses these fallbacks. Reviews usedevops-review, which has no fallback but shuffles across two models (qwen3-coder:30bandgpt-oss:20b).probe_backend(gateway.py:624) checks health only.gateway tunemeasures capacity and cost only. vibes' 0%-vs-85%+ figures describe a 70B tier that is not deployed here, and they have not been measured. - Deliverable*: Slice 1 is report-only: a capability pass in
devops ai gateway tune. Extend the stdlib in-pod runner (gateway_bench.py) to return reply text. Itsrun_levelkeeps onlyusage.completion_tokenstoday. Send vibes' four probes (5-field JSON, 10-tool choice, deep recall, explicit prohibition) in the production prompted format. Do not use nativetools/response_format, because reviews do not use them. Score on the CLI side withpydantic_evals, which the pinnedpydantic-aialready installs: aDatasetofCases, deterministic evaluators andevaluate(repeat=N). Also record whetherresponse_repair.fix_llm_responsehad to repair the reply. Persist results per deployment id in feat(ai): llm gateway tuning cost from real traffic and no-load capacity estimates #477's store. Slice 2 comes with feat(ai): llm gateway tuning render and apply configuration with rollback #478: floors read these records instead of parameter counts. The rendered config drops below-floorfallbackstargets and flags below-floordevops-reviewdeployments. Slice 3 adds a client-side floor check onserved_by(feat(ai): llm gateway calls record their serving backend in the spend ledger #474). Out of scope: task-class ordering driven by 429 responses. Local offload of mechanical sub-agent work already exists (src/devops_cli/ai/harness/slots.py:133,363). - Constraint*: A gate only in
GatewayRouternever touches real traffic. Probing a model group averages two models into one number. A 32K recall probe exceededdevops-coder'smax_input_tokens: 12288, but that was vLLM's 16K window and went with vLLM in feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734; the Ollama tiers the gateway routes to now allow 48000 to 160000 tokens (OLLAMA_CONTEXT_LENGTHink8s/llm/profiles/ollama-profiles.yaml), so windows still differ per deployment. Size it per deployment, asdeployment_prompt_tokens(gateway_tune.py:243) already does. Four prompts are a smoke test and do not replace feat(review): per-model review quality baseline for the devops-review pool #475's whole-review baseline. Record pass counts over repeated temperature-0 trials. Report a deployment that was never probed as unmeasured rather than passing. Change no routing until slice 1 has run. - Measured*:
grep -c 'model_name: devops-review' k8s/llm/gateway/configmap.yamlgives 4 deployments.awk '/model_name: devops-review/{f=1;next} /model_name:/{f=0} f && /model:/{print $2}' k8s/llm/gateway/configmap.yaml | sort -u | wc -lgives 2 models. Thetool-call-parser|enable-auto-tool-choicegrep no longer applies: those were vLLM flags, and vLLM was removed in feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734.grep -rln pydantic_evals src tests | wc -lgives 0. - Source*: vibes
observations/devops-cli/20-model-failover-capability-cliffs-and-one-way-degradation-ratchets.md, vibesobservations/devops-cli/06-rate-limits-and-anti-brittle-heuristics.md, vibesobservations/devops-cli/05-harness-slots-and-subagent-offloading.md
Update 2026-10-08: refinement
devops-review falls back to devops-background (k8s/llm/gateway/configmap.yaml:196), so 'which has no fallback' no longer holds, and it has 3 deployments, not 4. The router is least-busy (:177) and ignores weights, so slice 2 cannot starve a deployment through them. Per the owner's #1001 decision, floors come from probe records keyed by deployment, and the name-parsed counts in ai/capability.py go.
Proposed design
Problem statement
The current failover capability checking in devops-cli relies on parameter-count floors inferred from model names, which are outdated and do not reflect actual deployment capabilities. This leads to incorrect failover decisions and potential routing to underpowered models.
Acceptance criteria
- Criterion 1: A capability pass is reported in
devops ai gateway tunecommand
Verification: Rundevops ai gateway tuneand verify that it reports capability pass results for deployments - Criterion 2: Four probe prompts are sent to production prompted format
Verification: Verify that the four probes (5-field JSON, 10-tool choice, deep recall, explicit prohibition) are sent in the production prompted format - Criterion 3: Results are scored using pydantic_evals with deterministic evaluators
Verification: Run a test withpydantic_evalsand verify that it correctly evaluates the probe responses with deterministic evaluators - Criterion 4: Probe results are persisted per deployment id in store from feat(ai): llm gateway tuning cost from real traffic and no-load capacity estimates #477
Verification: Check that probe results for each deployment are stored in the persistence layer referenced by issue feat(ai): llm gateway tuning cost from real traffic and no-load capacity estimates #477
Key questions
- What is the current mechanism for failover capability checking?: The current mechanism relies on parameter-count floors inferred from model names, which are defined in
src/devops_cli/ai/capability.pyand enforced inGatewayRouter.trigger_failoverandConstellationManager.failover. [sources: src/devops_cli/ai/capability.py, src/devops_cli/ai/gateway.py:509] - Should the gate in GatewayRouter touch real traffic?: No, a gate only in
GatewayRouternever touches real traffic. [sources: src/devops_cli/ai/gateway.py:509] - What is the current structure of fallbacks for devops-review?: Currently,
devops-reviewfalls back todevops-background, and there are 3 deployments using this pattern. [sources: src/devops_cli/ai/gateway.py:196]
Open questions
- What are the specific changes needed to replace parameter-count floors with capability probes? (missing verified source)
- How will the probe records be used instead of parameter counts? (missing verified source)
- What is the expected behavior of the probe backend? (missing verified source)
Fit
Needs splitting into 3 items:
- Slice 1: Report-only capability pass in devops ai gateway tune with probe backend extension
- Slice 2: Floors read probe records instead of parameter counts
- Slice 3: Client-side floor check on served_by
Suspected block
None.
Dependencies
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Review
Activity
dan-petty commentedon Oct 1, 2026
Moved from the shipped v0.2.23 to the backlog. It is still valid (checked 2026-10-01), and P2 items don't displace P1 work in the planned releases.
dan-petty commentedon Oct 17, 2026
Proposal needs splitting into 3 items at 3dd7fa6 (see proposed design in issue body).
chore(main): release 0.4.0 (#1960)