Skip to content

fix(agentchat): persist sources in TextMentionTermination component config - #8363

Open
MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/text-mention-termination-sources-config
Open

MOHAMMED WASIM KHAN (wasim-builds) wants to merge 1 commit into
microsoft:mainfrom
wasim-builds:fix/text-mention-termination-sources-config

Conversation

@wasim-builds

Copy link
Copy Markdown

Fixes #8282

Summary

When using declarative component serialization (dump_component() / load_component()), TextMentionTerminationConfig previously only included text: str. Any scoped sources configured on the condition (e.g. sources=["writer"]) were lost during serialization, causing the restored termination condition to match mentions from any speaker (such as user prompts).

This PR:

  1. Adds sources: List[str] | None = None to TextMentionTerminationConfig.
  2. Serializes sources in TextMentionTermination._to_config().
  3. Passes sources=config.sources in TextMentionTermination._from_config().
  4. Adds a component round-trip test verifying sources filtering is preserved across serialization.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reached their quota limit.

This branch has not been deployed

No deployments
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.

TextMentionTermination(sources=...) drops sources on dump_component / load_component

2 participants