@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.
package/dist/index.mjs CHANGED
@@ -915,9 +915,9 @@ var ReasoningFormat = /* @__PURE__ */ ((ReasoningFormat2) => {
915
915
  // src/schemas/reasoning-details.ts
916
916
  var CommonReasoningDetailSchema = z.object({
917
917
  id: z.string().nullish(),
918
- format: z.nativeEnum(ReasoningFormat).nullish(),
918
+ format: z.enum(ReasoningFormat).nullish(),
919
919
  index: z.number().optional()
920
- }).passthrough();
920
+ }).loose();
921
921
  var ReasoningDetailSummarySchema = z.object({
922
922
  type: z.literal("reasoning.summary" /* Summary */),
923
923
  summary: z.string()
@@ -1949,6 +1949,8 @@ var OpenRouterChatLanguageModel = class {
1949
1949
  const lastDetail = accumulatedReasoningDetails[accumulatedReasoningDetails.length - 1];
1950
1950
  if ((lastDetail == null ? void 0 : lastDetail.type) === "reasoning.text" /* Text */) {
1951
1951
  lastDetail.text = (lastDetail.text || "") + (detail.text || "");
1952
+ lastDetail.signature = lastDetail.signature || detail.signature;
1953
+ lastDetail.format = lastDetail.format || detail.format;
1952
1954
  } else {
1953
1955
  accumulatedReasoningDetails.push(__spreadValues({}, detail));
1954
1956
  }
@@ -2643,7 +2645,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
2643
2645
  }
2644
2646
 
2645
2647
  // src/version.ts
2646
- var VERSION = false ? "0.0.0-test" : "1.2.7";
2648
+ var VERSION = false ? "0.0.0-test" : "1.2.8";
2647
2649
 
2648
2650
  // src/provider.ts
2649
2651
  function createOpenRouter(options = {}) {