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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
U
Unit 42
M
MIT News - Artificial intelligence
小众软件
小众软件
P
Proofpoint News Feed
雷峰网
雷峰网
L
LangChain Blog
S
SegmentFault 最新的问题
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
WordPress大学
WordPress大学
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
Recent Announcements
Recent Announcements
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow 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
test: configure parallels smoke provider timeout · opencl...
steipete · 2026-05-01 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -13,11 +13,11 @@ import {

1313

parseMode,

1414

parseProvider,

1515

providerIdFromModelId,

16+

providerTimeoutConfigJson,

1617

repoRoot,

1718

resolveHostIp,

1819

resolveHostPort,

1920

resolveLatestVersion,

20-

resolveParallelsModelTimeoutSeconds,

2121

resolveProviderAuth,

2222

resolveSnapshot,

2323

run,

@@ -690,14 +690,17 @@ rm -rf /root/.openclaw/test-bad-plugin`);

690690

private verifyLocalTurn(): void {

691691

this.guestExec(["openclaw", "models", "set", this.auth.modelId]);

692692

const providerId = providerIdFromModelId(this.auth.modelId) || this.options.provider;

693-

this.guestExec([

694-

"openclaw",

695-

"config",

696-

"set",

697-

`models.providers.${providerId}.timeoutSeconds`,

698-

String(resolveParallelsModelTimeoutSeconds("linux")),

699-

"--strict-json",

700-

]);

693+

const providerTimeoutConfig = providerTimeoutConfigJson(this.auth.modelId, "linux");

694+

if (providerTimeoutConfig) {

695+

this.guestExec([

696+

"openclaw",

697+

"config",

698+

"set",

699+

`models.providers.${providerId}`,

700+

providerTimeoutConfig,

701+

"--strict-json",

702+

]);

703+

}

701704

this.guestExec([

702705

"openclaw",

703706

"config",

Original file line numberDiff line numberDiff line change

@@ -12,10 +12,10 @@ import {

1212

parseMode,

1313

parseProvider,

1414

providerIdFromModelId,

15+

providerTimeoutConfigJson,

1516

resolveHostIp,

1617

resolveHostPort,

1718

resolveLatestVersion,

18-

resolveParallelsModelTimeoutSeconds,

1919

resolveProviderAuth,

2020

resolveSnapshot,

2121

run,

@@ -974,15 +974,18 @@ exit 1`);

974974

