Align Codex CLI config with local setup
This commit is contained in:
1 parent
003523b6b7
commit
04ec203b61
1 file changed
+5
-8
@@ -50,8 +50,7 @@ export class CodexCliReviewer {
|
|||||||
const args = [
|
const args = [
|
||||||
"exec",
|
"exec",
|
||||||
"--skip-git-repo-check",
|
"--skip-git-repo-check",
|
||||||
"--sandbox",
|
"--dangerously-bypass-approvals-and-sandbox",
|
||||||
"workspace-write",
|
|
||||||
"--output-schema",
|
"--output-schema",
|
||||||
schemaPath,
|
schemaPath,
|
||||||
"--output-last-message",
|
"--output-last-message",
|
||||||
@@ -212,21 +211,19 @@ function streamProcessOutput(stream: "stdout" | "stderr", text: string): void {
|
|||||||
function buildCodexConfig(): string {
|
function buildCodexConfig(): string {
|
||||||
const lines = [
|
const lines = [
|
||||||
`model = ${toTomlString(config.codexModel)}`,
|
`model = ${toTomlString(config.codexModel)}`,
|
||||||
'model_provider = "ghbot"',
|
'model_provider = "bot"',
|
||||||
'approval_policy = "never"',
|
'approvals_reviewer = "user"'
|
||||||
'sandbox_mode = "workspace-write"'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (config.codexReasoningEffort) {
|
if (config.codexReasoningEffort) {
|
||||||
lines.push(`model_reasoning_effort = ${toTomlString(config.codexReasoningEffort)}`);
|
lines.push(`model_reasoning_effort = ${toTomlString(config.codexReasoningEffort)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.push("", "[model_providers.ghbot]");
|
lines.push("", "[model_providers.bot]");
|
||||||
lines.push('name = "ghbot"');
|
lines.push('name = "bot"');
|
||||||
lines.push(`base_url = ${toTomlString(normalizeBaseUrl(config.codexBaseUrl))}`);
|
lines.push(`base_url = ${toTomlString(normalizeBaseUrl(config.codexBaseUrl))}`);
|
||||||
lines.push('env_key = "CODEX_API_KEY"');
|
lines.push('env_key = "CODEX_API_KEY"');
|
||||||
lines.push('wire_api = "responses"');
|
lines.push('wire_api = "responses"');
|
||||||
lines.push("requires_openai_auth = false");
|
|
||||||
|
|
||||||
return `${lines.join("\n")}\n`;
|
return `${lines.join("\n")}\n`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user