Skip to content

fix(channels): handle SDK messages stream events#3273

Draft
player0718 wants to merge 1 commit into
bytedance:mainfrom
player0718:fix/runtime-high-value-scout
Draft

fix(channels): handle SDK messages stream events#3273
player0718 wants to merge 1 commit into
bytedance:mainfrom
player0718:fix/runtime-high-value-scout

Conversation

@player0718
Copy link
Copy Markdown
Contributor

Summary

  • accept LangGraph SDK event: "messages" chunks in streaming channel responses
  • preserve existing messages-tuple handling for compatibility
  • update the Feishu channel streaming regression test to reproduce the SDK event shape

Why

Streaming IM channels request stream_mode=["messages-tuple", "values"], but the current LangGraph SDK emits message chunks with event: "messages". ChannelManager previously only accumulated messages-tuple, so Feishu/WeCom-style streaming users could miss incremental AI updates and only receive the later final value fallback.

Validation

  • cd backend && PYTHONPATH=. uv run pytest tests/test_channels.py -q -k "stream or streaming"
  • cd backend && PYTHONPATH=. uv run pytest tests/test_runtime_lifecycle_e2e.py tests/test_gateway_services.py -q
  • cd backend && uv run ruff check app/channels/manager.py tests/test_channels.py
  • cd backend && uv run ruff format --check app/channels/manager.py tests/test_channels.py
  • git diff --check origin/main...HEAD

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants