fix(asr): add MiMo provider to credential gate validation#713
Open
GanAO wants to merge 1 commit into
Open
Conversation
`ensure_asr_credentials()` did not handle the `xiaomi-mimo-asr` provider, causing it to fall through to the default Volcengine credential check. This blocked all MiMo ASR users with "请先在设置中填写火山引擎 ASR App Key". Added `is_mimo_provider()` to the credential gate condition so MiMo users are validated via `AsrApiKey` (same as Whisper/Bailian providers).
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
User description
问题描述
使用
xiaomi-mimo-asr作为 ASR provider 时,语音输入被拦截,报错:根本原因
ensure_asr_credentials()函数(位于coordinator/asr_wiring.rs)没有处理 MiMo provider。当前验证逻辑:
MiMo provider 不匹配任何条件,fall through 到第 5 步,被火山引擎凭证检查拦截。
修复方式
在第 4 步的条件中添加
is_mimo_provider(&active_asr),让 MiMo 走与其他 API Key 类型 provider 相同的验证路径:测试
xiaomi-mimo-asrprovider 成功完成语音输入PR Type
Bug fix
Description
Fix MiMo provider credential gate validation
Add
is_mimo_provider()to conditionDiagram Walkthrough
flowchart LR A["Credential gate"] --> B{"Provider?"} B -- "Whisper/Bailian/MiMo" --> C["Check API Key"] B -- "Other" --> D["Volcengine error"]File Walkthrough
asr_wiring.rs
Add MiMo provider to credential gate conditionopenless-all/app-tauri/src-tauri/src/coordinator/asr_wiring.rs
is_mimo_provider()to credential gate condition