Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 百度千帆模型不支持 deepseek-r1、deepseek-v3 #5720

Open
hedeqiang opened this issue Feb 4, 2025 · 20 comments · May be fixed by #5729
Open

[Bug] 百度千帆模型不支持 deepseek-r1、deepseek-v3 #5720

hedeqiang opened this issue Feb 4, 2025 · 20 comments · May be fixed by #5729
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@hedeqiang
Copy link

📦 部署环境

Vercel

📌 软件版本

v1.50.1

💻 系统环境

macOS

🌐 浏览器

Chrome

🐛 问题描述

{
  "error": {
    "headers": {
      "p3p": "CP=\" OTI DSP COR IVA OUR IND COM \"",
      "date": "Tue, 04 Feb 2025 05:32:48 GMT",
      "vary": "Accept-Encoding",
      "server": "Apache",
      "connection": "keep-alive",
      "set-cookie": "BAIDUID=169D19096D53EF76D:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2145916555; path=/; domain=.baidubce.com; version=1",
      "content-type": "application/json",
      "content-encoding": "gzip",
      "transfer-encoding": "chunked",
      "x-baidu-request-id": "7ec901503f30f7dc03600983c32872841000249",
      "x-openapi-server-timestamp": "1738647168"
    },
    "error_msg": "Unsupported openapi method",
    "error_code": 3
  },
  "provider": "wenxin"
}

自定义 添加 deepseek 模型

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@hedeqiang hedeqiang added the 🐛 Bug Something isn't working | 缺陷 label Feb 4, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 4, 2025
@lobehubbot
Copy link
Member

👀 @hedeqiang

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Feb 4, 2025

The error message "Unsupported openapi method" indicates that the current implementation does not support the deepseek-r1 and deepseek-v3 models with the 百度千帆 (Baidu Qianfan) provider. To address this issue, you may need to ensure that these models are properly integrated and supported by the provider.

Here are some steps you can take to resolve this:

  1. Verify Model Registration: Ensure that the deepseek-r1 and deepseek-v3 models are correctly registered in the codebase. These models should be defined in the configuration files, such as src/config/aiModels/deepseek.ts, where they are added to the SiliconCloud object with their respective properties [1].

  2. Check Provider Compatibility: Confirm that the 百度千帆 (Baidu Qianfan) provider is configured to support these models. This may involve checking the provider's API documentation or settings to ensure compatibility.

  3. Update Error Handling: If the models are correctly registered but still not supported, you may need to update the error handling mechanisms to accommodate these models. This could involve modifying the AgentRuntime class or related components to handle these specific models [2].

  4. Test Integration: After making the necessary changes, test the integration to ensure that the models are functioning as expected with the 百度千帆 provider.

By following these steps, you should be able to resolve the issue and enable support for the deepseek-r1 and deepseek-v3 models with the 百度千帆 provider.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@hezhijie0327
Copy link
Contributor

估计得切换到 v2,同时也支持 OpenAI SDK,过会儿补个 PR

BaseUrl: https://qianfan.baidubce.com/v2
API Key 获取:获取鉴权参数

Image

ref: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Fm2vrveyu#%E5%9C%A8%E7%BA%BF%E8%B0%83%E8%AF%95

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is estimated to be switched to V2, and it also supports Openai SDK.

