@@ -103,6 +103,21 @@ describe("Parallels smoke model selection", () => {
|
103 | 103 | } |
104 | 104 | }); |
105 | 105 | |
| 106 | +it("writes full model ids as config map keys in provider batches", () => { |
| 107 | +const source = ` |
| 108 | +import { modelProviderConfigBatchJson } from "./${TS_PATHS.common}"; |
| 109 | +const result = modelProviderConfigBatchJson("openai/gpt-4.1-mini", "windows"); |
| 110 | +console.log(result); |
| 111 | +`; |
| 112 | +const batch = JSON.parse(runTsEval(source, { OPENAI_API_KEY: "sk-openai" })) as Array<{ |
| 113 | +path: string; |
| 114 | +}>; |
| 115 | + |
| 116 | +expect(batch.map((entry) => entry.path)).toContain( |
| 117 | +'agents.defaults.models["openai/gpt-4.1-mini"]', |
| 118 | +); |
| 119 | +}); |
| 120 | + |
106 | 121 | it("keeps snapshot, host, package, and quote helpers shared", () => { |
107 | 122 | const common = readFileSync(TS_PATHS.common, "utf8"); |
108 | 123 | const hostCommand = readFileSync(TS_PATHS.hostCommand, "utf8"); |
@@ -488,7 +503,8 @@ console.log(JSON.stringify(result));
|
488 | 503 | expect(powershell).toContain("windowsOpenClawResolver"); |
489 | 504 | expect(powershell).toContain("providerTimeoutConfigJson"); |
490 | 505 | expect(powershell).toContain("models.providers.${providerId}"); |
491 | | -expect(powershell).toContain("agents.defaults.models.${modelId}"); |
| 506 | +expect(powershell).toContain("agents.defaults.models${configPathMapKey(modelId)}"); |
| 507 | +expect(powershell).toContain("configPathMapKey"); |
492 | 508 | expect(powershell).toContain('transport: "sse"'); |
493 | 509 | expect(powershell).toContain("Resolve-OpenClawCommand"); |
494 | 510 | expect(powershell).toContain("npm\\node_modules\\openclaw\\openclaw.mjs"); |
|