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

推荐订阅源

L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
量子位
V
V2EX
S
SegmentFault 最新的问题
月光博客
月光博客
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
博客园_首页
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Y
Y Combinator Blog
The Cloudflare Blog
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
B
Blog
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed

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: handle xai video pending status (#82610) · openclaw/...
Manzojunior · 2026-05-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -27,6 +27,7 @@ Docs: https://docs.openclaw.ai

2727

- Providers/OAuth: let browser-hosted identity provider pages read successful localhost callback responses, preventing xAI Grok OAuth from showing a false connection failure after OpenClaw completes login.

2828

- Gateway/diagnostics: redact credential-bearing gateway target URLs and client diagnostics while preserving raw connection URLs for programmatic use, so connect-failure logs no longer surface embedded tokens.

2929

- Gateway/auth: honor `OPENCLAW_GATEWAY_TOKEN` as the remote interactive fallback when no remote token is configured, keeping remote TUI setup aligned with documented auth precedence.

30+

- Providers/xAI: continue polling video generations while xAI reports in-flight jobs as `pending`, so Grok video requests no longer fail before the final `done` response. (#82610) Thanks @Manzojunior.

3031

- Logs: redact raw Basic auth and named security headers from `logs.tail` output before returning lines to read-scoped clients. Fixes #66832. Thanks @Magicray1217.

3132

- CLI/gateway: emit structured JSON for gateway transport close/timeout failures when `--json` is requested by health, gateway health, and devices list commands. Fixes #79108. Thanks @TurboTheTurtle.

3233

- Telegram: normalize announce group targets via a new `resolveSessionTarget` channel hook so scheduled announcements resolve consistently against the same Telegram session conversation registry as inbound turns. Fixes #81229. Thanks @giodl73-repo.

Original file line numberDiff line numberDiff line change

@@ -195,6 +195,56 @@ describe("xai video generation provider", () => {

195195

).rejects.toThrow("xAI video generation response malformed");

196196

});

197197
198+

it("normalizes the xAI 'pending' poll status to 'processing' and keeps polling until done", async () => {

199+

postJsonRequestMock.mockResolvedValue({

200+

response: {

201+

json: async () => ({

202+

request_id: "req_pending",

203+

}),

204+

},

205+

release: vi.fn(async () => {}),

206+

});

207+

fetchWithTimeoutMock

208+

// First poll: in-progress payload mirroring xAI's real shape

209+

.mockResolvedValueOnce({

210+

json: async () => ({

211+

request_id: "req_pending",

212+

status: "pending",

213+

progress: 42,

214+

}),

215+

})

216+

// Second poll: complete

217+

.mockResolvedValueOnce({

218+

json: async () => ({

219+

request_id: "req_pending",

220+

status: "done",

221+

video: { url: "https://cdn.x.ai/video-pending.mp4" },

222+

progress: 100,

223+

}),

224+

})

225+

// Download

226+

.mockResolvedValueOnce({

227+

headers: new Headers({ "content-type": "video/mp4" }),

228+

arrayBuffer: async () => Buffer.from("mp4-bytes"),

229+

});

230+
231+

const provider = buildXaiVideoGenerationProvider();

232+

const result = await provider.generateVideo({

233+

provider: "xai",

234+

model: "grok-imagine-video",

235+

prompt: "Pending then done",

236+

cfg: {},

237+

durationSeconds: 6,

238+

aspectRatio: "9:16",

239+

resolution: "720P",

240+

});

241+
242+

// Two poll calls (one pending, one done) — not throwing on "pending"

243+

expect((fetchWithTimeoutMock.mock.calls as unknown[]).length).toBeGreaterThanOrEqual(2);

244+

expect(result.videos[0]?.mimeType).toBe("video/mp4");

245+

expect(result.metadata?.requestId).toBe("req_pending");

246+

});

247+
198248

it("sends a single unroled image as xAI first-frame image-to-video", async () => {

199249

postJsonRequestMock.mockResolvedValue({

200250

response: {

Original file line numberDiff line numberDiff line change

@@ -91,7 +91,12 @@ function readXaiCreateResponse(payload: Record<string, unknown>): XaiVideoCreate

9191

}

9292
9393

function readXaiStatusResponse(payload: Record<string, unknown>): XaiVideoStatusResponse {

94-

const status = normalizeOptionalString(payload.status);

94+

const rawStatus = normalizeOptionalString(payload.status);

95+

// xAI's /v1/videos/{id} endpoint currently returns "pending" (with a progress

96+

// integer) for in-flight jobs. Treat it as "processing" so polling continues

97+

// instead of failing with XAI_VIDEO_MALFORMED_RESPONSE.

98+

const status =

99+

rawStatus === "pending" || rawStatus === "in_progress" ? "processing" : rawStatus;

95100

if (!status || !["queued", "processing", "done", "failed", "expired"].includes(status)) {

96101

throw new Error(XAI_VIDEO_MALFORMED_RESPONSE);

97102

}