@drx974/n8n-nodes-deepseek-fixed 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -123,13 +123,20 @@ class ChatDeepSeekFixed extends chat_models_1.BaseChatModel {
|
|
|
123
123
|
// field is omitted entirely — it must be set explicitly in both
|
|
124
124
|
// directions, or "Disabled" here silently has no effect and DeepSeek
|
|
125
125
|
// keeps thinking (and returning reasoning_content) regardless.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
//
|
|
127
|
+
// IMPORTANT: `thinking` belongs at the TOP LEVEL of the request body.
|
|
128
|
+
// DeepSeek's own docs show `extra_body={"thinking": ...}` in Python
|
|
129
|
+
// examples, but that's a Python-openai-SDK-only convention that merges
|
|
130
|
+
// those keys into the root of the outgoing JSON — it is not itself a
|
|
131
|
+
// field DeepSeek recognizes. Nesting it under a literal `extra_body`
|
|
132
|
+
// key here (as an earlier version of this file did) sends a field
|
|
133
|
+
// DeepSeek silently ignores, so thinking stays on regardless of this
|
|
134
|
+
// setting.
|
|
135
|
+
body.thinking =
|
|
136
|
+
this.thinkingMode === 'disabled' ? { type: 'disabled' } : { type: 'enabled' };
|
|
137
|
+
if (this.thinkingMode === 'max') {
|
|
138
|
+
body.reasoning_effort = 'max';
|
|
139
|
+
}
|
|
133
140
|
const completion = await this.client.chat.completions.create(body);
|
|
134
141
|
const choice = completion.choices[0];
|
|
135
142
|
const rawMessage = choice.message;
|
package/package.json
CHANGED