@blockrun/llm 3.2.1 → 3.2.3

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.cjs CHANGED
@@ -2646,7 +2646,7 @@ var VideoClient = class {
2646
2646
  returnLastFrame,
2647
2647
  ...extra
2648
2648
  } = options ?? {};
2649
- const body = { content, ...extra };
2649
+ const body = { ...extra, content };
2650
2650
  if (model !== void 0) body.model = model;
2651
2651
  if (durationSeconds !== void 0) body.duration_seconds = durationSeconds;
2652
2652
  if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
@@ -2733,11 +2733,10 @@ var VideoClient = class {
2733
2733
  sanitizeErrorResponse(pollData)
2734
2734
  );
2735
2735
  }
2736
- if (pollResp.status === 200 && lastStatus === "completed") {
2736
+ if (lastStatus === "completed") {
2737
2737
  const data = pollData;
2738
- const billedSeconds = typeof body.duration_seconds === "number" ? body.duration_seconds : 8;
2739
2738
  this.sessionCalls++;
2740
- this.sessionTotalUsd += 0.05 * billedSeconds * 1.05;
2739
+ this.sessionTotalUsd += Number(details.amount) / 1e6;
2741
2740
  const txHash = pollResp.headers.get("x-payment-receipt") || pollResp.headers.get("X-Payment-Receipt");
2742
2741
  if (txHash) data.txHash = txHash;
2743
2742
  return data;
package/dist/index.js CHANGED
@@ -2539,7 +2539,7 @@ var VideoClient = class {
2539
2539
  returnLastFrame,
2540
2540
  ...extra
2541
2541
  } = options ?? {};
2542
- const body = { content, ...extra };
2542
+ const body = { ...extra, content };
2543
2543
  if (model !== void 0) body.model = model;
2544
2544
  if (durationSeconds !== void 0) body.duration_seconds = durationSeconds;
2545
2545
  if (aspectRatio !== void 0) body.aspect_ratio = aspectRatio;
@@ -2626,11 +2626,10 @@ var VideoClient = class {
2626
2626
  sanitizeErrorResponse(pollData)
2627
2627
  );
2628
2628
  }
2629
- if (pollResp.status === 200 && lastStatus === "completed") {
2629
+ if (lastStatus === "completed") {
2630
2630
  const data = pollData;
2631
- const billedSeconds = typeof body.duration_seconds === "number" ? body.duration_seconds : 8;
2632
2631
  this.sessionCalls++;
2633
- this.sessionTotalUsd += 0.05 * billedSeconds * 1.05;
2632
+ this.sessionTotalUsd += Number(details.amount) / 1e6;
2634
2633
  const txHash = pollResp.headers.get("x-payment-receipt") || pollResp.headers.get("X-Payment-Receipt");
2635
2634
  if (txHash) data.txHash = txHash;
2636
2635
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/llm",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "type": "module",
5
5
  "description": "BlockRun SDK - Pay-per-request AI (LLM, Image, Video, Music, Voice) via x402 on Base and Solana",
6
6
  "main": "dist/index.cjs",