private verifyTurn(): void {

975975

this.guestExec([guestNode, guestOpenClawEntry, "models", "set", this.auth.modelId]);

976976

const providerId = providerIdFromModelId(this.auth.modelId) || this.options.provider;

977-

this.guestExec([

978-

guestNode,

979-

guestOpenClawEntry,

980-

"config",

981-

"set",

982-

`models.providers.${providerId}.timeoutSeconds`,

983-

String(resolveParallelsModelTimeoutSeconds("macos")),

984-

"--strict-json",

985-

]);

977+

const providerTimeoutConfig = providerTimeoutConfigJson(this.auth.modelId, "macos");

978+

if (providerTimeoutConfig) {

979+

this.guestExec([

980+

guestNode,

981+

guestOpenClawEntry,

982+

"config",

983+

"set",

984+

`models.providers.${providerId}`,

985+

providerTimeoutConfig,

986+

"--strict-json",

987+

]);

988+

}

986989

this.guestExec([

987990

guestNode,

988991

guestOpenClawEntry,

Original file line numberDiff line numberDiff line change

@@ -5,7 +5,7 @@ import {

55

windowsModelProviderTimeoutScript,

66

windowsOpenClawResolver,

77

} from "./powershell.ts";

8-

import { providerIdFromModelId, resolveParallelsModelTimeoutSeconds } from "./provider-auth.ts";

8+

import { providerIdFromModelId, providerTimeoutConfigJson } from "./provider-auth.ts";

99

import type { Platform, ProviderAuth } from "./types.ts";

1010
1111

export interface NpmUpdateScriptInput {

@@ -20,12 +20,13 @@ function posixModelProviderTimeoutCommand(

2020

platform: Platform,

2121

): string {

2222

const providerId = providerIdFromModelId(modelId);

23-

if (!providerId) {

23+

const configJson = providerTimeoutConfigJson(modelId, platform);

24+

if (!providerId || !configJson) {

2425

return "";

2526

}

26-

return `${command} config set ${shellQuote(

27-

`models.providers.${providerId}.timeoutSeconds`,

28-

)} ${resolveParallelsModelTimeoutSeconds(platform)} --strict-json`;

27+

return `${command} config set ${shellQuote(`models.providers.${providerId}`)} ${shellQuote(

28+

configJson,

29+

)} --strict-json`;

2930

}

3031
3132

function posixAssertAgentOkScript(command: string, input: NpmUpdateScriptInput, sessionId: string) {

Original file line numberDiff line numberDiff line change

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

1-

import { providerIdFromModelId, resolveParallelsModelTimeoutSeconds } from "./provider-auth.ts";

1+

import { providerIdFromModelId, providerTimeoutConfigJson } from "./provider-auth.ts";

22
33

export function psSingleQuote(value: string): string {

44

return `'${value.replaceAll("'", "''")}'`;

@@ -16,12 +16,11 @@ export function encodePowerShell(script: string): string {

1616
1717

export function windowsModelProviderTimeoutScript(modelId: string): string {

1818

const providerId = providerIdFromModelId(modelId);

19-

if (!providerId) {

19+

const configJson = providerTimeoutConfigJson(modelId, "windows");

20+

if (!providerId || !configJson) {

2021

return "";

2122

}

22-

return `Invoke-OpenClaw config set ${psSingleQuote(

23-

`models.providers.${providerId}.timeoutSeconds`,

24-

)} ${resolveParallelsModelTimeoutSeconds("windows")} --strict-json

23+

return `Invoke-OpenClaw config set ${psSingleQuote(`models.providers.${providerId}`)} ${psSingleQuote(configJson)} --strict-json

2524

if ($LASTEXITCODE -ne 0) { throw "model provider timeout config set failed" }`;

2625

}

2726
Original file line numberDiff line numberDiff line change

@@ -86,6 +86,30 @@ export function resolveParallelsModelTimeoutSeconds(platform?: Platform): number

8686

return Number.isFinite(raw) && raw > 0 ? Math.floor(raw) : 600;

8787

}

8888
89+

export function providerTimeoutConfigJson(modelId: string, platform: Platform): string {

90+

const providerId = providerIdFromModelId(modelId);

91+

if (providerId !== "openai") {

92+

return "";

93+

}

94+

const modelName = modelId.slice("openai/".length).trim();

95+

if (!modelName) {

96+

return "";

97+

}

98+

return JSON.stringify({

99+

api: "openai-responses",

100+

baseUrl: "https://api.openai.com/v1",

101+

models: [

102+

{

103+

contextWindow: 1_047_576,

104+

id: modelName,

105+

maxTokens: 32_768,

106+

name: modelName,

107+

},

108+

],

109+

timeoutSeconds: resolveParallelsModelTimeoutSeconds(platform),

110+

});

111+

}

112+
89113

export function parseProvider(value: string): Provider {

90114

if (value === "openai" || value === "anthropic" || value === "minimax") {

91115

return value;

Original file line numberDiff line numberDiff line change

@@ -321,8 +321,8 @@ console.log(JSON.stringify(result));

321321

expect(script, scriptPath).toContain("minimal");

322322

expect(script, scriptPath).toContain("finalAssistant(Raw|Visible)Text");

323323

}

324-

expect(readFileSync(TS_PATHS.macos, "utf8")).toContain("resolveParallelsModelTimeoutSeconds");

325-

expect(readFileSync(TS_PATHS.linux, "utf8")).toContain("resolveParallelsModelTimeoutSeconds");

324+

expect(readFileSync(TS_PATHS.macos, "utf8")).toContain("providerTimeoutConfigJson");

325+

expect(readFileSync(TS_PATHS.linux, "utf8")).toContain("providerTimeoutConfigJson");

326326

expect(readFileSync(TS_PATHS.windows, "utf8")).toContain("windowsModelProviderTimeoutScript");

327327
328328

const npmUpdateScripts = readFileSync(TS_PATHS.npmUpdateScripts, "utf8");

@@ -479,8 +479,8 @@ console.log(JSON.stringify(result));

479479

const windows = readFileSync(TS_PATHS.windows, "utf8");

480480
481481

expect(powershell).toContain("windowsOpenClawResolver");

482-

expect(powershell).toContain('resolveParallelsModelTimeoutSeconds("windows")');

483-

expect(powershell).toContain("models.providers.${providerId}.timeoutSeconds");

482+

expect(powershell).toContain("providerTimeoutConfigJson");

483+

expect(powershell).toContain("models.providers.${providerId}");

484484

expect(powershell).toContain("Resolve-OpenClawCommand");

485485

expect(powershell).toContain("npm\\node_modules\\openclaw\\openclaw.mjs");

486486

expect(powershell).toContain("$ErrorActionPreference = 'Continue'");