fix(release): quote Parallels model config paths

This commit is contained in:
Peter Steinberger
2026-05-01 20:59:00 +01:00
parent 217273037b
commit e1732c2757
3 changed files with 28 additions and 4 deletions

View File

@@ -1,4 +1,8 @@
import { providerIdFromModelId, providerTimeoutConfigJson } from "./provider-auth.ts";
import {
configPathMapKey,
providerIdFromModelId,
providerTimeoutConfigJson,
} from "./provider-auth.ts";
export function psSingleQuote(value: string): string {
return `'${value.replaceAll("'", "''")}'`;
@@ -26,7 +30,7 @@ export function windowsModelProviderTimeoutScript(modelId: string): string {
value: JSON.parse(configJson) as unknown,
},
{
path: `agents.defaults.models.${modelId}`,
path: `agents.defaults.models${configPathMapKey(modelId)}`,
value: {
alias: "GPT",
params: {

View File

@@ -122,6 +122,10 @@ export function modelTransportConfigJson(modelId: string): string {
});
}
export function configPathMapKey(key: string): string {
return `[${JSON.stringify(key)}]`;
}
export function modelProviderConfigBatchJson(modelId: string, platform: Platform): string {
const commands: Array<{ path: string; value: unknown }> = [];
const providerId = providerIdFromModelId(modelId);
@@ -135,7 +139,7 @@ export function modelProviderConfigBatchJson(modelId: string, platform: Platform
const modelTransportConfig = modelTransportConfigJson(modelId);
if (modelTransportConfig) {
commands.push({
path: `agents.defaults.models.${modelId}`,
path: `agents.defaults.models${configPathMapKey(modelId)}`,
value: JSON.parse(modelTransportConfig) as unknown,
});
}