@naram/codex-switch 0.1.1 → 0.1.2
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 +14 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1202,7 +1202,7 @@ function buildConfigToml(spec) {
|
|
|
1202
1202
|
lines.push(`[model_providers.${tomlKeyPath(providerId)}]`);
|
|
1203
1203
|
lines.push(`name = ${tomlString(providerId)}`);
|
|
1204
1204
|
lines.push(`base_url = ${tomlString(spec.baseUrl)}`);
|
|
1205
|
-
lines.push(`wire_api = ${tomlString(spec.wireApi ?? "
|
|
1205
|
+
lines.push(`wire_api = ${tomlString(spec.wireApi ?? "responses")}`);
|
|
1206
1206
|
if (authMethod === "envKey") {
|
|
1207
1207
|
if (!spec.envVar) throw new Error("env_key authentication requires an env var name.");
|
|
1208
1208
|
lines.push(`env_key = ${tomlString(spec.envVar)}`);
|
|
@@ -1244,7 +1244,7 @@ function applyProfile(spec) {
|
|
|
1244
1244
|
const codexHome = codexHomeFor(spec.alias);
|
|
1245
1245
|
ensureDir(codexHome, 448);
|
|
1246
1246
|
const authMethod = spec.custom ? spec.authMethod ?? "envKey" : spec.authMethod;
|
|
1247
|
-
const wireApi = spec.custom ? spec.wireApi ?? "
|
|
1247
|
+
const wireApi = spec.custom ? spec.wireApi ?? "responses" : void 0;
|
|
1248
1248
|
const profileFiles = writeProfileSettings(spec.alias, {
|
|
1249
1249
|
custom: spec.custom,
|
|
1250
1250
|
baseUrl: spec.baseUrl,
|
|
@@ -1513,10 +1513,18 @@ async function runCreate() {
|
|
|
1513
1513
|
wireApi = ensure(
|
|
1514
1514
|
await ie({
|
|
1515
1515
|
message: "Wire protocol",
|
|
1516
|
-
initialValue: "
|
|
1516
|
+
initialValue: "responses",
|
|
1517
1517
|
options: [
|
|
1518
|
-
{
|
|
1519
|
-
|
|
1518
|
+
{
|
|
1519
|
+
value: "responses",
|
|
1520
|
+
label: "Responses",
|
|
1521
|
+
hint: "required by current Codex; OpenRouter, OpenAI-native, \u2026"
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
value: "chat",
|
|
1525
|
+
label: "Chat Completions",
|
|
1526
|
+
hint: "legacy \u2014 rejected by current Codex CLI"
|
|
1527
|
+
}
|
|
1520
1528
|
]
|
|
1521
1529
|
})
|
|
1522
1530
|
);
|
|
@@ -1904,7 +1912,7 @@ async function runRemove(aliasArg) {
|
|
|
1904
1912
|
}
|
|
1905
1913
|
|
|
1906
1914
|
// src/index.ts
|
|
1907
|
-
var VERSION = "0.1.
|
|
1915
|
+
var VERSION = "0.1.2";
|
|
1908
1916
|
var HELP = `${color.bold("codex-switch")} \u2014 set up isolated Codex profiles
|
|
1909
1917
|
|
|
1910
1918
|
${color.bold("USAGE")}
|