Skip to content

fix(model-runtime): complete streaming invocation callbacks - #376

Merged
WH-2099 merged 2 commits into
mainfrom
fix/streaming-llm-callbacks
Oct 29, 2026
Merged

WH-2099 merged 2 commits into
mainfrom
fix/streaming-llm-callbacks

Conversation

@WH-2099

@WH-2099 WH-2099 commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Important

Read the contribution guidelines and checked related issues and pull requests.

Related Issue

Closes #375

Summary

Streaming LLM completion callbacks currently omit tool calls, and exceptions raised while reading the stream skip the error callback.
Include assembled tool calls in on_after_invoke using the existing delta merger, and notify on_invoke_error with the original exception before propagating stream failures.
Invocation, token counting, and callback signatures consistently accept Sequence[PromptMessage], matching their read-only use of the input collection.

Regression coverage exercises complete calls, interleaved argument fragments, and failures before or after the first chunk, with blocking calls as controls.
Existing scenarios also use tuple prompts: four argument-type errors reproduce the restrictive signatures, and the updated signatures pass the full type check.

Validation:

  • just check: passed, including full type checking.
  • Model dispatch tests: 55 passed.
  • just test: 1067 passed.

Checklist

  • This pull request links the issue it resolves or advances
  • This pull request title follows Conventional Commits, and any breaking change is marked with !
  • If CLA Assistant prompted me, I signed CLA.md in the pull request conversation

Copilot AI balanced review requested due to automatic review settings October 28, 2026 13:31
@WH-2099 WH-2099 self-assigned this Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@WH-2099
WH-2099 force-pushed the fix/streaming-llm-callbacks branch from bd92369 to bb1ed6b Compare October 29, 2026 06:46
Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@WH-2099
WH-2099 merged commit 7b5ce13 into main Oct 29, 2026
10 of 13 checks passed
@WH-2099
WH-2099 deleted the fix/streaming-llm-callbacks branch October 29, 2026 10:17
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.

fix(model-runtime): complete streaming invocation callbacks

3 participants