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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
S
SegmentFault 最新的问题
博客园 - Franky
博客园_首页
T
Tailwind CSS Blog
雷峰网
雷峰网
罗磊的独立博客

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(minimax): clamp vlm request timeouts · openclaw/openc...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,4 +1,5 @@

11

// Covers MiniMax VLM auth/header normalization and provider-specific routing.

2+

import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";

23

import { afterEach, describe, expect, it, vi } from "vitest";

34

import { withFetchPreconnect } from "../test-utils/fetch-mock.js";

45

import { isMinimaxVlmModel, minimaxUnderstandImage } from "./minimax-vlm.js";

@@ -157,6 +158,54 @@ describe("minimaxUnderstandImage apiKey normalization", () => {

157158

expect(timeoutSpy).toHaveBeenCalledWith(180_000);

158159

});

159160
161+

it("uses the default request timeout for non-positive caller timeouts", async () => {

162+

const timeoutSpy = vi.spyOn(AbortSignal, "timeout");

163+

const fetchSpy = vi.fn(async () => {

164+

return new Response(apiResponse, {

165+

status: 200,

166+

headers: { "Content-Type": "application/json" },

167+

});

168+

});

169+

global.fetch = withFetchPreconnect(fetchSpy);

170+
171+

await expect(

172+

minimaxUnderstandImage({

173+

apiKey: "minimax-test-key",

174+

prompt: "hi",

175+

imageDataUrl: "data:image/png;base64,AAAA",

176+

apiHost: "https://api.minimax.io",

177+

timeoutMs: 0,

178+

}),

179+

).resolves.toBe("ok");

180+
181+

expect(timeoutSpy).toHaveBeenCalledOnce();

182+

expect(timeoutSpy).toHaveBeenCalledWith(60_000);

183+

});

184+
185+

it("clamps oversized caller request timeouts before creating the abort signal", async () => {

186+

const timeoutSpy = vi.spyOn(AbortSignal, "timeout");

187+

const fetchSpy = vi.fn(async () => {

188+

return new Response(apiResponse, {

189+

status: 200,

190+

headers: { "Content-Type": "application/json" },

191+

});

192+

});

193+

global.fetch = withFetchPreconnect(fetchSpy);

194+
195+

await expect(

196+

minimaxUnderstandImage({

197+

apiKey: "minimax-test-key",

198+

prompt: "hi",

199+

imageDataUrl: "data:image/png;base64,AAAA",

200+

apiHost: "https://api.minimax.io",

201+

timeoutMs: Number.MAX_SAFE_INTEGER,

202+

}),

203+

).resolves.toBe("ok");

204+
205+

expect(timeoutSpy).toHaveBeenCalledOnce();

206+

expect(timeoutSpy).toHaveBeenCalledWith(MAX_TIMER_TIMEOUT_MS);

207+

});

208+
160209

it("bounds large provider error response bodies", async () => {

161210

// Provider error bodies can be large. Read enough for diagnostics, then

162211

// cancel the stream so failures stay bounded.