@juspay/neurolink 9.86.5 → 9.87.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [9.87.1](https://github.com/juspay/neurolink/compare/v9.87.0...v9.87.1) (2026-07-14)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(utils):** safeFetch pinned-agent lookup honors options.all (autoSelectFamily) ([a18af4a](https://github.com/juspay/neurolink/commit/a18af4a688a90c7f085dd878235b6d7ee4a573e5))
6
+
7
+ ## [9.87.0](https://github.com/juspay/neurolink/compare/v9.86.5...v9.87.0) (2026-07-14)
8
+
9
+ ### Features
10
+
11
+ - **(video):** imageInputKey option for Replicate image-to-video models ([a66cab9](https://github.com/juspay/neurolink/commit/a66cab95749ad664d5e14824e0ee731ba9c3de8a))
12
+
1
13
  ## [9.86.5](https://github.com/juspay/neurolink/compare/v9.86.4...v9.86.5) (2026-07-14)
2
14
 
3
15
  ### Bug Fixes
@@ -51,27 +51,37 @@ export class ReplicateVideoHandler {
51
51
  const startTime = Date.now();
52
52
  const model = options.model ?? DEFAULT_MODEL;
53
53
  const dataUri = `data:image/${this.detectImageType(image)};base64,${image.toString("base64")}`;
54
- // Wan-Alpha + most image-to-video models accept this shape; specific
55
- // models may require provider-specific extras passed through
56
- // VideoOutputOptions.[unknown key].
54
+ // Replicate image-to-video models do not share an input schema. The
55
+ // legacy shape below (`image` + `num_frames`/`fps`/`aspect_ratio`) fits
56
+ // Wan-Alpha-era models; current models (minimax/hailuo-2.3-*,
57
+ // wan-video/wan-2.7-i2v) key the image as `first_frame_image` /
58
+ // `first_frame` and take `duration` instead of frame counts — a missing
59
+ // required image key fails the prediction on submit. `imageInputKey`
60
+ // selects the image key AND the modern `duration`/`resolution` shape;
61
+ // omitting it preserves the legacy payload exactly.
57
62
  //
58
- // `resolution` is forwarded as the `resolution` input parameter.
59
- // Wan-Alpha and several other Replicate image-to-video models accept it
60
- // (e.g. "720p", "1080p"). Models that do not recognise it will silently
61
- // ignore the field — the Replicate API does not reject unknown input keys.
62
63
  // `calculateDimensions` still populates the metadata `dimensions` field
63
64
  // so downstream consumers always receive correct width/height regardless
64
65
  // of whether the model honoured the resolution hint.
65
- const inputPayload = {
66
- image: dataUri,
67
- prompt,
68
- num_frames: (options.length ?? 4) * 24, // Assume 24 fps
69
- fps: 24,
70
- aspect_ratio: options.aspectRatio,
71
- ...(options.resolution !== undefined
72
- ? { resolution: options.resolution }
73
- : {}),
74
- };
66
+ const inputPayload = options.imageInputKey !== undefined
67
+ ? {
68
+ [options.imageInputKey]: dataUri,
69
+ prompt,
70
+ duration: options.length ?? 4,
71
+ ...(options.resolution !== undefined
72
+ ? { resolution: options.resolution }
73
+ : {}),
74
+ }
75
+ : {
76
+ image: dataUri,
77
+ prompt,
78
+ num_frames: (options.length ?? 4) * 24, // Assume 24 fps
79
+ fps: 24,
80
+ aspect_ratio: options.aspectRatio,
81
+ ...(options.resolution !== undefined
82
+ ? { resolution: options.resolution }
83
+ : {}),
84
+ };
75
85
  let prediction;
76
86
  try {
77
87
  prediction = await predict(auth, { model, input: inputPayload }, { abortSignal: options.abortSignal });