refactor(xiaoyi): refactor connection to dual WebSocket & fix unusable channel#5274
Merged
Merged
Conversation
|
Hi @hongxicheng, this is your 123rd Pull Request. 📋 About PR TemplateTo help maintainers review your PR faster, please make sure to include:
Complete PR information helps speed up the review process. You can edit the PR description to add these details. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
rayrayraykk
approved these changes
Jun 17, 2026
This was referenced Jun 17, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Refactor the XiaoYi channel from a single WebSocket connection to a
dual-connection architecture (primary domain + backup IP), and align
the A2A protocol with the official
@ynhcj/xiaoyi-channelplugin.Changes
Connection Refactor
XiaoYiConnectionclass to encapsulate a single WebSocketlink (connect, heartbeat, receive, send)
hag.cloud.huawei.com) and backup(
116.63.174.231) endpoints in paralleldelivered the request, with automatic fallback
A2A Protocol Alignment
_on_process_completed(instead of the legacy_run_process_loop) to sendstatus-update(completed)+artifact-update(final=true)— fixes the "running" state stuckissue on XiaoYi App
msgDetailwithagentIdandhostnamemsgDetailwith millisecondtimestamplastChunk: trueto matchofficial plugin behavior
Configuration Simplification
ws_url/ws_url_backupfrom backendconfig (
XiaoYiConfig), frontend form (ChannelDrawer), andTypeScript types — the endpoints are fixed SaaS URLs hardcoded
as constants
ak,sk, andagent_idCleanup
_run_process_loopoverride (legacy non-queue path)_default_backup_url()helperDEFAULT_WS_URL/DEFAULT_WS_URL_BACKUPfrom__init__.pyexports (internal constants)Related Issue: Fixes #1911 #3840
Security Considerations: [If applicable, e.g. channel auth, env/config handling]
Type of Change
Component(s) Affected
Checklist
pre-commit run --all-fileslocally and it passespytestor as relevant) and they passFor Channel Changes (DingTalk, Feishu, QQ, Console, etc.)
./scripts/check-channels.sh(or./scripts/check-channels.sh --changed) and it passestests/contract/channels/test_<channel>_contract.py(REQUIRED)create_instance()with proper channel initializationtests/contract/channels/__init__.py)tests/unit/channels/test_<channel>.pyfor complex internal logicTesting
[How to test these changes]
Local Verification Evidence
Additional Notes
[Optional: any other context]