Fix deepseek v4 reasoning inject thoughts (#5527)
* Fix deepseek v4 injectReasoning error resolves #5509 * comment
This commit is contained in:
parent
bde72505ff
commit
7ead0449f2
@ -54,8 +54,20 @@ class DeepSeekProvider extends InheritMultiple([Provider, UnTooled]) {
|
||||
return rest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the model is a thinking model
|
||||
* because we need to inject reasoning content into the messages
|
||||
* or else the DeepSeek API will return an error for specific models.
|
||||
* There is no official way to predetect if a model will require this
|
||||
* so we have to hardcode the list of thinking models.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get #isThinkingModel() {
|
||||
return this.model === "deepseek-reasoner";
|
||||
return [
|
||||
"deepseek-reasoner",
|
||||
"deepseek-v4-flash",
|
||||
"deepseek-v4-pro",
|
||||
].includes(this.model);
|
||||
}
|
||||
|
||||
get #tooledOptions() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user