Skip to content

fix(asr): 修复百炼 ASR 连通性校验死锁并透出详细错误信息#848

Merged
H-Chris233 merged 1 commit into
Open-Less:betafrom
lvsao:fix/bailian-asr-validation
Jul 21, 2026
Merged

fix(asr): 修复百炼 ASR 连通性校验死锁并透出详细错误信息#848
H-Chris233 merged 1 commit into
Open-Less:betafrom
lvsao:fix/bailian-asr-validation

Conversation

@lvsao

@lvsao lvsao commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

摘要

修复阿里云百炼(Bailian/DashScope)实时 ASR 供应商点击验证始终显示「操作失败」的问题。

修复

  1. 后端死锁(bailian.rs): inish_error() 未调用 self.task_started.notify_waiters()。当 WebSocket 连接或 DashScope 会话建立过程中发生错误时,send_last_frame() 中等待 ask_started 的异步 Notify 无法收到唤醒信号,导致 5 秒超时,最终抛出 FinalResultTimeout,掩盖了真实的 DashScope 错误原因。

  2. 前端错误吞没(ProvidersSection.tsx):providerErrorMessage() 中所有未匹配特定前缀的错误消息均降级为 ('common.operationFailed')(「操作失败」)。现已放行 ask failed: / connection failed: / send failed: 等后端原始错误文案,使用户能看到具体的失败原因。

兼容

  • 不包含破坏性变更
  • 对现有用户无影响
  • 构建流程无变化

测试计划

  • 使用 Node.js 脚本验证 DashScope WebSocket 协议:run-task → send silence → finish-task → task-finished 流程正常
  • 验证错误 API Key 场景下不再 5 秒超时而是快速返回具体错误

@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@lvsao lvsao changed the title fix(asr): resolve Bailian ASR validation deadlock and surface error d… fix(asr): 修复百炼 ASR 连通性校验死锁并透出详细错误信息 Jul 21, 2026
@H-Chris233 H-Chris233 self-assigned this Jul 21, 2026
@H-Chris233

Copy link
Copy Markdown
Collaborator

批准合并

@H-Chris233
H-Chris233 merged commit 8263f6f into Open-Less:beta Jul 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants