feat: 🎸 新增百度千帆(Qianfan)大模型支持#929
Merged
winsan-zhang merged 4 commits intonetease-youdao:feature/upgrade-openclawfrom Apr 10, 2026
Merged
feat: 🎸 新增百度千帆(Qianfan)大模型支持#929winsan-zhang merged 4 commits intonetease-youdao:feature/upgrade-openclawfrom
winsan-zhang merged 4 commits intonetease-youdao:feature/upgrade-openclawfrom
Conversation
98bf240
into
netease-youdao:feature/upgrade-openclaw
11 of 13 checks passed
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.
PR 说明


🚀 feat: 新增百度千帆(Qianfan)大模型支持
概述
本 PR 为 LobsterAI 新增了**百度千帆(Baidu Qianfan)**作为大模型提供商,用户可以在设置页面中配置并使用百度千帆平台上的模型进行 AI 编码辅助。
百度千帆是国内主流的大模型服务平台之一,提供 OpenAI 兼容的 API 接口,支持 ERNIE(文心)和 DeepSeek 等多个模型。
改动内容
新增千帆图标组件
添加千帆提供商配置
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 列表,确保在中国区优先显示。
在 getFixedApiFormatForProvider 中将千帆固定为 OpenAI 兼容格式(千帆 API 仅支持 OpenAI 格式,无需显示格式切换选项)
使用方式
⚠️ 注意:需要在 百度智能云控制台 创建应用并关联 API Key,确保账户余额充足。
打开 设置 → 选择 Qianfan 提供商
启用并填入百度智能云的 API Key(bce-v3/... 格式)
选择模型后即可开始使用
设置页面 - 千帆配置
启用 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 格式固定