Baseurl: https: // qianfan.baidubce.com/v2
API Key Get: [Get the Authorized Parameters] (https://console.bce.baidu.com/iam/ #/iam/apikey/list)

! [Image] (https://github.com/user-attachments/ebbbbae0-213F-40BC-B4D0-032a24cd))

Ref: https://Cloud.baidu.com/doc/wenxinworkshop/s/fm2vrveyuan

@hedeqiang
Copy link
Author

估计得切换到 v2,同时也支持 OpenAI SDK,过会儿补个 PR

BaseUrl: https://qianfan.baidubce.com/v2 API Key 获取:获取鉴权参数

Image

ref: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Fm2vrveyu#%E5%9C%A8%E7%BA%BF%E8%B0%83%E8%AF%95

对的,v2

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is estimated to switch to V2, and it also supports Openai SDK.
"
Baseurl: https: // qianfan.baidubce.com/v2 API Key Get: [Get Objective Parameters] (https://console.baiDu.com/iam/iam/apikey/list)
"
! [Image] (https://github.com/user-attachments/ebbbbae0-213F-40BC-b4D0-032a24cd))
"
Ref: https://Cloud.baidu.com/doc/wenxinworkshop/s/fm2vrveyu #%E5%9C%A8%E7%BA%BF%E8 -%8%E8%AF%95

Yes, V2

@hedeqiang
Copy link
Author

是不是百度的 provider ,叫千帆比较好一点,还是就叫 wenxin

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it Baidu's provider?

@Guducat
Copy link

Guducat commented Feb 4, 2025

估计得切换到 v2,同时也支持 OpenAI SDK,过会儿补个 PR

BaseUrl: https://qianfan.baidubce.com/v2 API Key 获取:获取鉴权参数

Image

ref: https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Fm2vrveyu#%E5%9C%A8%E7%BA%BF%E8%B0%83%E8%AF%95

借此issues在这里说个题外话,麻烦给硅基流动的deepseek-ai/DeepSeek-R1 补一个深度思考的标识?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is estimated to switch to V2, and it also supports Openai SDK.
"
Baseurl: https: // qianfan.baidubce.com/v2 API Key Get: [Get Objective Parameters] (https://console.baiDu.com/iam/iam/apikey/list)
"
! [Image] (https://github.com/user-attachments/ebbbbae0-213F-40BC-b4D0-032a24cd))
"
Ref: https://Cloud.baidu.com/doc/wenxinworkshop/s/fm2vrveyu #%E5%9C%A8%E7%BA%BF%E8 -%8%E8%AF%95

Taking this here, Issues says a question, troubles to make a deep thinking logo for Deepseek-AI/Deepseek-R1?

@hezhijie0327
Copy link
Contributor

@Guducat 看了下 Reasoning 标签在的

{
abilities: {
reasoning: true,
},
contextWindowTokens: 65_536,
description:
'DeepSeek-R1 是一款强化学习(RL)驱动的推理模型,解决了模型中的重复性和可读性问题。在 RL 之前,DeepSeek-R1 引入了冷启动数据,进一步优化了推理性能。它在数学、代码和推理任务中与 OpenAI-o1 表现相当,并且通过精心设计的训练方法,提升了整体效果。',
displayName: 'DeepSeek R1',
enabled: true,
id: 'deepseek-ai/DeepSeek-R1',
pricing: {
currency: 'CNY',
input: 4,
output: 16,
},
type: 'chat',

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@Guducat, look at Reasoning label
https://github.com/lobehub/lobe- Chat/blob/353153822B1388AB5E2DFC2FC2F3A6E7DACE23/config/aimodels/SiliconCloud.ts#L4-l19

@Guducat
Copy link

Guducat commented Feb 4, 2025

@Guducat 看了下 Reasoning 标签在的

lobe-chat/src/config/aiModels/siliconcloud.ts

怪事了,实际上并不显示深度思考标签,每次翻半天才反应过来
我是服务端数据库版本,这个问题一直存在,而且目前仅有Deepseek官方作为Provider的R1才会显示深度思考

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


[@Guducat] (https://github.com/guducat) Look at the label Reasoning
"
[lobe-chat/sr/config/aimodels/siliconcloud.ts] (https://github.com/lobehub/lobe-chat/blob/3538888AB5E2FC2FC2F3A6E7DACE 23/sRC/Config/Aimodels/SiliconCloud.ts#L4-L19)
"
Lines 4 to 19 in [3531538] (/Lobehub/Lobe-Chat/Commit/353153822B1388AB5E2DFC2FC2F3A6E7DACE23))
"
{{
Abilities: {
Reasoning: true,
},,
ContextWindowtokens: 65_536,
Description:
'DeepSeek-R1 is a reasoning model that enhances learning (RL) driver, which solves the repetitive and readability problems in the model. Before RL, DeepSeek-R1 introduced cold startup data to further optimize the reasoning performance. It performs comparable to Openai-O1 in mathematics, code and reasoning tasks, and improves the overall effect through careful design training methods. '
DisplayName: 'Deepseek R1',
enabled: true,
ID: 'Deepseek-AI/Deepseek-R1',
Pricing: {{
Currency: 'CNY',,
Input: 4,
OUTPUT: 16,
},,
Type: 'Chat',

Strange things, in fact, I do not show deep thinking labels.

@hezhijie0327
Copy link
Contributor

#5618 估计和这个类似,如果模型开关或者改顺序标签会丢失

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


#5618 Estimated to this similar, if the model switch or change the sequence label will be lost

@Guducat
Copy link

Guducat commented Feb 4, 2025

#5618 估计和这个类似,如果模型开关或者改顺序标签会丢失

情况更严重,更新获取模型以后“模型自带的 function/vision ”是没有的,且得手动添加上下文长度(仅发生在Deepseek-R1/V3上,其他模型待证实)

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


[#5618] (https://github.com/lobehub/lobe- Chat/issues/5618) Estimation is similar to this

The situation is more serious. After updating the model, the "Function/Vision comes with the model" is not available.

@hezhijie0327
Copy link
Contributor

哦 我知道为啥了... @Guducat 要么单独开个 issue?

之前大批量适配的时候对 deepseek 有个 typo 错误,过会儿补个 PR

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Oh, I know why ... @Guducat either open a separate issue?

I had a Typo error for Deepseek when I was adapted in large quantities before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

Successfully merging a pull request may close this issue.

4 participants