[asr] 火山引擎「新版控制台 API Key」模式下界面显示「未配置」,但实际可正常识别
现象
-
触发条件:ASR 提供商选用火山引擎,鉴权模式为「新版控制台 API Key」,填入 API Key 后。
-
当前表现:
概览页 ASR 卡片右上角显示灰色「未配置」徽标(同页 LLM 卡片正常显示绿色「已配置」)。但 ASR 实际工作完全正常。 -
证据:
-
界面截图:ASR 卡片显示「火山引擎 bigasr / volcengine」+「未配置」;LLM 卡片显示「DeepSeek / deepseek」+「已配置」。
-
凭据保险库(
credentials.v1.chunk.0.com.openless.app,UTF-16LE JSON)中该 provider 的实际内容:"version": 2, "active": { "asr": "foundry-local-whisper", "llm": "ark" }, "providers": { "asr": { "foundry-local-whisper": { "providerType": "volcengine", "order": 0, "lastTest": { "ok": true, "latencyMs": 278, "at": 1789227388 }, "authMode": "api_key", "volcengineApiKey": "<已设置>" } } }注意
lastTest.ok = true,即连接测试已通过,却仍判定未配置。 -
运行日志证明链路完全可用(火山识别 → DeepSeek 润色 → 文本插入):
[coord] recorder started (asr=volcengine, phase=Starting) [coord] ASR connected; flushed 3520 deferred audio bytes [asr] server JSON: {"audio_info":{"duration":10250},"result":{"text":"我是看到...","utterances":[...]}} [style-pack] llm polish assembled provider=deepseek model=deepseek-flash mode=Structured [llm] POST https://api.deepseek.com/v1/chat/completions provider=deepseek model=deepseek-flash [llm] HTTP 200 body={...,"content":"我看到在工具..."} -
直接对端点做 WebSocket 握手,同一把 API Key 返回
101 Switching Protocols:GET /api/v3/sauc/bigmodel_async Host: openspeech.bytedance.com X-Api-Key: <API Key> X-Api-Resource-Id: volc.seedasr.sauc.duration → HTTP/1.1 101 Switching Protocols而换用
volc.bigasr.sauc.duration则返回403 {"error":"[resource_id=...] requested resource not granted"}—— 可反证seedasr资源在该账号下确已开通。
-
-
判定字段:后端下发给前端的结构里含
asrConfigured、llmConfigured、omniConfigured、volcengineConfigured、arkConfigured。该徽标应由asrConfigured/volcengineConfigured驱动。结合lastTest.ok=true仍显示未配置,判断为状态判定逻辑与运行时凭据读取逻辑不一致。 -
一个可能的成因(未验证,供参考):
volcengineConfigured的判定可能未按authMode分支,在api_key模式下仍去检查旧版控制台必填的APP ID/Access Token字段;而运行时凭据加载逻辑是按authMode正确分支的,因此出现「能用但报未配置」。 -
另一处可疑点(同源但独立,若被认为应拆分请告知):保险库中
active.asr指向的键名为foundry-local-whisper、active.llm指向ark,但两条记录的providerType分别是volcengine与deepseek—— 键名与实际类型不同步(应为在既有 provider 条目上直接更改类型所致)。LLM 那条同样是旧键名却显示「已配置」,故此项可能不是该徽标的成因,但一并报告以免遗漏。
影响
- 用户无法通过界面判断 ASR 是否配好,与
lastTest的成功结果直接矛盾,会引导用户反复重新填写 API Key 或去改安全组/资源包,浪费排查时间。 - 本次排查中确实因此产生误判——一度认为是密钥或服务未开通问题。
- 属于「界面状态与实际能力不一致」的误导性反馈,非功能故障。
建议接受标准
- [ ] 火山引擎在
authMode = "api_key"时,只要volcengineApiKey已填写且lastTest.ok = true,asrConfigured/volcengineConfigured即为true,概览页显示「已配置」。 - [ ] 判定逻辑与运行时凭据读取逻辑使用同一套「按 authMode 分支」的条件,不再出现二者结论相反的情况。
- [ ] 新增/修改 provider 时,键名与
providerType保持同步(或在读取时以providerType为准,不依赖键名)。
TODO / 不确定项
- 未能读取前端源码确认徽标具体绑定的是
asrConfigured还是volcengineConfigured(前端资源为压缩嵌入,环境无 brotli 解压能力)。上述绑定关系为根据字段名推断。 - 「判定未按 authMode 分支」为推测,未定位到具体代码,需维护者确认。
- 未确认旧版控制台模式(APP ID + Access Token)下是否同样显示「未配置」——本人账号未创建旧版应用,无法对照。该对照实验能直接区分上述两个候选成因,建议优先做。
I'd like to work on this issue. I'll trace the configuration-status path for Volcengine API-key mode, reproduce the mismatch if possible, and add a focused regression test with the smallest necessary fix.
I'd like to work on this issue. I'll trace the configuration-status path for Volcengine API-key mode, reproduce the mismatch if possible, and add a focused regression test with the smallest necessary fix.
请贴一下你修复后的克隆分支地址。(哪怕是未完成的)
I traced the current beta status path. The active ASR channel ID is resolved through its providerType before asr_configured runs, so a channel such as foundry-local-whisper with providerType: volcengine is evaluated as volcengine.
Volcengine API-key mode already checks the dedicated volcengine_api_key slot, and Resource ID is no longer a configuration requirement. There is also existing regression coverage for channel providerType resolution and Volcengine API-key configuration.
My working branch: https://github.com/Soham-o/openless/tree/fix/1071-volcengine-api-key-config-status
It is based on the latest beta and currently has no production change because I don't want to push a speculative fix.
Please confirm whether the reported “未配置” state still reproduces on the current beta build, or point me to the build/commit where it occurs.
我确实复现不出来。
@geekliu1984-art 更新至最新版后,还会出现这个问题吗?如果更新到最新版后没有这个问题,请关闭这个 issue。如果确实有问题,请将日志发给我,我会接手他的工作。通过日志完成一轮修复后,将修复产物交给你测试。