Repository navigation
fix(core): re-land malformed stream retry with narrower nameless detection #6794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8868a13
Revert "Revert "fix(core): retry malformed streamed responses (#6754)…
yiliang114 69e8959
fix(core): narrow nameless tool-call detection to stop false-positive…
yiliang114 a1cbe8f
fix(core): preserve thinking tag stream boundaries
yiliang114 b64cc65
fix(core): address malformed stream review feedback
yiliang114 58ba47b
fix(core): tighten malformed stream retry signals
yiliang114 44c2d31
fix(core): address remaining stream review feedback
yiliang114 016a343
Merge remote-tracking branch 'origin/fix/core-retry-malformed-streams…
yiliang114 9dab333
test(core): cover stream review edge cases
yiliang114 46f93d3
fix(core): address stream review regressions
yiliang114 845833e
refactor(core): remove duplicate thinking tag state
yiliang114 e8caec7
fix(core): close reverse-order stream validation gaps
yiliang114 b21c48b
Merge remote-tracking branch 'origin/main' into cx/pr-6794-review-fixes
yiliang114 7011652
fix(core): preserve cross-channel tag evidence
yiliang114 0802b53
Merge commit '70116529f4efb06daed01cb68c068b6cb2f3e669' into cx/pr-67…
yiliang114 b012237
test(core): cover split cross-channel tags
yiliang114 294c37b
fix(core): close remaining stream routing gaps
yiliang114 72b7e9f
fix(core): handle late tool call names
yiliang114 f193d5b
fix(core): preserve active tool call routes
yiliang114 2b879a0
test(core): cover malformed stream edge cases
yiliang114 53a299d
fix(core): preserve streaming tool call routes
yiliang114 695431e
refactor(core): simplify malformed stream validation
yiliang114 6267c43
docs(core): clarify invalid stream retry budget
yiliang114 639de23
Merge branch 'fix/core-retry-malformed-streams-v2' of github.com:Qwen…
yiliang114 edb7bc2
Merge branch 'fix/core-retry-malformed-streams-v2' of github.com:Qwen…
yiliang114 11ab8a1
fix(core): preserve valid streamed metadata boundaries
yiliang114 6f4ffd5
fix(core): deduplicate streamed tool metadata
yiliang114 8be58e5
Merge remote-tracking branch 'origin/main' into cx/pr-6794-review-fixes
yiliang114 3cf6835
fix(core): preserve streamed protocol line boundaries
yiliang114 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2025 Qwen | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /** | ||
| * Custom error to signal invalid model stream content that should be retried. | ||
| */ | ||
| export class InvalidStreamError extends Error { | ||
| readonly type: | ||
| | 'NO_FINISH_REASON' | ||
| | 'NO_RESPONSE_TEXT' | ||
| | 'PROTOCOL_TAG_LEAK' | ||
| | 'MALFORMED_TOOL_CALL'; | ||
|
|
||
| constructor(message: string, type: InvalidStreamError['type']) { | ||
| super(message); | ||
| this.name = 'InvalidStreamError'; | ||
| this.type = type; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.