惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
爱范儿
爱范儿
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
IT之家
IT之家
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - Franky
G
Google Developers Blog
V
V2EX
雷峰网
雷峰网
美团技术团队
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
J
Java Code Geeks

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(video): recover generation parameter fallbacks · open...
vincentkoc · 2026-05-05 · via Recent Commits to openclaw:main

@@ -25,6 +25,12 @@ const MINIMAX_MODEL_ALLOWED_DURATIONS: Readonly<Record<string, readonly number[]

2525

"MiniMax-Hailuo-2.3": [6, 10],

2626

"MiniMax-Hailuo-02": [6, 10],

2727

};

28+

const MINIMAX_MODEL_ALLOWED_RESOLUTIONS: Readonly<Record<string, readonly string[]>> = {

29+

"MiniMax-Hailuo-2.3": ["768P", "1080P"],

30+

"MiniMax-Hailuo-2.3-Fast": ["768P", "1080P"],

31+

"MiniMax-Hailuo-02": ["768P", "1080P"],

32+

};

33+

const MINIMAX_RESOLUTION_ORDER = ["480P", "720P", "768P", "1080P"] as const;

28342935

type MinimaxBaseResp = {

3036

status_code?: number;

@@ -112,6 +118,43 @@ function resolveDurationSeconds(params: {

112118

);

113119

}

114120121+

function resolveResolution(params: {

122+

model: string;

123+

resolution: string | undefined;

124+

}): string | undefined {

125+

const requested = normalizeOptionalString(params.resolution)?.toUpperCase();

126+

if (!requested) {

127+

return undefined;

128+

}

129+

const allowed = MINIMAX_MODEL_ALLOWED_RESOLUTIONS[params.model];

130+

if (!allowed || allowed.length === 0 || allowed.includes(requested)) {

131+

return requested;

132+

}

133+

const requestedIndex = MINIMAX_RESOLUTION_ORDER.indexOf(

134+

requested as (typeof MINIMAX_RESOLUTION_ORDER)[number],

135+

);

136+

if (requestedIndex < 0) {

137+

return undefined;

138+

}

139+

return allowed.reduce((best, current) => {

140+

const currentIndex = MINIMAX_RESOLUTION_ORDER.indexOf(

141+

current as (typeof MINIMAX_RESOLUTION_ORDER)[number],

142+

);

143+

const bestIndex = MINIMAX_RESOLUTION_ORDER.indexOf(

144+

best as (typeof MINIMAX_RESOLUTION_ORDER)[number],

145+

);

146+

if (currentIndex < 0) {

147+

return best;

148+

}

149+

if (bestIndex < 0) {

150+

return current;

151+

}

152+

return Math.abs(currentIndex - requestedIndex) < Math.abs(bestIndex - requestedIndex)

153+

? current

154+

: best;

155+

});

156+

}

157+115158

async function pollMinimaxVideo(params: {

116159

taskId: string;

117160

headers: Headers;

@@ -246,6 +289,7 @@ function buildMinimaxVideoProvider(providerId: string): VideoGenerationProvider

246289

maxVideos: 1,

247290

maxDurationSeconds: 10,

248291

supportedDurationSecondsByModel: MINIMAX_MODEL_ALLOWED_DURATIONS,

292+

resolutions: ["768P", "1080P"],

249293

supportsResolution: true,

250294

supportsWatermark: false,

251295

},

@@ -255,6 +299,7 @@ function buildMinimaxVideoProvider(providerId: string): VideoGenerationProvider

255299

maxInputImages: 1,

256300

maxDurationSeconds: 10,

257301

supportedDurationSecondsByModel: MINIMAX_MODEL_ALLOWED_DURATIONS,

302+

resolutions: ["768P", "1080P"],

258303

supportsResolution: true,

259304

supportsWatermark: false,

260305

},

@@ -303,8 +348,12 @@ function buildMinimaxVideoProvider(providerId: string): VideoGenerationProvider

303348

if (firstFrameImage) {

304349

body.first_frame_image = firstFrameImage;

305350

}

306-

if (req.resolution) {

307-

body.resolution = req.resolution;

351+

const resolution = resolveResolution({

352+

model,

353+

resolution: req.resolution,

354+

});

355+

if (resolution) {

356+

body.resolution = resolution;

308357

}

309358

const durationSeconds = resolveDurationSeconds({

310359

model,