Skip to content

chore(llm): Find why fallbacks did not serve parser-failed calls #3553

Open

Description

@devops-cli-service

Update 2026-11-26 (infra move): the gateway config is now in dan-petty/homelab.

Argo CD reads k8s/llm/gateway/config.yaml from dan-petty/homelab. The k8s row of devops ci no longer renders it, so the requirement "The gateway config renders" cannot run here. Check the fallbacks in homelab. The roadmap.implement.ladder work stays in devops-cli.


Split from #3053.

Three stops (#2554, #2579 and #3318) failed with class parser and action change_tier. At that time the gateway config gave devops-coder the fallbacks devops-reasoning and devops-chat. The file is now k8s/llm/gateway/config.yaml of dan-petty/homelab, and it gives devops-coder the fallback devops-chat. No fallback served these three calls. Why deferred: the answer needs the gateway logs and the cluster state of the window 2026-11-03T15:05Z to 2026-11-04T15:05Z. No offline test provides them. A person or an outside event must settle the cause. Acceptance criteria: - [ ] The issue names the cause for each of the three calls. - [ ] The issue names the change that makes a fallback serve a failed call. - [ ] A test covers the change, or the issue states why no offline test can.

Proposed design

Problem statement

Three implement stops (#2554, #2579 and #3318) failed with class parser and action change_tier, and no gateway fallback served them. The repository holds the cause of the provider failure and the client recovery. The stop reason does not say why a resend on the same tier cannot help. So an operator cannot tell that the ladder is the fix. This change adds that statement to the stop reason. The check of the gateway fallbacks and the window's logs needs the homelab repository, so a new issue holds it.

Acceptance criteria

Requirement: A parser stop names the change that serves the call

The reason of a step that stops with class parser on a ladder of one tier SHALL state that a resend of the same conversation fails the same way and that a second tier of roadmap.implement.ladder serves the call.

Scenario: A one-tier parser stop names the ladder change

  • WHEN uv run devops ci test tests/roadmap/implement/test_roadmap_implement_one_tier.py runs
  • THEN test_a_parser_stop_names_the_change_that_serves_the_call passes, and the reason holds the new line before its last line, which stays MESSAGES.roadmap.implement_stop_one_tier with devops-coder.

Requirement: Another change_tier stop keeps its reason

The reason of a step that stops with a class other than parser on a ladder of one tier SHALL NOT hold the parser note.

Scenario: A stop of another class on one tier

  • WHEN uv run devops ci test tests/roadmap/implement/test_roadmap_implement_one_tier.py runs
  • THEN test_a_change_tier_stop_of_another_class_keeps_its_reason passes, and the reason holds no parser note.

Existing Tool Considered

No alternatives check has run on this item. LiteLLM is the open, maintained gateway, and it provides the retries and the fallbacks (SECURITY.md:40). It does not cover the need. The failure reaches the client inside an open stream as an HTTP 400 (tests/roadmap/implement/test_roadmap_implement_step_parser.py). The gateway config that holds its retry and fallback policy moved to k8s/llm/gateway/config.yaml of dan-petty/homelab, so this repository cannot show that policy. The client ladder covers the need. The change builds one message and one test: about 1,000 tokens and 15 minutes to build, keep and fix.

Key questions

  • Why did no gateway fallback serve a parser-failed call?: The provider fails inside an open stream, and the client receives an HTTP 400 there. The gateway config that holds the fallback list and the retry policy moved to k8s/llm/gateway/config.yaml of dan-petty/homelab, so this repository cannot show why the fallback did not fire. The client recovery is the tier move. A new issue checks the homelab config and the window's logs. [sources: tests/roadmap/implement/test_roadmap_implement_step_parser.py, docs/roadmap/implement.md:18, docs/ENV_VARS.md:246]
  • What change makes a fallback serve a parser-failed call?: A second tier in roadmap.implement.ladder. A new tier is a new agent with a new conversation, so it gets its own smaller-edit request, and a parser failure that selects change_tier moves the step there. The code supports more tiers, and the parser test proves the move. (best practice) [sources: docs/roadmap/implement.md:14, docs/roadmap/implement.md:18, docs/ENV_VARS.md:246, tests/roadmap/implement/test_roadmap_implement_step_parser.py]
    • Chosen: Name a second tier in roadmap.implement.ladder. A new tier is a new conversation, and the parser test proves the move.
    • Rejected: Restore the devops-coder fallbacks to devops-reasoning and devops-chat. That list is a backend-unavailable fallback, and it is in the homelab config now.
    • Rejected: Add a gateway retry for the in-stream 400. The gateway config is in homelab, and a resend of the same conversation fails the same way.
  • Should the change set two tiers in the live ladder?: No. The owner decision of 2026-11-10 (fix(k8s): one implement ladder in template, cluster and README #4371) names one DeepSeek tier for edit and repair. The cluster doc records that a step has one tier, so a failure that selects change_tier ends the step. A second tier is a later owner decision. (best practice) [sources: SECURITY.md:40, docs/CLUSTER.md:61, k8s/devops/configmap.example.yaml]
    • Rejected: Set two tiers in the live ladder now. It contradicts the owner decision, and a hosted tier sends repository code to another provider.
    • Chosen: Keep one tier and name the second tier as the option. It follows the recorded decision and still answers the issue.
  • What caused the three stops fix(sandbox): Pull the sandbox image before container creation #2554, fix(argo): show repo for multi-source Argo apps #2579 and feat(roadmap): the stage context lists sibling trees of a created file #3318?: The archived parser change names it: the three stops held XML syntax error ... unexpected EOF. The provider could not read a long tool call, for example a file of about 100 lines in one write_file call. The failure is deterministic for one conversation. [sources: openspec/changes/archive/2026-11-06-3053-parser-smaller-edit/proposal.md, openspec/changes/archive/2026-11-06-3053-parser-smaller-edit/design.md, docs/roadmap/implement.md:18]
  • Does a resend of the same conversation serve the failed call?: No. The failure is deterministic for one conversation, so a resend fails the same way. The step asks once on each tier for a smaller edit, and then moves to the next tier. (best practice) [sources: tests/roadmap/implement/test_roadmap_implement_step_parser.py, docs/roadmap/implement.md:18, openspec/changes/archive/2026-11-06-3053-parser-smaller-edit/design.md]
    • Rejected: Add a second resend on the same tier. The failure is deterministic, so the resend repeats it and spends more tokens.
    • Chosen: Keep one smaller-edit ask on each tier, then move. It bounds the cost, and the parser test covers the ask and the move.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/chore
    status/new
    value/medium
    effort/medium
    on Nov 5, 2026
  2. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    ContributorAuthor

    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: none. The title has the scope llm, and .github/labels.yml declares no scope/llm label. Add the label to the file to give the scope to this item.
    • Priority: P3-Low. The task is blocked on external gateway logs and cluster state that no offline test can provide.
    • Value: Medium. Understanding why fallbacks fail improves gateway reliability for all callers.
    • Effort: Medium. Requires log analysis, cluster state inspection, a named fix, and a test or written justification.
    • Related: fix(k8s): the coder tier serves no second chat model #3485, which asks for a different change. Both reference the same gateway config and the same time window, but #3485 fixes the coder tier capacity while this item diagnoses why fallbacks did not serve parser-failed calls.
  3. added
    priority/p3-low
    on Nov 5, 2026
  4. changed the title [-]chore(llm): find why the gateway fallbacks did not serve the parser-failed calls[/-] [+]chore(llm): Find why fallbacks did not serve parser-failed calls[/+] on Nov 6, 2026
  5. dan-petty commented on Nov 6, 2026

    @dan-petty
    Owner

    The job shortened the title of this item. The summary had 68 characters, and the limit is 60. The type and the scope stay.

    • Before: chore(llm): find why the gateway fallbacks did not serve the parser-failed calls
    • After: chore(llm): Find why fallbacks did not serve parser-failed calls
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at 1b37dbc until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • Who supplies the gateway logs and the cluster state of the window 2026-11-03T15:05Z to 2026-11-04T15:05Z? (a person decides)
  7. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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/p3-lowsource/agentstatus/newtype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions