@codexapi/codexclaude 2.0.13 → 2.0.15
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/CUSTOMIZATIONS.md +11 -24
- package/README.md +7 -20
- package/bin/codexclaude.js +33 -120
- package/codexclaude.md +35 -31
- package/package.json +3 -7
package/CUSTOMIZATIONS.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# CodexAPI.pro Customizations
|
|
2
2
|
|
|
3
|
-
`codexclaude` intentionally tracks the
|
|
3
|
+
`codexclaude` intentionally tracks the managed coding runtime while keeping a thin CodexAPI.pro launcher layer.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Runtime
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
7
|
+
- Customer-facing app name: `Magnetapi.org Coding Agent`
|
|
8
|
+
- Local launcher version: `2.0.15`
|
|
9
|
+
- Bundled coding runtime is managed internally and must not be advertised in customer-facing startup text.
|
|
10
10
|
|
|
11
11
|
## Launcher Behavior
|
|
12
12
|
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
- Saves the returned API username in `~/.codexclaude/config.json`.
|
|
15
15
|
- Rewrites `~/.codex/config.toml` before every launch.
|
|
16
16
|
- Starts official Codex with `--search` by default.
|
|
17
|
-
- Passes all unknown commands directly to the
|
|
17
|
+
- Passes all unknown commands directly to the bundled coding runtime.
|
|
18
18
|
- Provides `codexclaude changelog` so users can see forced-update changes from the terminal.
|
|
19
|
+
- Does not expose separate `codexclaude status` or `codexclaude usage` commands; wallet information remains a compact pre-launch line.
|
|
19
20
|
- Checks npm latest at startup and blocks coding with an Update Now command when a newer launcher is available.
|
|
20
21
|
|
|
21
22
|
## Provider Config
|
|
22
23
|
|
|
23
24
|
The launcher writes a Codex model provider named `codexapi`:
|
|
24
25
|
|
|
25
|
-
- `base_url = "https://codexapi.pro/v1"` for ChatGPT-5.5,
|
|
26
|
+
- `base_url = "https://codexapi.pro/v1"` for ChatGPT-5.5, or `https://api-chicago.codexapi.pro/v1` for Claude-family models.
|
|
26
27
|
- `wire_api = "responses"`
|
|
27
28
|
- `supports_websockets = false`
|
|
28
29
|
- `experimental_bearer_token` set to the customer API username
|
|
@@ -30,18 +31,16 @@ The launcher writes a Codex model provider named `codexapi`:
|
|
|
30
31
|
|
|
31
32
|
## Runtime Defaults
|
|
32
33
|
|
|
33
|
-
- Model: selected by the user, defaulting to `gpt-5.5`; supported launcher choices are `gpt-5.5`, `claude-opus-4-8`, `claude-sonnet-
|
|
34
|
+
- Model: selected by the user, defaulting to `gpt-5.5`; supported launcher choices are `gpt-5.5`, `claude-opus-4-8`, `claude-sonnet-5`, and `claude-fable-5`.
|
|
34
35
|
- Reasoning effort displayed in Codex: `xhigh`
|
|
35
36
|
- Server-side upstream reasoning effort: `high`, enforced by CodexAPI.pro regardless of client display.
|
|
36
|
-
- Local model catalog: `~/.codexclaude/model_catalog.json`; this keeps native Codex `/model` limited to the
|
|
37
|
+
- Local model catalog: `~/.codexclaude/model_catalog.json`; this keeps native Codex `/model` limited to the four supported CodexAPI.pro choices and prevents fallback metadata warnings for Opus 4.8, Sonnet 5, and Fable 5.
|
|
37
38
|
- Service tier: omitted by default; `/fast` remains a user-controlled Codex setting and is billed server-side when active.
|
|
38
39
|
- Approval policy: `never`
|
|
39
40
|
- Sandbox mode: `danger-full-access`
|
|
40
41
|
- TUI status line: `model-with-reasoning`, `fast-mode`, `current-dir`
|
|
41
42
|
- Claude-family Responses traffic uses the Claude-compatible CodexAPI.pro endpoint for CodexAPI.pro and ChatPlus accounts, while MyAPI.world accounts keep the MyAPI endpoint.
|
|
42
|
-
- Fable 5 stays visible to the user while the backend applies the custom routed premium path and
|
|
43
|
-
- Deepseek v4 Budget Responses traffic is routed through CodexAPI.pro's Deepseek-compatible gateway.
|
|
44
|
-
- Google Gemini Flash 3.5 Responses traffic keeps the user-visible Gemini model id while CodexAPI.pro routes it internally through Sonnet 4.6 with the configured server effort.
|
|
43
|
+
- Fable 5 stays visible to the user while the backend applies the custom routed premium path and 2x billing multiplier.
|
|
45
44
|
|
|
46
45
|
Current backend state verified on 2026-06-25: Admin Manage Models controls runtime routing server-side. This operational routing must not change the launcher-visible model ids, model catalog, or customer-facing labels.
|
|
47
46
|
|
|
@@ -52,15 +51,3 @@ Before launching Codex, the launcher calls `/api/v1/me` using the saved API user
|
|
|
52
51
|
```text
|
|
53
52
|
gpt-5.5 xhigh · ~/project · Wallet $20.00
|
|
54
53
|
```
|
|
55
|
-
|
|
56
|
-
The same wallet lookup is available through:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
codexclaude status
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Recent token usage is available through:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
codexclaude usage
|
|
66
|
-
```
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# codexclaude
|
|
2
2
|
|
|
3
|
-
`codexclaude`
|
|
3
|
+
`codexclaude` installs the Magnetapi.org Coding Agent for customers who want one coding CLI that can use ChatGPT-5.5, Opus 4.8, Sonnet 5, or Fable 5 against the same Token Wallet.
|
|
4
4
|
|
|
5
|
-
Version `2.0.
|
|
5
|
+
Version `2.0.15` applies account, wallet, model, and Full Access defaults before the coding session starts.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -48,7 +48,7 @@ Switch model:
|
|
|
48
48
|
codexclaude model
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Available model labels are `ChatGPT-5.5`, `Opus 4.8`, `Sonnet
|
|
51
|
+
Available model labels are `ChatGPT-5.5`, `Opus 4.8`, `Sonnet 5`, and `Fable 5`. All four use a Responses-compatible endpoint and the same customer Token Wallet.
|
|
52
52
|
|
|
53
53
|
Show current launcher changes:
|
|
54
54
|
|
|
@@ -64,30 +64,17 @@ Before launching Codex, the app prints a compact status line like:
|
|
|
64
64
|
gpt-5.5 xhigh · ~/codexapi · Wallet $20.00
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
You can also check this without starting Codex:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
codexclaude status
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Show recent wallet-billed token usage:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
codexclaude usage
|
|
77
|
-
```
|
|
78
|
-
|
|
79
67
|
## Preserved CodexAPI.pro Customizations
|
|
80
68
|
|
|
81
69
|
- Dashboard username or email plus password login.
|
|
82
|
-
- ChatGPT-5.5, Opus 4.8, Sonnet
|
|
70
|
+
- ChatGPT-5.5, Opus 4.8, Sonnet 5, or Fable 5 model selection.
|
|
83
71
|
- CodexAPI.pro Responses-compatible provider at `https://codexapi.pro/v1`.
|
|
84
72
|
- Full Access defaults: approval policy `never` and sandbox mode `danger-full-access`.
|
|
85
73
|
- xhigh visible reasoning in the local Codex UI while CodexAPI.pro keeps upstream runtime effort server-managed.
|
|
86
|
-
- A local `~/.codexclaude/model_catalog.json` file so native Codex `/model` lists only ChatGPT-5.5, Opus 4.8, Sonnet
|
|
74
|
+
- A local `~/.codexclaude/model_catalog.json` file so native Codex `/model` lists only ChatGPT-5.5, Opus 4.8, Sonnet 5, and Fable 5.
|
|
87
75
|
- No default fast service tier. Fast mode is billed only when the user enables it inside Codex.
|
|
88
|
-
-
|
|
89
|
-
- Token Wallet balance lookup before launch
|
|
76
|
+
- Magnetapi.org Coding Agent `2.0.15` with the current profile-compatible config enabled.
|
|
77
|
+
- Token Wallet balance lookup before launch without exposing separate `status` or `usage` launcher commands.
|
|
90
78
|
- Opus 4.8 tool-call compatibility through the Chicago CodexAPI.pro Responses gateway.
|
|
91
|
-
- Google Gemini Flash 3.5 is visible to users while CodexAPI.pro routes it server-side through the approved Sonnet 4.6 low-effort bridge.
|
|
92
79
|
- Backend-identifying request headers so CodexAPI.pro can enforce subscription plan rules server-side.
|
|
93
80
|
- npm latest-version checks before coding starts, with an explicit update command when a newer required launcher exists.
|
package/bin/codexclaude.js
CHANGED
|
@@ -10,8 +10,9 @@ import { stdin as input, stdout as output } from "node:process";
|
|
|
10
10
|
|
|
11
11
|
const require = createRequire(import.meta.url);
|
|
12
12
|
|
|
13
|
-
const APP_VERSION = "2.0.
|
|
14
|
-
const CODEX_VERSION = "0.142.
|
|
13
|
+
const APP_VERSION = "2.0.15";
|
|
14
|
+
const CODEX_VERSION = "0.142.5";
|
|
15
|
+
const APP_DISPLAY_NAME = "Magnetapi.org Coding Agent";
|
|
15
16
|
const DISPLAY_REASONING_EFFORT = "xhigh";
|
|
16
17
|
const SERVER_REASONING_EFFORT = "high";
|
|
17
18
|
const API_ORIGIN = (process.env.CODEXCLAUDE_API_ORIGIN || "https://codexapi.pro").replace(/\/+$/, "");
|
|
@@ -52,10 +53,10 @@ const MODELS = {
|
|
|
52
53
|
label: "Opus 4.8",
|
|
53
54
|
aliases: ["2", "opus", "opus-4.8", "opus-4.7", "claude", "claude-opus-4-8", "claude-opus-4-7"],
|
|
54
55
|
},
|
|
55
|
-
"claude-sonnet-
|
|
56
|
-
id: "claude-sonnet-
|
|
57
|
-
label: "Sonnet
|
|
58
|
-
aliases: ["3", "sonnet", "sonnet-4.6", "sonnet-4-6", "claude-sonnet-4-6", "claude-sonnet-4.6"],
|
|
56
|
+
"claude-sonnet-5": {
|
|
57
|
+
id: "claude-sonnet-5",
|
|
58
|
+
label: "Sonnet 5",
|
|
59
|
+
aliases: ["3", "sonnet", "sonnet-5", "sonnet-4.6", "sonnet-4-6", "claude-sonnet-5", "claude-sonnet-4-6", "claude-sonnet-4.6"],
|
|
59
60
|
},
|
|
60
61
|
"claude-fable-5": {
|
|
61
62
|
id: "claude-fable-5",
|
|
@@ -63,24 +64,13 @@ const MODELS = {
|
|
|
63
64
|
aliases: ["4", "fable", "fable-5", "fabel", "fabel-5", "claude-fable-5", "claude-fabel-5"],
|
|
64
65
|
premium: true,
|
|
65
66
|
},
|
|
66
|
-
"deepseek-v4-pro": {
|
|
67
|
-
id: "deepseek-v4-pro",
|
|
68
|
-
label: "Deepseek v4 Budget",
|
|
69
|
-
aliases: ["5", "deepseek", "deepseek-v4", "deepseek-v4-pro", "budget"],
|
|
70
|
-
budget: true,
|
|
71
|
-
},
|
|
72
|
-
"gemini-3.5-flash": {
|
|
73
|
-
id: "gemini-3.5-flash",
|
|
74
|
-
label: "Google Gemini Flash 3.5",
|
|
75
|
-
aliases: ["6", "gemini", "flash", "gemini-flash", "gemini-3.5-flash", "gemini-flash-3.5", "google-gemini-flash-3.5"],
|
|
76
|
-
},
|
|
77
67
|
};
|
|
78
68
|
|
|
79
69
|
async function main() {
|
|
80
70
|
ensureExecutable();
|
|
81
71
|
const [command = "start", ...args] = process.argv.slice(2);
|
|
82
72
|
if (["-v", "--version", "version"].includes(command)) {
|
|
83
|
-
console.log(
|
|
73
|
+
console.log(`${APP_DISPLAY_NAME} ${APP_VERSION}`);
|
|
84
74
|
return;
|
|
85
75
|
}
|
|
86
76
|
if (["-h", "--help", "help"].includes(command)) {
|
|
@@ -100,14 +90,6 @@ async function main() {
|
|
|
100
90
|
logout();
|
|
101
91
|
return;
|
|
102
92
|
}
|
|
103
|
-
if (command === "status") {
|
|
104
|
-
await status();
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (command === "usage") {
|
|
108
|
-
await usage();
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
93
|
if (command === "model") {
|
|
112
94
|
await modelFlow();
|
|
113
95
|
return;
|
|
@@ -133,20 +115,18 @@ async function main() {
|
|
|
133
115
|
|
|
134
116
|
function printHelp() {
|
|
135
117
|
console.log(`
|
|
136
|
-
|
|
118
|
+
${APP_DISPLAY_NAME} ${APP_VERSION}
|
|
137
119
|
|
|
138
120
|
Commands:
|
|
139
121
|
codexclaude login Login with CodexAPI.pro username/email and password
|
|
140
|
-
codexclaude model Select ChatGPT-5.5, Opus 4.8, Sonnet
|
|
122
|
+
codexclaude model Select ChatGPT-5.5, Opus 4.8, Sonnet 5, or Fable 5
|
|
141
123
|
codexclaude changelog Show the latest CodexAPI.pro launcher changes
|
|
142
124
|
codexclaude setup Rewrite ~/.codex/config.toml with Full Access defaults
|
|
143
125
|
codexclaude start Start Codex with --search
|
|
144
126
|
codexclaude resume Resume with codex resume --search
|
|
145
|
-
codexclaude status Show saved account, selected model, and wallet balance
|
|
146
|
-
codexclaude usage Show wallet balance and recent token usage
|
|
147
127
|
codexclaude logout Remove saved codexclaude account state
|
|
148
128
|
|
|
149
|
-
Any other command is passed through to
|
|
129
|
+
Any other command is passed through to the bundled coding runtime after Magnetapi.org account and model config is applied.
|
|
150
130
|
`);
|
|
151
131
|
}
|
|
152
132
|
|
|
@@ -240,7 +220,7 @@ async function askModel(rl, current) {
|
|
|
240
220
|
const currentLabel = MODELS[current]?.label || MODELS["gpt-5.5"].label;
|
|
241
221
|
console.log("\nChoose your coding model:");
|
|
242
222
|
Object.values(MODELS).forEach((model, index) => {
|
|
243
|
-
const premium = model.premium ? " (
|
|
223
|
+
const premium = model.premium ? " (2x premium billing)" : "";
|
|
244
224
|
console.log(` ${index + 1}. ${model.label}${premium}`);
|
|
245
225
|
});
|
|
246
226
|
const answer = (await rl.question(`Model [${currentLabel}]: `)).trim().toLowerCase();
|
|
@@ -530,18 +510,12 @@ function modelCatalogDescription(modelId) {
|
|
|
530
510
|
if (modelId === "claude-opus-4-8") {
|
|
531
511
|
return "CodexAPI.pro Opus 4.8 coding route with local Codex tools and wallet billing.";
|
|
532
512
|
}
|
|
533
|
-
if (modelId === "claude-sonnet-
|
|
534
|
-
return "CodexAPI.pro Sonnet
|
|
513
|
+
if (modelId === "claude-sonnet-5") {
|
|
514
|
+
return "CodexAPI.pro Sonnet 5 coding route with local Codex tools and wallet billing.";
|
|
535
515
|
}
|
|
536
516
|
if (modelId === "claude-fable-5") {
|
|
537
517
|
return "CodexAPI.pro Fable 5 premium coding route with local Codex tools and wallet billing.";
|
|
538
518
|
}
|
|
539
|
-
if (modelId === "deepseek-v4-pro") {
|
|
540
|
-
return "CodexAPI.pro Deepseek v4 Budget coding route with local Codex tools and wallet billing.";
|
|
541
|
-
}
|
|
542
|
-
if (modelId === "gemini-3.5-flash") {
|
|
543
|
-
return "CodexAPI.pro Google Gemini Flash 3.5 coding route with local Codex tools and wallet billing.";
|
|
544
|
-
}
|
|
545
519
|
return "CodexAPI.pro ChatGPT-5.5 coding route with local Codex tools and wallet billing.";
|
|
546
520
|
}
|
|
547
521
|
|
|
@@ -571,69 +545,6 @@ function logout() {
|
|
|
571
545
|
console.log("codexclaude login state removed. Codex config was left untouched.");
|
|
572
546
|
}
|
|
573
547
|
|
|
574
|
-
async function status() {
|
|
575
|
-
const config = readConfig();
|
|
576
|
-
if (!config?.username) {
|
|
577
|
-
console.log("Not logged in. Run: codexclaude login");
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
console.log(`Logged in as: ${config.username}`);
|
|
581
|
-
console.log(`Model: ${MODELS[config.model]?.label || config.model}`);
|
|
582
|
-
console.log(`Codex runtime: @openai/codex ${CODEX_VERSION}`);
|
|
583
|
-
console.log(`Reasoning: ${DISPLAY_REASONING_EFFORT}`);
|
|
584
|
-
console.log("Fast mode: off by default; billed only when enabled inside Codex.");
|
|
585
|
-
console.log(`API: ${config.apiOrigin || API_ORIGIN}`);
|
|
586
|
-
console.log(`Model API route: ${providerOriginLabel(config)}`);
|
|
587
|
-
console.log(`Codex config: ${CODEX_CONFIG_FILE}`);
|
|
588
|
-
try {
|
|
589
|
-
const wallet = await walletSnapshot(config);
|
|
590
|
-
console.log(`Token Wallet: ${formatUsd(wallet.balance)}`);
|
|
591
|
-
console.log(formatStatusLine(config, wallet, process.cwd()));
|
|
592
|
-
} catch (error) {
|
|
593
|
-
console.log(`Token Wallet: unavailable (${error.message})`);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
async function usage() {
|
|
598
|
-
const config = readConfig();
|
|
599
|
-
if (!config?.username) {
|
|
600
|
-
console.log("Not logged in. Run: codexclaude login");
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
console.log(`Logged in as: ${config.username}`);
|
|
604
|
-
console.log(`API: ${config.apiOrigin || API_ORIGIN}`);
|
|
605
|
-
try {
|
|
606
|
-
const wallet = await walletSnapshot(config);
|
|
607
|
-
console.log(`Token Wallet: ${formatUsd(wallet.balance)}`);
|
|
608
|
-
} catch (error) {
|
|
609
|
-
console.log(`Token Wallet: unavailable (${error.message})`);
|
|
610
|
-
}
|
|
611
|
-
const usagePayload = await usageSnapshot(config);
|
|
612
|
-
if (!usagePayload) {
|
|
613
|
-
console.log("Usage: unavailable from this account endpoint.");
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
const summary = usagePayload.summary || {};
|
|
617
|
-
const totalUsd = summary.totalChargedUsd || summary.totalUsd || summary.chargedUsd || null;
|
|
618
|
-
if (totalUsd !== null && totalUsd !== undefined) {
|
|
619
|
-
console.log(`Recent usage total: ${formatUsd(numericWalletValue(totalUsd))}`);
|
|
620
|
-
}
|
|
621
|
-
const transactions = Array.isArray(usagePayload.transactions) ? usagePayload.transactions.slice(0, 10) : [];
|
|
622
|
-
if (!transactions.length) {
|
|
623
|
-
console.log("No token usage transactions are recorded yet.");
|
|
624
|
-
return;
|
|
625
|
-
}
|
|
626
|
-
console.log("\nRecent token usage:");
|
|
627
|
-
for (const item of transactions) {
|
|
628
|
-
const when = item.createdAt || item.created_at || "";
|
|
629
|
-
const model = item.model || item.modelId || item.service || "model";
|
|
630
|
-
const amount = item.chargedUsd ?? item.charged_usd ?? item.amountUsd ?? item.amount_usd ?? "0";
|
|
631
|
-
const inputTokens = item.inputTokens ?? item.input_tokens ?? 0;
|
|
632
|
-
const outputTokens = item.outputTokens ?? item.output_tokens ?? 0;
|
|
633
|
-
console.log(`- ${when} · ${model} · ${formatUsd(numericWalletValue(amount))} · in ${inputTokens} / out ${outputTokens}`);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
548
|
async function runCodex(args) {
|
|
638
549
|
const config = requireConfig();
|
|
639
550
|
let wallet = null;
|
|
@@ -645,6 +556,7 @@ async function runCodex(args) {
|
|
|
645
556
|
if (!isTruthy(process.env.CODEXCLAUDE_QUIET_STATUS)) {
|
|
646
557
|
console.log(formatStatusLine(config, wallet, process.cwd()));
|
|
647
558
|
}
|
|
559
|
+
process.stdout.write(`\x1b]0;${APP_DISPLAY_NAME} v${APP_VERSION}\x07`);
|
|
648
560
|
const launch = resolveCodexLaunch();
|
|
649
561
|
const env = {
|
|
650
562
|
...process.env,
|
|
@@ -748,10 +660,6 @@ async function walletSnapshot(config) {
|
|
|
748
660
|
};
|
|
749
661
|
}
|
|
750
662
|
|
|
751
|
-
async function usageSnapshot(config) {
|
|
752
|
-
return await tryGetJsonAuth("/api/v1/billing/token-usage?limit=25&days=30", config, { timeoutMs: 20000 });
|
|
753
|
-
}
|
|
754
|
-
|
|
755
663
|
function numericWalletValue(value) {
|
|
756
664
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
757
665
|
return value;
|
|
@@ -764,25 +672,19 @@ function numericWalletValue(value) {
|
|
|
764
672
|
function formatStatusLine(config, wallet, cwd) {
|
|
765
673
|
const model = modelStatusName(config.model);
|
|
766
674
|
const walletText = wallet ? `Wallet ${formatUsd(wallet.balance)}` : "Wallet unavailable";
|
|
767
|
-
return `${model} ${DISPLAY_REASONING_EFFORT} · ${formatCwd(cwd)} · ${walletText}`;
|
|
675
|
+
return `${APP_DISPLAY_NAME} v${APP_VERSION} · ${model} ${DISPLAY_REASONING_EFFORT} · ${formatCwd(cwd)} · ${walletText}`;
|
|
768
676
|
}
|
|
769
677
|
|
|
770
678
|
function modelStatusName(model) {
|
|
771
679
|
if (model === "claude-opus-4-8") {
|
|
772
680
|
return "opus-4.8";
|
|
773
681
|
}
|
|
774
|
-
if (model === "claude-sonnet-
|
|
775
|
-
return "sonnet-
|
|
682
|
+
if (model === "claude-sonnet-5") {
|
|
683
|
+
return "sonnet-5";
|
|
776
684
|
}
|
|
777
685
|
if (model === "claude-fable-5") {
|
|
778
686
|
return "fable-5";
|
|
779
687
|
}
|
|
780
|
-
if (model === "deepseek-v4-pro") {
|
|
781
|
-
return "deepseek-v4 budget";
|
|
782
|
-
}
|
|
783
|
-
if (model === "gemini-3.5-flash") {
|
|
784
|
-
return "gemini flash 3.5";
|
|
785
|
-
}
|
|
786
688
|
return "gpt-5.5";
|
|
787
689
|
}
|
|
788
690
|
|
|
@@ -794,14 +696,25 @@ function normalizeConfig(config) {
|
|
|
794
696
|
if (normalized.model === "claude-opus-4-7") {
|
|
795
697
|
normalized.model = "claude-opus-4-8";
|
|
796
698
|
}
|
|
797
|
-
if (["claude-sonnet-4.6", "sonnet-4.6", "sonnet-4-6"].includes(normalized.model)) {
|
|
798
|
-
normalized.model = "claude-sonnet-
|
|
699
|
+
if (["claude-sonnet-4.6", "claude-sonnet-4-6", "sonnet-4.6", "sonnet-4-6", "sonnet-5"].includes(normalized.model)) {
|
|
700
|
+
normalized.model = "claude-sonnet-5";
|
|
799
701
|
}
|
|
800
702
|
if (["claude-fabel-5", "fable-5", "fabel-5"].includes(normalized.model)) {
|
|
801
703
|
normalized.model = "claude-fable-5";
|
|
802
704
|
}
|
|
803
|
-
if (
|
|
804
|
-
|
|
705
|
+
if (
|
|
706
|
+
[
|
|
707
|
+
"deepseek-v4-pro",
|
|
708
|
+
"deepseek-v4-budget",
|
|
709
|
+
"deepseek",
|
|
710
|
+
"budget",
|
|
711
|
+
"gemini-3.5-flash",
|
|
712
|
+
"gemini-flash-3.5",
|
|
713
|
+
"gemini-flash-3-5",
|
|
714
|
+
"google-gemini-flash-3.5",
|
|
715
|
+
].includes(normalized.model)
|
|
716
|
+
) {
|
|
717
|
+
normalized.model = "gpt-5.5";
|
|
805
718
|
}
|
|
806
719
|
if (!MODELS[normalized.model]) {
|
|
807
720
|
normalized.model = "gpt-5.5";
|
package/codexclaude.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# codexclaude Customization Ledger
|
|
2
2
|
|
|
3
3
|
This file records the CodexAPI.pro-specific behavior that must survive every
|
|
4
|
-
upgrade of the
|
|
4
|
+
upgrade of the bundled coding runtime dependency. Treat it as the handoff
|
|
5
5
|
document for future maintainers. The launcher should remain a thin wrapper
|
|
6
6
|
around official `@openai/codex`; do not patch the native Codex binary unless
|
|
7
7
|
there is no supported configuration or API boundary that can solve the issue.
|
|
@@ -9,8 +9,9 @@ there is no supported configuration or API boundary that can solve the issue.
|
|
|
9
9
|
## Current Release
|
|
10
10
|
|
|
11
11
|
- Launcher package: `@codexapi/codexclaude`
|
|
12
|
-
- Launcher version: `2.0.
|
|
13
|
-
-
|
|
12
|
+
- Launcher version: `2.0.15`
|
|
13
|
+
- Customer-facing app name: `Magnetapi.org Coding Agent`
|
|
14
|
+
- Bundled runtime dependency: managed internally; do not print the upstream runtime version in customer-facing startup text.
|
|
14
15
|
- Public install command: `npm install -g @codexapi/codexclaude@latest`
|
|
15
16
|
- Default API origin: `https://codexapi.pro`
|
|
16
17
|
- Normal Responses base URL: `https://codexapi.pro/v1`
|
|
@@ -19,21 +20,19 @@ there is no supported configuration or API boundary that can solve the issue.
|
|
|
19
20
|
- Generated Codex config: `~/.codex/config.toml`
|
|
20
21
|
- Generated Codex model catalog: `~/.codexclaude/model_catalog.json`
|
|
21
22
|
|
|
22
|
-
State verified on 2026-06
|
|
23
|
+
State verified on 2026-07-06: the launcher presents itself as Magnetapi.org Coding Agent `2.0.15`. Backend routing is server-controlled by Admin Manage Models and must not collapse the launcher model list or rename customer-selected model ids.
|
|
23
24
|
|
|
24
25
|
## Required User-Facing Model Behavior
|
|
25
26
|
|
|
26
|
-
`codexclaude` supports exactly
|
|
27
|
+
`codexclaude` supports exactly four visible model choices:
|
|
27
28
|
|
|
28
29
|
- `gpt-5.5` displayed as `ChatGPT-5.5`
|
|
29
30
|
- `claude-opus-4-8` displayed as `Opus 4.8`
|
|
30
|
-
- `claude-sonnet-
|
|
31
|
+
- `claude-sonnet-5` displayed as `Sonnet 5`
|
|
31
32
|
- `claude-fable-5` displayed as `Fable 5`
|
|
32
|
-
- `deepseek-v4-pro` displayed as `Deepseek v4 Budget`
|
|
33
|
-
- `gemini-3.5-flash` displayed as `Google Gemini Flash 3.5`
|
|
34
33
|
|
|
35
|
-
The launcher command `codexclaude model` must list only those
|
|
36
|
-
The native Codex `/model` picker must also list only those
|
|
34
|
+
The launcher command `codexclaude model` must list only those four options.
|
|
35
|
+
The native Codex `/model` picker must also list only those four options. This
|
|
37
36
|
is enforced by writing `model_catalog_json` in `~/.codex/config.toml` and
|
|
38
37
|
creating a complete Codex-compatible catalog at
|
|
39
38
|
`~/.codexclaude/model_catalog.json`.
|
|
@@ -77,7 +76,7 @@ supported slugs. Each entry must include, at minimum:
|
|
|
77
76
|
- `input_modalities`
|
|
78
77
|
- `additional_speed_tiers`
|
|
79
78
|
|
|
80
|
-
Keep `visibility = "list"` for the
|
|
79
|
+
Keep `visibility = "list"` for the four supported entries. Do not include any
|
|
81
80
|
other list-visible models in this catalog.
|
|
82
81
|
|
|
83
82
|
## Reasoning Display Versus Server Runtime
|
|
@@ -99,8 +98,7 @@ The launcher keeps both concepts explicit:
|
|
|
99
98
|
- `DISPLAY_REASONING_EFFORT = "xhigh"`
|
|
100
99
|
- `SERVER_REASONING_EFFORT = "high"`
|
|
101
100
|
|
|
102
|
-
The status
|
|
103
|
-
`codexclaude status` may show the configured server effort for transparency, but normal launch status must not imply the user-visible model is downgraded.
|
|
101
|
+
The native Codex status line should show `xhigh`. The launcher no longer exposes separate `codexclaude status` or `codexclaude usage` commands, so normal launch status must not imply the user-visible model is downgraded.
|
|
104
102
|
|
|
105
103
|
## Fast Mode Behavior
|
|
106
104
|
|
|
@@ -142,7 +140,7 @@ terminal_title = ["project-name", "model-with-reasoning", "run-state"]
|
|
|
142
140
|
```
|
|
143
141
|
|
|
144
142
|
The selected model must remain the user's chosen slug. Do not force the local
|
|
145
|
-
config model to `gpt-5.5` when Opus, Sonnet,
|
|
143
|
+
config model to `gpt-5.5` when Opus, Sonnet, or Fable is selected. The backend can
|
|
146
144
|
route any selected model through GPT-5.5 or another upstream internally, but the
|
|
147
145
|
client request must preserve the user-facing selected slug for display,
|
|
148
146
|
snapshotting, and billing records.
|
|
@@ -153,15 +151,7 @@ snapshotting, and billing records.
|
|
|
153
151
|
|
|
154
152
|
Claude-family codexclaude models use the CodexAPI.pro Claude-compatible Responses endpoint for CodexAPI.pro and ChatPlus accounts. MyAPI.world accounts keep their own configured `api.myapi.world` Responses endpoint.
|
|
155
153
|
|
|
156
|
-
`claude-fable-5` is a premium customer-visible model. The backend bills it at the configured
|
|
157
|
-
|
|
158
|
-
`deepseek-v4-pro` uses the configured API origin. The backend currently routes
|
|
159
|
-
this through the CodexAPI.pro-compatible path according to the active server
|
|
160
|
-
policy.
|
|
161
|
-
|
|
162
|
-
`gemini-3.5-flash` uses the configured API origin. The backend must keep
|
|
163
|
-
`gemini-3.5-flash` visible to the user and usage records while routing the
|
|
164
|
-
request internally through `claude-sonnet-4-6` at the configured server effort.
|
|
154
|
+
`claude-fable-5` is a premium customer-visible model. The backend bills it at the configured 2x multiplier and routes it through the Admin-selected Fable 5 route while preserving `claude-fable-5` in client-visible status and usage records.
|
|
165
155
|
|
|
166
156
|
The launcher must send these headers for every model:
|
|
167
157
|
|
|
@@ -204,7 +194,7 @@ If that endpoint fails, fall back to:
|
|
|
204
194
|
/api/v1/me
|
|
205
195
|
```
|
|
206
196
|
|
|
207
|
-
|
|
197
|
+
The launcher does not expose a separate usage command. Wallet lookup failures must not block a local coding session.
|
|
208
198
|
|
|
209
199
|
## Upgrade Checklist
|
|
210
200
|
|
|
@@ -212,8 +202,8 @@ When upgrading official `@openai/codex`:
|
|
|
212
202
|
|
|
213
203
|
1. Update `CODEX_VERSION` in `bin/codexclaude.js`.
|
|
214
204
|
2. Update `package.json` and `package-lock.json` to the same official Codex version.
|
|
215
|
-
3. Keep the launcher package version higher than the last published version.
|
|
216
|
-
4. Preserve the
|
|
205
|
+
3. Keep the launcher package version higher than the last published version and keep customer-facing startup text on the Magnetapi.org Coding Agent version.
|
|
206
|
+
4. Preserve the four-model `MODELS` map and aliases.
|
|
217
207
|
5. Preserve `DISPLAY_REASONING_EFFORT = "xhigh"` and keep `SERVER_REASONING_EFFORT` aligned with the server default.
|
|
218
208
|
6. Preserve `writeModelCatalog()` and the `model_catalog_json` line in generated config.
|
|
219
209
|
7. Preserve Full Access defaults: `approval_policy = "never"` and `sandbox_mode = "danger-full-access"`.
|
|
@@ -251,8 +241,8 @@ The JSON output must contain exactly:
|
|
|
251
241
|
|
|
252
242
|
- `gpt-5.5`
|
|
253
243
|
- `claude-opus-4-8`
|
|
254
|
-
- `
|
|
255
|
-
- `
|
|
244
|
+
- `claude-sonnet-5`
|
|
245
|
+
- `claude-fable-5`
|
|
256
246
|
|
|
257
247
|
The Opus entry must have `default_reasoning_level = "xhigh"` and must not use
|
|
258
248
|
fallback metadata.
|
|
@@ -271,19 +261,33 @@ python3 -m py_compile app/main.py app/openai_compat.py app/config.py app/postgre
|
|
|
271
261
|
/root/codexapi/.venv/bin/pytest -q tests/test_openai_compat.py tests/test_main_helpers.py
|
|
272
262
|
```
|
|
273
263
|
|
|
264
|
+
## Version 2.0.15 Changes
|
|
265
|
+
|
|
266
|
+
- Renamed the launcher-controlled startup/status surface to Magnetapi.org Coding Agent and now prints the app version instead of the upstream runtime version.
|
|
267
|
+
- Removed Gemini Flash and Deepseek from the launcher model picker and generated native Codex model catalog.
|
|
268
|
+
- Kept ChatGPT-5.5, Opus 4.8, Sonnet 5, and Fable 5 as the only visible codexclaude model choices.
|
|
269
|
+
- Preserved Full Access defaults, xhigh visible reasoning, wallet auth, local model catalog metadata, and CodexAPI.pro identifying headers.
|
|
270
|
+
|
|
271
|
+
## Version 2.0.14 Changes
|
|
272
|
+
|
|
273
|
+
- Updated the official OpenAI Codex runtime dependency to `@openai/codex@0.142.5`, the latest version currently published on npm.
|
|
274
|
+
- Kept `claude-sonnet-5` and `claude-fable-5` as the live API slugs for Sonnet 5 and Fable 5 after verifying those names from the production model APIs.
|
|
275
|
+
- Removed the standalone `codexclaude status` and `codexclaude usage` launcher commands while preserving the compact wallet status line printed before a coding session starts.
|
|
276
|
+
- Preserved Full Access defaults, xhigh visible reasoning, server-managed high runtime effort, bearer username auth, local model catalog metadata, and CodexAPI.pro identifying headers.
|
|
277
|
+
|
|
274
278
|
## Version 2.0.13 Changes
|
|
275
279
|
|
|
276
280
|
- Updated the official OpenAI Codex runtime dependency to `@openai/codex@0.142.2`.
|
|
277
|
-
- Added Sonnet
|
|
281
|
+
- Added Sonnet 5 and Fable 5 as visible launcher and native Codex `/model` choices.
|
|
278
282
|
- Added `codexclaude usage`, which reads wallet and recent token usage from the signed-in account origin, including CodexAPI.pro, ChatPlus, or MyAPI.world compatible endpoints.
|
|
279
|
-
- Kept Fable 5 customer-visible while the backend applies its custom routed premium path and
|
|
283
|
+
- Kept Fable 5 customer-visible while the backend applies its custom routed premium path and 2x billing multiplier.
|
|
280
284
|
- Preserved Full Access defaults, xhigh visible reasoning, server-managed high runtime effort, wallet auth, and local model catalog metadata.
|
|
281
285
|
|
|
282
286
|
## Version 2.0.12 Changes
|
|
283
287
|
|
|
284
288
|
- Updated the official OpenAI Codex runtime dependency to `@openai/codex@0.141.0`.
|
|
285
289
|
- Added Google Gemini Flash 3.5 as a fourth visible launcher and native Codex `/model` choice.
|
|
286
|
-
- Kept Gemini visible in client config, response metadata, and usage records while the backend routes it through Sonnet
|
|
290
|
+
- Kept Gemini visible in client config, response metadata, and usage records while the backend routes it through Sonnet 5 low effort.
|
|
287
291
|
- Preserved the CodexAPI.pro launcher layer, Full Access defaults, xhigh visible reasoning, server-managed low runtime effort, wallet auth, and Opus 4.8 Chicago routing.
|
|
288
292
|
|
|
289
293
|
## Version 2.0.11 Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexapi/codexclaude",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.15",
|
|
4
|
+
"description": "Magnetapi.org Coding Agent launcher for ChatGPT-5.5, Opus 4.8, Sonnet 5, and Fable 5.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=20"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@openai/codex": "^0.142.
|
|
20
|
+
"@openai/codex": "^0.142.5"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
@@ -26,10 +26,6 @@
|
|
|
26
26
|
"codex",
|
|
27
27
|
"claude",
|
|
28
28
|
"opus",
|
|
29
|
-
"deepseek",
|
|
30
|
-
"gemini",
|
|
31
|
-
"flash",
|
|
32
|
-
"budget",
|
|
33
29
|
"codexapi",
|
|
34
30
|
"coding-cli"
|
|
35
31
|
],
|