




























@@ -5,7 +5,11 @@ import {
55windowsModelProviderTimeoutScript,
66windowsOpenClawResolver,
77} from "./powershell.ts";
8-import { providerIdFromModelId, providerTimeoutConfigJson } from "./provider-auth.ts";
8+import {
9+modelTransportConfigJson,
10+providerIdFromModelId,
11+providerTimeoutConfigJson,
12+} from "./provider-auth.ts";
913import type { Platform, ProviderAuth } from "./types.ts";
10141115export interface NpmUpdateScriptInput {
@@ -14,19 +18,30 @@ export interface NpmUpdateScriptInput {
1418updateTarget: string;
1519}
162017-function posixModelProviderTimeoutCommand(
21+function posixModelProviderConfigCommands(
1822command: string,
1923modelId: string,
2024platform: Platform,
2125): string {
26+const commands: string[] = [];
2227const providerId = providerIdFromModelId(modelId);
2328const configJson = providerTimeoutConfigJson(modelId, platform);
24-if (!providerId || !configJson) {
25-return "";
29+if (providerId && configJson) {
30+commands.push(
31+`${command} config set ${shellQuote(`models.providers.${providerId}`)} ${shellQuote(
32+ configJson,
33+ )} --strict-json`,
34+);
35+}
36+const transportJson = modelTransportConfigJson(modelId);
37+if (transportJson) {
38+commands.push(
39+`${command} config set ${shellQuote(`agents.defaults.models.${modelId}`)} ${shellQuote(
40+ transportJson,
41+ )} --strict-json`,
42+);
2643}
27-return `${command} config set ${shellQuote(`models.providers.${providerId}`)} ${shellQuote(
28- configJson,
29- )} --strict-json`;
44+return commands.join("\n");
3045}
31463247function posixAssertAgentOkScript(command: string, input: NpmUpdateScriptInput, sessionId: string) {
@@ -123,7 +138,7 @@ ${posixVersionCheck("/opt/homebrew/bin/openclaw", input.expectedNeedle)}
123138start_openclaw_gateway
124139wait_for_gateway
125140/opt/homebrew/bin/openclaw models set ${shellQuote(input.auth.modelId)}
126-${posixModelProviderTimeoutCommand("/opt/homebrew/bin/openclaw", input.auth.modelId, "macos")}
141+${posixModelProviderConfigCommands("/opt/homebrew/bin/openclaw", input.auth.modelId, "macos")}
127142/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
128143/opt/homebrew/bin/openclaw config set tools.profile minimal
129144${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
@@ -280,7 +295,7 @@ ${posixVersionCheck("openclaw", input.expectedNeedle)}
280295start_openclaw_gateway
281296wait_for_gateway
282297openclaw models set ${shellQuote(input.auth.modelId)}
283-${posixModelProviderTimeoutCommand("openclaw", input.auth.modelId, "linux")}
298+${posixModelProviderConfigCommands("openclaw", input.auth.modelId, "linux")}
284299openclaw config set agents.defaults.skipBootstrap true --strict-json
285300openclaw config set tools.profile minimal
286301${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。