@blockrun/llm 3.2.2 → 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
@@ -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
@@ -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.2",
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",