The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
fix(server): keep compact Codex launch options in text generation (#38848)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Simone committed
Nov 19, 2026 at 06:48 UTC
f2716cd7109207cd74c5b2444cc2ae75254f5ade
2 files changed
+7
-5
apps/server/src/provider/codexLaunchArgs.test.ts
+4
-3
@@ -54,9 +54,8 @@ describe("codexExecLaunchArgs", () => {
54
});
55
});
56
57
-describe("codex exec and mcp list launch args", () => {
58
- const launchArgs =
59
- "--strict-config --oss --local-provider ollama --profile local -p=work --listen off --enable foo";
57
+describe.each(["", "="])("codex exec and mcp list launch args with -p%swork", (separator) => {
58
+ const launchArgs = `--strict-config --oss --local-provider ollama --profile local -p${separator}work -c${separator}model_provider=ollama --listen off --enable foo`;
59
60
it("keeps the local model provider flags for codex exec", () => {
61
NodeAssert.deepStrictEqual(codexExecLaunchArgs(launchArgs), [
@@ -67,6 +66,7 @@ describe("codex exec and mcp list launch args", () => {
66
"--profile",
67
"local",
68
"-p=work",
69
+ "-c=model_provider=ollama",
70
"--enable",
71
"foo",
72
]);
@@ -77,6 +77,7 @@ describe("codex exec and mcp list launch args", () => {
77
"--profile",
78
"local",
79
"-p=work",
80
+ "-c=model_provider=ollama",
81
"--enable",
82
"foo",
83
]);
apps/server/src/provider/codexLaunchArgs.ts
+3
-2
@@ -43,8 +43,9 @@ const filterLaunchArgs = (launchArgs: string | undefined, allowed: LaunchArgFilt
43
const kept: Array<string> = [];
44
45
for (let index = 0; index < args.length; index++) {
46
- const arg = args[index];
47
- if (arg === undefined) continue;
46
+ const rawArg = args[index];
47
+ if (rawArg === undefined) continue;
48
+ const arg = rawArg.replace(/^(-[cp])(?=[^=])/u, "$1=");
49
50
if (allowed.switches.has(arg)) {
51
kept.push(arg);