@naram/codex-switch 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1199,10 +1199,14 @@ function buildConfigToml(spec) {
|
|
|
1199
1199
|
const providerId = spec.providerId ?? providerIdForAlias("profile");
|
|
1200
1200
|
lines.push(`model_provider = ${tomlString(providerId)}`);
|
|
1201
1201
|
lines.push("");
|
|
1202
|
+
lines.push("[features]");
|
|
1203
|
+
lines.push("multi_agent = false");
|
|
1204
|
+
lines.push("multi_agent_v2 = false");
|
|
1205
|
+
lines.push("");
|
|
1202
1206
|
lines.push(`[model_providers.${tomlKeyPath(providerId)}]`);
|
|
1203
1207
|
lines.push(`name = ${tomlString(providerId)}`);
|
|
1204
1208
|
lines.push(`base_url = ${tomlString(spec.baseUrl)}`);
|
|
1205
|
-
lines.push(`wire_api = ${tomlString(spec.wireApi ?? "
|
|
1209
|
+
lines.push(`wire_api = ${tomlString(spec.wireApi ?? "responses")}`);
|
|
1206
1210
|
if (authMethod === "envKey") {
|
|
1207
1211
|
if (!spec.envVar) throw new Error("env_key authentication requires an env var name.");
|
|
1208
1212
|
lines.push(`env_key = ${tomlString(spec.envVar)}`);
|
|
@@ -1244,7 +1248,7 @@ function applyProfile(spec) {
|
|
|
1244
1248
|
const codexHome = codexHomeFor(spec.alias);
|
|
1245
1249
|
ensureDir(codexHome, 448);
|
|
1246
1250
|
const authMethod = spec.custom ? spec.authMethod ?? "envKey" : spec.authMethod;
|
|
1247
|
-
const wireApi = spec.custom ? spec.wireApi ?? "
|
|
1251
|
+
const wireApi = spec.custom ? spec.wireApi ?? "responses" : void 0;
|
|
1248
1252
|
const profileFiles = writeProfileSettings(spec.alias, {
|
|
1249
1253
|
custom: spec.custom,
|
|
1250
1254
|
baseUrl: spec.baseUrl,
|
|
@@ -1513,10 +1517,18 @@ async function runCreate() {
|
|
|
1513
1517
|
wireApi = ensure(
|
|
1514
1518
|
await ie({
|
|
1515
1519
|
message: "Wire protocol",
|
|
1516
|
-
initialValue: "
|
|
1520
|
+
initialValue: "responses",
|
|
1517
1521
|
options: [
|
|
1518
|
-
{
|
|
1519
|
-
|
|
1522
|
+
{
|
|
1523
|
+
value: "responses",
|
|
1524
|
+
label: "Responses",
|
|
1525
|
+
hint: "required by current Codex; OpenRouter, OpenAI-native, \u2026"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
value: "chat",
|
|
1529
|
+
label: "Chat Completions",
|
|
1530
|
+
hint: "legacy \u2014 rejected by current Codex CLI"
|
|
1531
|
+
}
|
|
1520
1532
|
]
|
|
1521
1533
|
})
|
|
1522
1534
|
);
|
|
@@ -1904,7 +1916,7 @@ async function runRemove(aliasArg) {
|
|
|
1904
1916
|
}
|
|
1905
1917
|
|
|
1906
1918
|
// src/index.ts
|
|
1907
|
-
var VERSION = "0.1.
|
|
1919
|
+
var VERSION = "0.1.3";
|
|
1908
1920
|
var HELP = `${color.bold("codex-switch")} \u2014 set up isolated Codex profiles
|
|
1909
1921
|
|
|
1910
1922
|
${color.bold("USAGE")}
|