Skip to content

Add MiniMax H3 video generation actions - #251

Merged
l1shen merged 2 commits into
oomol-lab:mainfrom
octo-patch:octo/20260801-parameter-refresh-recvqW8DeRKwQi
Aug 2, 2026
Merged

Add MiniMax H3 video generation actions#251
l1shen merged 2 commits into
oomol-lab:mainfrom
octo-patch:octo/20260801-parameter-refresh-recvqW8DeRKwQi

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: MiniMax video generation now exposes H3 v2 task creation and management parameters.

Changes:

  • Added MiniMax H3 v2 video generation action schemas for multimodal content, 2K output, 4-15 second durations, ratios, and regional watermark control.
  • Routed v2 create, query, list, and delete actions to the documented MiniMax video generation endpoints.
  • Added focused executor tests for v2 video endpoint paths, methods, query filters, and payload normalization.

Checks:

  • npm test -- src/providers/minimax/executors.test.ts --reporter=verbose
  • npm run typecheck
  • npm run format
  • npm run lint

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Added MiniMax H3 video generation support.
    • Create videos using text, images, videos, and audio inputs.
    • Added options to query, list, filter, paginate, and delete video-generation tasks.
    • Added validation for prompts, media roles, statuses, and request content.

Walkthrough

Added MiniMax H3 video-generation support. The change defines multimodal text, image, video, and audio inputs, task filters, task outputs, and four provider actions. Handlers now create, query, list, and delete v2 video-generation tasks. Request normalization supports model options, callback URLs, pagination, filters, repeated task IDs, and URL encoding. Tests cover payloads, validation, routing, HTTP methods, and query construction.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant minimaxActionHandlers
  participant MiniMaxAPI
  Caller->>minimaxActionHandlers: Invoke H3 video action
  minimaxActionHandlers->>MiniMaxAPI: Send normalized request
  MiniMaxAPI-->>minimaxActionHandlers: Return task response
  minimaxActionHandlers-->>Caller: Return validated output
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes the MiniMax H3 video generation changes but does not use the required (): format. Rename the title to a format such as "feat(minimax): add H3 video generation actions".
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description directly explains the MiniMax H3 v2 actions, schemas, routing, tests, and verification steps.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm-workspace.yaml`:
- Around line 1-3: Replace the placeholder string values under allowBuilds with
boolean true or false approvals for esbuild and workerd, using true where their
build scripts require approval and false otherwise.

In `@src/providers/minimax/actions.ts`:
- Around line 325-328: Constrain the filter.status schema in
src/providers/minimax/actions.ts at lines 325-328 to an optional string enum
containing only queued, running, succeeded, failed, cancelled, and expired,
replacing optionalTrimmedString. Update the test state and serialized query in
src/providers/minimax/executors.test.ts at line 70 from Success to succeeded.
- Around line 250-263: The MiniMax H3 media content schema and tests use string
URLs instead of the required nested media URL objects. In
src/providers/minimax/actions.ts lines 250-263, update the image_url, audio_url,
and video_url fields to required { url: s.string(...) } objects and restrict
each field to its valid content roles; in
src/providers/minimax/executors.test.ts lines 30-34, pass nested { url: "..." }
values for image and audio rows and assert the resulting request payload.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59ca00dd-be4a-44fc-bfc0-f308ab80d3ac

📥 Commits

Reviewing files that changed from the base of the PR and between 6cb0e04 and f0afb10.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • pnpm-workspace.yaml
  • src/providers/minimax/actions.ts
  • src/providers/minimax/executors.test.ts
  • src/providers/minimax/executors.ts

Comment thread pnpm-workspace.yaml Outdated
Comment on lines +1 to +3
allowBuilds:
esbuild: set this to true or false
workerd: set this to true or false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for package in esbuild workerd; do
  value="$(awk -F': ' -v package="$package" \
    '$1 == "  " package { print $2; exit }' pnpm-workspace.yaml)"

  case "$value" in
    true|false) ;;
    *)
      echo "$package must map to true or false; found: $value" >&2
      exit 1
      ;;
  esac
done

Repository: oomol-lab/open-connector

Length of output: 230


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- pnpm-workspace.yaml ---\n'
cat -n pnpm-workspace.yaml

printf '\n--- package references ---\n'
rg -n '"?esbuild"?|"?workerd"?' package.json pnpm-lock.yaml . 2>/dev/null | head -80

Repository: oomol-lab/open-connector

Length of output: 253


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- pnpm-workspace.yaml ---'
cat -n pnpm-workspace.yaml

echo
echo '--- package references ---'
rg -n '"?esbuild"?|"?workerd"?' package.json pnpm-lock.yaml . 2>/dev/null | head -80 || true

Repository: oomol-lab/open-connector

Length of output: 4804


🌐 Web query:

pnpm allowBuilds setting boolean values documentation

💡 Result:

In pnpm, the allowBuilds setting is a configuration map used to explicitly allow or disallow the execution of lifecycle scripts (such as postinstall) for specific dependencies [1][2]. This setting replaces legacy build-related options like onlyBuiltDependencies and ignoredBuiltDependencies [1][2]. The allowBuilds setting uses a record-based structure where the keys are package name patterns and the values are booleans (or sometimes string patterns for more complex matching) [2][3][4]. Usage details: - Boolean Values: Setting a package to true explicitly allows its scripts to run, while setting it to false explicitly disallows them [2]. - Default Behavior: Packages not explicitly listed in allowBuilds are disallowed by default, and pnpm will print a warning [2]. If the setting strictDepBuilds is enabled, pnpm will throw an error instead [2]. - Configuration File: This setting is configured in your project's pnpm-workspace.yaml file or the global config.yaml file [5][1][6]. - Management via CLI: You can manage these settings interactively or explicitly using the pnpm approve-builds command, which automatically updates the allowBuilds map in your pnpm-workspace.yaml [7]. You can also interact with this setting via pnpm config set --json allowBuilds '{"package-name": true}' [8]. Example configuration in pnpm-workspace.yaml: allowBuilds: esbuild: true core-js: false "some-package@*": true By using allowBuilds, you ensure that only trusted dependencies run scripts during installation, which is a key security practice to mitigate supply chain attacks [9].

Citations:


🌐 Web query:

pnpm 11.0 settings allowBuilds false string value

💡 Result:

In pnpm 11.0, the allowBuilds setting is a map used to control which dependencies are permitted to execute build scripts (such as postinstall) [1][2]. This setting replaces legacy configurations like onlyBuiltDependencies, neverBuiltDependencies, and ignoredBuiltDependencies [1][3]. The map uses package name patterns as keys and boolean values to dictate behavior [2][4]: - true: The package is permitted to run build scripts [2]. - false: The package is explicitly denied from running build scripts [2]. While some internal type definitions may account for string values (as noted in early development PRs), the official documentation and usage patterns strictly emphasize boolean values (true or false) to enable or disable builds for specific dependencies [1][2][4]. If a package has build scripts and is not listed in allowBuilds, pnpm will print an error by default (due to the strictDepBuilds setting defaulting to true) [2][4]. You can manage this setting in your pnpm-workspace.yaml file or via the CLI [5][6][7]. For example: allowBuilds: electron: true core-js: false esbuild: false If you attempt to use a string value in the configuration, it is not standard usage and will not be treated as a functional toggle for allowing or disallowing builds [2][4].

Citations:


🌐 Web query:

pnpm 9 allowBuilds boolean values

💡 Result:

In pnpm, the allowBuilds configuration field is a map used to control which dependencies are permitted to execute build scripts (such as postinstall) [1][2]. It accepts boolean values to explicitly allow or disallow these builds [2][3]. Key details regarding allowBuilds: - Structure: It is a map where keys are package matchers (package names or patterns) and values are booleans [2][3]. - Boolean Usage: Setting a package to true allows its build scripts to run, while setting it to false prevents them [1][2]. - Default Behavior: Dependencies not listed in allowBuilds are disallowed by default [2][3]. Depending on the strictDepBuilds setting, pnpm will either print a warning or throw an error when an unlisted package attempts to build [2][3]. - Integration: This field was introduced in pnpm v10.26.0 as a unified replacement for legacy settings like onlyBuiltDependencies, neverBuiltDependencies, and ignoredBuiltDependencies [4][2][3]. In pnpm v11, these legacy settings were removed entirely [4][3]. - Configuration: You can manage this setting in your pnpm-workspace.yaml file or via the pnpm approve-builds command, which automatically populates the allowBuilds map [5][1][3]. You can also interact with it using pnpm config commands [6].

Citations:


Replace the placeholder strings with boolean approvals.

pnpm-workspace.yaml declares esbuild and workerd as string values. allowBuilds entries must be true or false, or packages with build scripts will be treated as unapproved. If these dependencies need build approval, use boolean values.

Proposed fix
 allowBuilds:
-  esbuild: set this to true or false
-  workerd: set this to true or false
+  esbuild: true
+  workerd: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
allowBuilds:
esbuild: set this to true or false
workerd: set this to true or false
allowBuilds:
esbuild: true
workerd: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm-workspace.yaml` around lines 1 - 3, Replace the placeholder string
values under allowBuilds with boolean true or false approvals for esbuild and
workerd, using true where their build scripts require approval and false
otherwise.

