Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ export const ChatParametersSchema = z.object({
.string()
.optional()
.describe("The working directory for the task execution."),
reasoningEffort: z
.enum(["low", "medium", "high", "none"])
.optional()
.describe(
'Model reasoning effort ("low" | "medium" | "high" | "none"). Passed via --config model_reasoning_effort.',
),
});

// Tool execution functions
Expand Down Expand Up @@ -142,6 +148,12 @@ export async function chat(args: unknown) {
break;
}

// reasoning effort -> --config model_reasoning_effort=<value>
if (parsedArgs.reasoningEffort) {
// `--config` has short form `-c`; either works
cliArgs.push("-c", `model_reasoning_effort=${parsedArgs.reasoningEffort}`);
}

// Always use exec mode for non-interactive execution
cliArgs.push("exec");

Expand Down Expand Up @@ -206,6 +218,10 @@ async function main() {
.string()
.optional()
.describe("The working directory for the task execution."),
reasoningEffort: z
.enum(["low", "medium", "high", "none"])
.optional()
.describe("Passes through as --config model_reasoning_effort."),
},
},
async (args) => {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcp-codex-cli",
"version": "1.0.0",
"version": "0.2.0",
"description": "MCP server wrapper for OpenAI's Codex CLI",
"author": "suwa-sh",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions tests/test-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ async function testChat() {
"typescriptで、Hello World と表示するシンプルな関数を作成してください",
approvalLevel: "auto-edit",
model: "gpt-5",
reasoningEffort: "high",
},
true,
);
Expand Down