Skip to content

fix(asr): add MiMo provider to credential gate validation#713

Open
GanAO wants to merge 1 commit into
Open-Less:betafrom
GanAO:fix/mimo-credential-gate
Open

fix(asr): add MiMo provider to credential gate validation#713
GanAO wants to merge 1 commit into
Open-Less:betafrom
GanAO:fix/mimo-credential-gate

Conversation

@GanAO

@GanAO GanAO commented Jun 19, 2026

Copy link
Copy Markdown

User description

问题描述

使用 xiaomi-mimo-asr 作为 ASR provider 时,语音输入被拦截,报错:

[WARN] [coord] ASR credential gate failed: 请先在设置中填写火山引擎 ASR App Key 和 Access Key

根本原因

ensure_asr_credentials() 函数(位于 coordinator/asr_wiring.rs)没有处理 MiMo provider。

当前验证逻辑:

  1. ✅ 本地 Qwen3-ASR → 跳过验证
  2. ✅ Foundry Whisper → 跳过验证
  3. ✅ sherpa-onnx → 跳过验证
  4. ✅ Whisper 兼容 / 百炼 → 检查 API Key
  5. 其他所有 provider → 强制检查火山引擎凭证

MiMo provider 不匹配任何条件,fall through 到第 5 步,被火山引擎凭证检查拦截。

修复方式

在第 4 步的条件中添加 is_mimo_provider(&active_asr),让 MiMo 走与其他 API Key 类型 provider 相同的验证路径:

// Before
if is_whisper_compatible_provider(&active_asr) || is_bailian_provider(&active_asr) {

// After
if is_whisper_compatible_provider(&active_asr)
    || is_bailian_provider(&active_asr)
    || is_mimo_provider(&active_asr)
{

测试

  • 使用 xiaomi-mimo-asr provider 成功完成语音输入
  • 历史记录正常保存
  • 无 "ASR credential gate failed" 错误
  • 流式润色正常工作

PR Type

Bug fix


Description

  • Fix MiMo provider credential gate validation

  • Add is_mimo_provider() to condition


Diagram Walkthrough

flowchart LR
  A["Credential gate"] --> B{"Provider?"}
  B -- "Whisper/Bailian/MiMo" --> C["Check API Key"]
  B -- "Other" --> D["Volcengine error"]
Loading

File Walkthrough

Relevant files
Bug fix
asr_wiring.rs
Add MiMo provider to credential gate condition                     

openless-all/app-tauri/src-tauri/src/coordinator/asr_wiring.rs

  • Added is_mimo_provider() to credential gate condition

`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).
@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

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

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