























@@ -87,15 +87,17 @@ describe("Parallels smoke model selection", () => {
8787const providerAuth = readFileSync(TS_PATHS.providerAuth, "utf8");
88888989expect(providerAuth).toContain("OPENCLAW_PARALLELS_OPENAI_MODEL");
90+expect(providerAuth).toContain("OPENCLAW_PARALLELS_WINDOWS_OPENAI_MODEL");
9091expect(providerAuth).toContain("openai/gpt-5.5");
92+expect(providerAuth).toContain("openai/gpt-4.1-mini");
9193expect(providerAuth).toContain('authChoice: "openai-api-key"');
9294expect(providerAuth).toContain('authChoice: "apiKey"');
9395expect(providerAuth).toContain('authChoice: "minimax-global-api"');
94969597for (const scriptPath of [...OS_TS_PATHS, TS_PATHS.npmUpdate]) {
9698const script = readFileSync(scriptPath, "utf8");
979998-expect(script, scriptPath).toContain("resolveProviderAuth");
100+expect(script, scriptPath).toMatch(/resolve(?:Windows)?ProviderAuth/u);
99101expect(script, scriptPath).toContain("--model <provider/model>");
100102expect(script, scriptPath).toContain("modelId");
101103}
@@ -243,6 +245,31 @@ console.log(resolveUbuntuVmName("Ubuntu missing"));
243245});
244246});
245247248+it("uses the faster OpenAI model for Windows smoke unless overridden", () => {
249+const source = `
250+import { resolveWindowsProviderAuth } from "./${TS_PATHS.common}";
251+const result = resolveWindowsProviderAuth({
252+ provider: "openai",
253+});
254+console.log(JSON.stringify(result));
255+`;
256+expect(JSON.parse(runTsEval(source, { OPENAI_API_KEY: "sk-openai" }))).toMatchObject({
257+apiKeyEnv: "OPENAI_API_KEY",
258+modelId: "openai/gpt-4.1-mini",
259+});
260+261+expect(
262+JSON.parse(
263+runTsEval(source, {
264+OPENAI_API_KEY: "sk-openai",
265+OPENCLAW_PARALLELS_WINDOWS_OPENAI_MODEL: "openai/custom-windows",
266+}),
267+),
268+).toMatchObject({
269+modelId: "openai/custom-windows",
270+});
271+});
272+246273it("rejects invalid providers and missing keys before touching guests", () => {
247274const invalidProvider = spawnSync(
248275"node",
@@ -338,14 +365,17 @@ console.log(resolveUbuntuVmName("Ubuntu missing"));
338365339366expect(macos).toContain('channel: "dev"');
340367expect(windows).toContain("Name channel -Value 'dev'");
368+expect(macos).toContain("OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1");
369+expect(windows).toContain("OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS");
341370});
342371343372it("passes aggregate model overrides into each OS fresh lane", () => {
344373const script = readFileSync(TS_PATHS.npmUpdate, "utf8");
345374346375expect(script).toContain("scripts/e2e/parallels/${platform}-smoke.ts");
347376expect(script).toContain('"--model"');
348-expect(script).toContain("this.auth.modelId");
377+expect(script).toContain("auth.modelId");
378+expect(script).toContain("authForPlatform");
349379expect(script).toContain("OPENCLAW_PARALLELS_LINUX_DISABLE_BONJOUR");
350380});
351381此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。