Skip to content

fix(mixin): stop failover after partial output - #801

Draft
Whxuan0701 wants to merge 1 commit into
lsdefine:mainfrom
Whxuan0701:fix/mixin-partial-stream
Draft

fix(mixin): stop failover after partial output#801
Whxuan0701 wants to merge 1 commit into
lsdefine:mainfrom
Whxuan0701:fix/mixin-partial-stream

Conversation

@Whxuan0701

@Whxuan0701 Whxuan0701 commented Sep 8, 2026

Copy link
Copy Markdown

Closes #798

What

  • Treats the first visible MixinSession chunk as the response commit point.
  • Keeps transparent failover for failures that occur before any visible output.
  • After a committed response fails, emits the terminal error once, drains the current generator for its returned content blocks, and selects the backup only for the next request.
  • Adds deterministic tests for pre-output failover, post-output failure, generator completion, and next-request routing.

Why

The old retry loop could return A-part + A-error + B-complete in one assistant response. Besides confusing users, mixing two independently generated continuations can corrupt structured output and tool calls.

Validation

  • Parent baseline f6e5657: deterministic reproduction calls both nodes and yields ['A-part', '!!!Error: reset', 'B-complete'].
  • New focused suite: 4 passed on Python 3.10.20, 3.12.13, and 3.13.14.
  • Full non-release frontend suite: 244 passed.
  • Release qualification suite: 35 passed.
  • python -m py_compile llmcore.py and git diff --check passed.

Scope

This does not change which provider/SSE errors are retryable inside a node. It only prevents cross-node failover after output has already been committed.

@Whxuan0701

Copy link
Copy Markdown
Author

Implementation and deterministic regression tests are ready in this draft. The tests cover pre-output failover, post-output commit semantics, generator completion, and routing on the next request.

@Whxuan0701
Whxuan0701 force-pushed the fix/mixin-partial-stream branch from 7411542 to becade4 Compare September 8, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MixinSession failover concatenates responses after partial output

1 participant