Skip to content

feat: 🎸 新增百度千帆(Qianfan)大模型支持#929

Merged
winsan-zhang merged 4 commits intonetease-youdao:feature/upgrade-openclawfrom
Angus2333:feature/qianfan_model
Apr 10, 2026
Merged

feat: 🎸 新增百度千帆(Qianfan)大模型支持#929
winsan-zhang merged 4 commits intonetease-youdao:feature/upgrade-openclawfrom
Angus2333:feature/qianfan_model

Conversation

@Angus2333
Copy link
Copy Markdown
Contributor

PR 说明
🚀 feat: 新增百度千帆(Qianfan)大模型支持
image
image

概述
本 PR 为 LobsterAI 新增了**百度千帆(Baidu Qianfan)**作为大模型提供商,用户可以在设置页面中配置并使用百度千帆平台上的模型进行 AI 编码辅助。

百度千帆是国内主流的大模型服务平台之一,提供 OpenAI 兼容的 API 接口,支持 ERNIE(文心)和 DeepSeek 等多个模型。

改动内容

  1. 新增千帆图标组件

  2. 添加千帆提供商配置

API 地址: https://qianfan.baidubce.com/v2
API 格式: OpenAI 兼容
预置模型:
deepseek-v3.2 — DeepSeek V3.2
deepseek-r1 — DeepSeek R1
ernie-4.5-8k — ERNIE 4.5 8K
ernie-4.5-turbo-8k — ERNIE 4.5 Turbo
同时将 qianfan 加入 CHINA_PROVIDERS 列表,确保在中国区优先显示。

  1. 集成设置页面 UI

在 getFixedApiFormatForProvider 中将千帆固定为 OpenAI 兼容格式(千帆 API 仅支持 OpenAI 格式,无需显示格式切换选项)

使用方式
打开 设置 → 选择 Qianfan 提供商
启用并填入百度智能云的 API Key(bce-v3/... 格式)
选择模型后即可开始使用
⚠️ 注意:需要在 百度智能云控制台 创建应用并关联 API Key,确保账户余额充足。

设置页面 - 千帆配置
启用 Qianfan → 输入 API Key → 选择模型
涉及文件
文件 操作 说明
src/renderer/components/icons/providers/QianfanIcon.tsx 新增 千帆图标组件
src/renderer/components/icons/providers/index.ts 修改 导出千帆图标
src/renderer/config.ts 修改 添加 provider 定义 & 预置模型
src/renderer/components/Settings.tsx 修改 UI 集成 & API 格式固定

@Angus2333 Angus2333 changed the base branch from main to feature/upgrade-openclaw April 10, 2026 02:23
@winsan-zhang winsan-zhang merged commit 98bf240 into netease-youdao:feature/upgrade-openclaw Apr 10, 2026
11 of 13 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