@openrouter/ai-sdk-provider 2.3.0 → 2.3.1

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.
@@ -2725,11 +2725,12 @@ function convertToOpenRouterChatMessages(prompt) {
2725
2725
  }
2726
2726
  finalReasoningDetails = uniqueDetails.length > 0 ? uniqueDetails : void 0;
2727
2727
  }
2728
+ const effectiveReasoning = reasoning && finalReasoningDetails ? reasoning : void 0;
2728
2729
  messages.push({
2729
2730
  role: "assistant",
2730
2731
  content: text,
2731
2732
  tool_calls: toolCalls.length > 0 ? toolCalls : void 0,
2732
- reasoning: reasoning || void 0,
2733
+ reasoning: effectiveReasoning,
2733
2734
  reasoning_details: finalReasoningDetails,
2734
2735
  annotations: messageAnnotations,
2735
2736
  cache_control: getCacheControl(providerOptions)