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

推荐订阅源

小众软件
小众软件
量子位
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
美团技术团队
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
腾讯CDC
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
博客园 - 【当耐特】
L
LangChain Blog
A
About on SuperTechFans
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
Netflix TechBlog - Medium
博客园_首页
WordPress大学
WordPress大学
博客园 - Franky
Engineering at Meta
Engineering at Meta
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence

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: keep music generation timeouts internal · openclaw/o...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -421,7 +421,10 @@ describe("createMusicGenerateTool", () => {

421421

config: asConfig({

422422

agents: {

423423

defaults: {

424-

musicGenerationModel: { primary: "google/lyria-3-clip-preview" },

424+

musicGenerationModel: {

425+

primary: "google/lyria-3-clip-preview",

426+

timeoutMs: 1000,

427+

},

425428

},

426429

},

427430

}),

@@ -432,25 +435,24 @@ describe("createMusicGenerateTool", () => {

432435433436

const result = await tool.execute("call-1", {

434437

prompt: "night-drive synthwave",

435-

timeoutMs: 1000,

436438

});

437439

const text = (result.content?.[0] as { text: string } | undefined)?.text ?? "";

438440439441

expect(generateSpy).toHaveBeenCalledTimes(1);

440442

expect(generateMusicOptions().autoProviderFallback).toBe(false);

441-

expect(generateMusicOptions().timeoutMs).toBe(10_000);

442-

expect(text).toContain("Timeout normalized: requested 1000ms; used 10000ms.");

443+

expect(generateMusicOptions().timeoutMs).toBe(120_000);

444+

expect(text).toContain("Timeout normalized: requested 1000ms; used 120000ms.");

443445

const details = detailsOf(result);

444-

expect(details.timeoutMs).toBe(10_000);

446+

expect(details.timeoutMs).toBe(120_000);

445447

expect(details.requestedTimeoutMs).toBe(1000);

446448

expect(details.timeoutNormalization).toEqual({

447449

requested: 1000,

448-

applied: 10_000,

449-

minimum: 10_000,

450+

applied: 120_000,

451+

minimum: 120_000,

450452

});

451453

});

452454453-

it("uses configured timeoutMs for music generation and lets calls override it", async () => {

455+

it("uses configured timeoutMs for music generation and ignores call-provided timeoutMs", async () => {

454456

vi.spyOn(musicGenerationRuntime, "generateMusic").mockResolvedValue({

455457

provider: "google",

456458

model: "lyria-3-clip-preview",

@@ -492,13 +494,13 @@ describe("createMusicGenerateTool", () => {

492494

});

493495

const overrideResult = await tool.execute("call-timeout-override", {

494496

prompt: "night-drive synthwave",

495-

timeoutMs: 12_345,

497+

timeoutMs: 240_000,

496498

});

497499498500

expect(generateMusicOptions(0).timeoutMs).toBe(180_000);

499-

expect(generateMusicOptions(1).timeoutMs).toBe(12_345);

501+

expect(generateMusicOptions(1).timeoutMs).toBe(180_000);

500502

expect(detailsOf(defaultResult).timeoutMs).toBe(180_000);

501-

expect(detailsOf(overrideResult).timeoutMs).toBe(12_345);

503+

expect(detailsOf(overrideResult).timeoutMs).toBe(180_000);

502504

});

503505504506

it("starts background generation and wakes the session with MEDIA lines", async () => {

@@ -543,7 +545,10 @@ describe("createMusicGenerateTool", () => {

543545

config: asConfig({

544546

agents: {

545547

defaults: {

546-

musicGenerationModel: { primary: "google/lyria-3-clip-preview" },

548+

musicGenerationModel: {

549+

primary: "google/lyria-3-clip-preview",

550+

timeoutMs: 1000,

551+

},

547552

},

548553

},

549554

}),

@@ -563,31 +568,30 @@ describe("createMusicGenerateTool", () => {

563568

const result = await tool.execute("call-1", {

564569

prompt: "night-drive synthwave",

565570

instrumental: true,

566-

timeoutMs: 1000,

567571

});

568572

const text = (result.content?.[0] as { text: string } | undefined)?.text ?? "";

569573570574

expect(text).toContain("Background task started for music generation (task-123).");

571575

expect(text).toContain("Do not call music_generate again for this request.");

572-

expect(text).toContain("Timeout normalized: requested 1000ms; used 10000ms.");

576+

expect(text).toContain("Timeout normalized: requested 1000ms; used 120000ms.");

573577

const details = detailsOf(result);

574578

expect(details.async).toBe(true);

575579

expect(details.status).toBe("started");

576580

expect((details.task as { taskId?: unknown }).taskId).toBe("task-123");

577581

expect(details.instrumental).toBe(true);

578-

expect(details.timeoutMs).toBe(10_000);

582+

expect(details.timeoutMs).toBe(120_000);

579583

expect(details.requestedTimeoutMs).toBe(1000);

580584

expect(details.timeoutNormalization).toEqual({

581585

requested: 1000,

582-

applied: 10_000,

583-

minimum: 10_000,

586+

applied: 120_000,

587+

minimum: 120_000,

584588

});

585589

if (!scheduledWork) {

586590

throw new Error("expected scheduled music generation work");

587591

}

588592

await scheduledWork();

589593

expect(generateMusicOptions().autoProviderFallback).toBe(false);

590-

expect(generateMusicOptions().timeoutMs).toBe(10_000);

594+

expect(generateMusicOptions().timeoutMs).toBe(120_000);

591595

const progress = taskProgressCall();

592596

expect(String(progress.runId)).toMatch(/^tool:music_generate:/);

593597

expect(progress.progressSummary).toBe("Generating music");