Files
openless/docs/volcengine-setup.md
T
c4e8e88782 fix(providers): 支持火山 Agent Plan / Coding Plan,并修正 temperature 参数序列化 (#1069)
* fix(llm): 保留温度参数的简短十进制表示

* feat(asr): 接入火山 Agent Plan 语音识别

* feat(providers): 添加火山套餐服务与模型控制台入口

* docs(volcengine): 保留原有结构并补充套餐配置

* chore(asr): 明确套餐鉴权注释并清理未用导入

* fix(core): require API keys for Ark plan endpoints

Apply the official-endpoint API key requirement to Agent Plan and
Coding Plan across configured state, validation, and LLM construction.
Reuse the Core policy in both credential adapters and preserve optional
keys for custom endpoints and the dedicated plan request addresses.

Add regression coverage for missing, empty, whitespace-only and nonempty
keys, endpoint normalization, and all three LLM builder protocols.

This fix addresses a finding from a user-initiated AI red/blue review
of PR #1069. Implementation assistance: Codex.

Validation on macOS:
- Core: 962 tests passed, 1 ignored; new regressions failed before the fix.
- Linux Host: 57 tests passed (run on macOS, not native Linux validation).
- Tauri: cargo check --locked passed.
- git diff --check passed. Workspace and Tauri format checks report only
  unchanged baseline differences, verified against the parent commit.
- GUI/manual platform acceptance and live plan API calls were not run.

Co-authored-by: Codex <noreply@openai.com>

* test(core): consolidate provider regression coverage

Share the HTTP test setup for omitted custom-provider temperature and
Ark's default 0.3 representation. Keep both request assertions and the
polished response check.

Reduce the Ark builder matrix from 48 to 24 cases: exercise every key
state once per endpoint and keep successful construction for all three
protocols. Production behavior is unchanged.

Validation: focused regressions and the full Core suite pass (961 passed,
1 ignored). Changed files pass rustfmt; workspace formatting still reports
only existing differences outside this change. git diff --check passes.
Matt Standards and Spec reviews reported no findings for this increment.

Implementation assistance: Codex.

Co-authored-by: Codex <noreply@openai.com>

* fix(core): require keys for Ark Messages endpoints

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Chris233 <h-chris233@outlook.com>
2026-09-13 02:49:42 +08:00

3.3 KiB
Raw Blame History

火山引擎(volcengine)配置

状态:canonical(2026-09-07 以源码为准重写);更新:2026-09-12。

1. 代码中的定义

  • Provider:volcengine(labelKey asrVolcengine),定义于 Core provider_rules.rs;authRequirement = Volcengine(专用鉴权形态),无内置默认端点/模型(defaultEndpoint / defaultModel 为空,按通道配置)。
  • 验证探针:asr_silence_allows_no_final(静音段允许无 final 帧,验证以可取消的静音探测完成)。
  • 凭据状态字段(provider_rules.rs):volcengine_service(服务选择)、volcengine_auth_mode(普通服务的鉴权模式)、volcengine_app_key、volcengine_access_key、volcengine_api_key(凭据是否已配置;具体取值在设置界面录入,凭据走系统安全存储,不落明文)。

2. 在应用内配置

设置 → AI 服务与模型 → 语音识别 → 添加渠道,选择火山引擎;按界面提示填入鉴权字段,保存后执行“验证”得到真实验证结果(成功/失败与时间会记录在渠道列表)。

  • 服务选择普通服务或 Agent Plan,按渠道保存为 volcengine.service(standard / agent_plan);旧配置默认普通服务。Agent Plan 使用专属 API Key,不需要 APP ID;切回普通服务保留原鉴权模式及已保存密钥,建议不同服务分别创建渠道。
  • Resource ID 留空时使用 volc.seedasr.sauc.duration。Coding Plan 不提供 ASR 选项;验证成功后仍需通过实际录音检查转写及插入。

3. 端点与排错

  • 普通服务的两种鉴权模式均使用 wss://openspeech.bytedance.com/api/v3/sauc/bigmodel_async(历史修复 #931 后的行为,以 crates/openless-core/src/asr/volcengine.rs 当前实现为准)。
  • Agent Plan 使用专属端点 wss://openspeech.bytedance.com/api/v3/plan/sauc/bigmodel_async 和 API Key,见官方接入文档。验证与听写共用服务解析,未知服务值报错,不回退到普通端点;连接日志记录端点和追踪 ID,不记录鉴权头。
  • 弱网行为:连接超时与重试在 Host/Core 实现,失败信息展示在渠道验证结果中。
  • 开通服务、创建应用与获取密钥属火山控制台操作,以火山官方文档为准;本仓库只维护代码行为。

4. 火山方舟语言模型套餐

设置 → AI 服务与模型 → 语言模型 → 添加渠道,选择火山方舟;服务可选普通火山方舟、Agent Plan 或 Coding Plan。

  • Agent Plan:https://ark.cn-beijing.volces.com/api/plan/v3;Coding Plan:https://ark.cn-beijing.volces.com/api/coding/v3。使用各自套餐的专属 API Key,按所选请求格式适配协议路径。
  • 选择套餐后,通过“查看支持的模型”打开对应的 Agent Plan 控制台或 Coding Plan 控制台,复制支持的文本模型 ID,手动填写后执行“验证”。该按钮不拉取在线模型列表,也不验证密钥。
  • 预设地址只读,已有自定义地址保持可编辑;新建自定义接口使用自定义供应商入口。普通火山方舟及其他供应商保留原有模型列表获取行为。