@reconcrap/boss-recommend-mcp 2.0.32 → 2.0.33

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reconcrap/boss-recommend-mcp",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "Unified MCP pipeline for recommend-page filtering and screening on Boss Zhipin",
5
5
  "keywords": [
6
6
  "boss",
@@ -130,6 +130,14 @@ function isVolcengineModel(baseUrl, model) {
130
130
  return /volces|volcengine|ark\.cn|doubao|seed/i.test(`${baseUrl || ""} ${model || ""}`);
131
131
  }
132
132
 
133
+ function isNativeVolcengineBaseUrl(baseUrl) {
134
+ return /volces|volcengine|ark\.cn/i.test(String(baseUrl || ""));
135
+ }
136
+
137
+ function isOpenAiCompatibleV1BaseUrl(baseUrl) {
138
+ return /(?:^|\/)v1(?:\/)?$/i.test(normalizeBaseUrl(baseUrl));
139
+ }
140
+
133
141
  function applyChatCompletionThinking(payload, { baseUrl = "", model = "", thinkingLevel = "" } = {}) {
134
142
  const level = normalizeLlmThinkingLevel(thinkingLevel);
135
143
  if (!level || level === "current" || level === "auto") return payload;
@@ -139,6 +147,9 @@ function applyChatCompletionThinking(payload, { baseUrl = "", model = "", thinki
139
147
  } else {
140
148
  payload.thinking = { type: "enabled" };
141
149
  }
150
+ if (!isNativeVolcengineBaseUrl(baseUrl) && isOpenAiCompatibleV1BaseUrl(baseUrl)) {
151
+ payload.reasoning_effort = level === "off" ? "minimal" : level;
152
+ }
142
153
  return payload;
143
154
  }
144
155
  payload.reasoning_effort = level === "off" ? "minimal" : level;
@@ -463,13 +474,21 @@ function collectLlmReasoningText(choice = {}) {
463
474
  const message = choice?.message || {};
464
475
  return [
465
476
  message.reasoning_content,
477
+ message.provider_specific_fields?.reasoning_content,
466
478
  message.reasoning,
479
+ message.provider_specific_fields?.reasoning,
467
480
  message.cot,
481
+ message.provider_specific_fields?.cot,
468
482
  message.chain_of_thought,
483
+ message.provider_specific_fields?.chain_of_thought,
469
484
  choice.reasoning_content,
485
+ choice.provider_specific_fields?.reasoning_content,
470
486
  choice.reasoning,
487
+ choice.provider_specific_fields?.reasoning,
471
488
  choice.cot,
472
- choice.chain_of_thought
489
+ choice.provider_specific_fields?.cot,
490
+ choice.chain_of_thought,
491
+ choice.provider_specific_fields?.chain_of_thought
473
492
  ].map(flattenChatMessageContent).map(normalizeBlockText).filter(Boolean).join("\n\n");
474
493
  }
475
494