[Request] 为自定义 AI 服务商中,支持关闭思考的模型增加开关
🥰 需求描述
qwen3这类模型是支持关闭深度思考的,但是自定义的AI 服务商目前没有开关来关闭思考
🧐 解决方案
···
📝 补充信息
No response
👀 @AAEE86
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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
🥰 Requirement description
Turn on deep thinking is judged based on the model. The model supports turning on deep thinking function should be separately and called uniformly.
🧐 Solution
Open the deep thinking function of model support separately and call it in a unified manner
📝 Supplementary information
No response
@sxjeru 能否帮忙实现,我自己编程能力有限,研究了几天没能成功
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@sxjeru Can I help implement it? I have limited programming skills and have been researching for several days but failed
我没有看懂你的需求,现在判断深度思考的逻辑就是 <think> 标签,或者 reason_content 返回值,显示在模型上的“深度思考”标志只是一个提示,而不是功能开关,是否开启深度思考不是由模型决定的,而是返回结果。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I didn't understand your needs. Now the logic of judging deep thinking is the <think> tag, or reason_content return value. The "deep thinking" flag displayed on the model is just a prompt, not a functional switch.
我没有看懂你的需求,现在判断深度思考的逻辑就是
<think>标签,或者reason_content返回值,显示在模型上的“深度思考”标志只是一个提示,而不是功能开关,是否开启深度思考不是由模型决定的,而是返回结果。
我的意思是像qwen3这类模型是支持关闭深度思考的,但是自定义的AI 服务商目前没有开关来关闭思考
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I didn't understand your needs. Now the logic of judging deep thinking is the
<think>tag, orreason_contentreturn value. The "deep thinking" flag displayed on the model is just a prompt, not a functional switch. Whether to turn on deep thinking is not determined by the model, but returns the result.
I mean models like qwen3 support turning off deep thinking, but custom AI service providers currently do not have switches to turn off thinking
我知道了,只是各家控制深度思考的参数是不一样的,现在也是在一一专门适配,感觉拿不出一个通用方案给自定义模型提供商用。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I understand, but the parameters of each company's deep thinking are different. Now they are adapting one by one. I feel that I can't come up with a general solution for customized models to provide commercial use.
我知道了,只是各家控制深度思考的参数是不一样的,现在也是在一一专门适配,感觉拿不出一个通用方案给自定义模型提供商用。
参数不一样就只能一一适配,这个没办法。
现在的问题是,在无法实现通用方案的情况下,如何在自定义的AI 服务商中对支持关闭思考的模型增加开关
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I understand, but the parameters of each company's deep thinking are different. Now they are adapting one by one. I feel that I can't come up with a general solution for customized models to provide commercial use.
If the parameters are different, you can only adapt one by one, there is no way to do this.
The question now is how to support it in a custom AI service provider
我知道了,只是各家控制深度思考的参数是不一样的,现在也是在一一专门适配,感觉拿不出一个通用方案给自定义模型提供商用。
获取模型列表 aiModel.getAiProviderModelList,获取到的参数不一样
Qwen服务商
{
"abilities": {
"functionCall": true,
"reasoning": true
},
"contextWindowTokens": 131072,
"description": "Qwen3是一款能力大幅提升的新一代通义千问大模型,在推理、通用、Agent和多语言等多个核心能力上均达到业界领先水平,并支持思考模式切换。",
"displayName": "Qwen3 235B A22B",
"enabled": true,
"id": "qwen3-235b-a22b",
"maxOutput": 8192,
"organization": "Qwen",
"pricing": {
"currency": "CNY",
"input": 4,
"output": 40
},
"releasedAt": "2025-04-28",
"settings": {
"extendParams": [
"enableReasoning",
"reasoningBudgetToken"
]
},
"type": "chat",
"source": "builtin"
},
自定义服务商
{
"abilities": {
"vision": false,
"reasoning": true,
"functionCall": true
},
"config": null,
"contextWindowTokens": 128000,
"description": null,
"displayName": "Qwen3 235B A22B",
"enabled": true,
"id": "qwen3-235b-a22b",
"pricing": null,
"releasedAt": null,
"source": "remote",
"type": "chat"
},
对于 qwen3 可以考虑用模型自带的思考软开关,在聊天开头加入 /no_think 以避免思考。
是的,为保证通用性,自定义服务商传递的参数会少很多。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For qwen3, you can consider using the model's own thinking soft switch and add /no_think at the beginning of the chat to avoid thinking.
Yes, to ensure universality, custom service providers will pass much fewer parameters.
对于 qwen3 可以考虑用模型自带的思考软开关,在聊天开头加入 /no_think 以避免思考。
是的,为保证通用性,自定义服务商传递的参数会少很多。
/no_think 的确可以,但是think情况下无法控制Token消耗
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
For qwen3, you can consider using the model's own thinking soft switch and add /no_think at the beginning of the chat to avoid thinking.
Yes, to ensure universality, custom service providers will pass much fewer parameters.
/no_think is indeed OK, but the token consumption cannot be controlled under think
那能不能把自定义服务商直接填到 Qwen 那里呢,看能不能用。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Then can you fill in the custom service provider directly into Qwen and see if it can be used.
那能不能把自定义服务商直接填到 Qwen 那里呢,看能不能用。
可以
虽然不太优雅,但的确没啥问题😂😂
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Then can you fill in the custom service provider directly into Qwen and see if it can be used.
Can
Although it is not very elegant, there is no problem 😂😂