Comment thread src/providers/minimax/actions.ts Outdated
Comment thread src/providers/minimax/actions.ts Outdated
@octo-patch
octo-patch force-pushed the octo/20260801-parameter-refresh-recvqW8DeRKwQi branch from f0afb10 to a6d6cea Compare August 1, 2026 14:46

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/providers/minimax/executors.test.ts`:
- Around line 63-104: Update normalizeMinimaxVideoV2Body to validate every
content image_url and audio_url URL with assertPublicHttpUrl before
minimaxPostJson, rejecting loopback and private addresses. Extend the existing
create_video_generation_v2 tests to cover blocked private-media URLs and verify
the fetcher is not called.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 640830e2-171f-4cc8-bfeb-d68dd49ae229

📥 Commits

Reviewing files that changed from the base of the PR and between f0afb10 and 2f15f5e.

📒 Files selected for processing (2)
  • src/providers/minimax/actions.ts
  • src/providers/minimax/executors.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/providers/minimax/actions.ts

Comment on lines +63 to +104
it("validates the v2 media shape and required text prompt", () => {
const action = minimaxActions.find((action) => action.id === "minimax.create_video_generation_v2")!;
const input = {
model: "MiniMax-H3",
content: [
{ type: "text", text: "city skyline" },
{ type: "image_url", image_url: { url: "https://example.com/frame.png" }, role: "first_frame" },
],
resolution: "768P",
duration: 5,
};

expect(validateActionInput(action, input).valid).toBe(true);
expect(
validateActionInput(action, {
...input,
content: [{ type: "image_url", image_url: { url: "https://example.com/frame.png" } }],
}).valid,
).toBe(false);
expect(
validateActionInput(action, {
...input,
content: [
{ type: "text", text: "city skyline" },
{ type: "video_url", video_url: "https://example.com/ref.mp4", role: "reference_video" },
],
}).valid,
).toBe(false);
expect(
validateActionInput(action, {
...input,
content: [
{ type: "text", text: "city skyline" },
{
type: "image_url",
image_url: { url: "https://example.com/frame.png" },
role: "reference_video",
},
],
}).valid,
).toBe(false);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the provider executor before inspecting URL validation and egress calls.
ast-grep outline src/providers/minimax/executors.ts --items all

# Expect public-only validation for content media URLs before the provider request.
rg -n -C 5 'assertPublicHttpUrl|providerFetch|context\.fetcher|image_url|video_url|audio_url' \
  src/providers/minimax/executors.ts \
  src/providers/minimax/executors.test.ts

Repository: oomol-lab/open-connector

Length of output: 10001


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## executors.ts relevant sections"
sed -n '1,320p' src/providers/minimax/executors.ts | cat -n

echo
echo "## tests around create_video_generation_v2 and mocks"
sed -n '1,150p' src/providers/minimax/executors.test.ts | cat -n

echo
echo "## shared public URL implementation usages"
rg -n 'export function assertPublicHttpUrl|function assertPublicHttpUrl|assertPublicHttpUrl' src -g '*.ts'

echo
echo "## search private-network validation in provider code"
rg -n 'assertPublicHttpUrl|isBlockedIpAddress|allowPrivateNetwork|skipDnsValidation' src/providers -g '*.ts'

Repository: oomol-lab/open-connector

Length of output: 50381


Reject private-media URLs in the MiniMax video executor.

create_video_generation_v2 does not validate content[*].image_url.audio_*/*_url with assertPublicHttpUrl; it only sends the body. Add executor-side validation for image_url/audio_url in normalizeMinimaxVideoV2Body before minimaxPostJson, and add tests that block loopback/private URLs without calling the fetcher.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/providers/minimax/executors.test.ts` around lines 63 - 104, Update
normalizeMinimaxVideoV2Body to validate every content image_url and audio_url
URL with assertPublicHttpUrl before minimaxPostJson, rejecting loopback and
private addresses. Extend the existing create_video_generation_v2 tests to cover
blocked private-media URLs and verify the fetcher is not called.

Source: Coding guidelines

@l1shen
l1shen merged commit a7e958e into oomol-lab:main Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants