@openrouter/ai-sdk-provider 1.2.7 → 1.2.8

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.
@@ -870,9 +870,9 @@ var ReasoningFormat = /* @__PURE__ */ ((ReasoningFormat2) => {
870
870
  // src/schemas/reasoning-details.ts
871
871
  var CommonReasoningDetailSchema = z.object({
872
872
  id: z.string().nullish(),
873
- format: z.nativeEnum(ReasoningFormat).nullish(),
873
+ format: z.enum(ReasoningFormat).nullish(),
874
874
  index: z.number().optional()
875
- }).passthrough();
875
+ }).loose();
876
876
  var ReasoningDetailSummarySchema = z.object({
877
877
  type: z.literal("reasoning.summary" /* Summary */),
878
878
  summary: z.string()
@@ -1904,6 +1904,8 @@ var OpenRouterChatLanguageModel = class {
1904
1904
  const lastDetail = accumulatedReasoningDetails[accumulatedReasoningDetails.length - 1];
1905
1905
  if ((lastDetail == null ? void 0 : lastDetail.type) === "reasoning.text" /* Text */) {
1906
1906
  lastDetail.text = (lastDetail.text || "") + (detail.text || "");
1907
+ lastDetail.signature = lastDetail.signature || detail.signature;
1908
+ lastDetail.format = lastDetail.format || detail.format;
1907
1909
  } else {
1908
1910
  accumulatedReasoningDetails.push(__spreadValues({}, detail));
1909
1911
  }