Codex: "high" variant, and settings for reasoning effort & reasoning summaries (#648)
This commit is contained in:
@@ -44,6 +44,12 @@
|
||||
"CODEX": {
|
||||
"sandbox": "danger-full-access"
|
||||
}
|
||||
},
|
||||
"HIGH": {
|
||||
"CODEX": {
|
||||
"sandbox": "danger-full-access",
|
||||
"model_reasoning_effort": "high"
|
||||
}
|
||||
}
|
||||
},
|
||||
"OPENCODE": {
|
||||
@@ -66,4 +72,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,27 @@ pub enum ApprovalPolicy {
|
||||
Never,
|
||||
}
|
||||
|
||||
/// Reasoning effort for the underlying model
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, TS, JsonSchema, AsRefStr)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum ReasoningEffort {
|
||||
Low,
|
||||
Medium,
|
||||
High,
|
||||
}
|
||||
|
||||
/// Model reasoning summary style
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, TS, JsonSchema, AsRefStr)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum ReasoningSummary {
|
||||
Auto,
|
||||
Concise,
|
||||
Detailed,
|
||||
None,
|
||||
}
|
||||
|
||||
/// Handles session management for Codex executor
|
||||
pub struct SessionHandler;
|
||||
|
||||
@@ -214,6 +235,10 @@ pub struct Codex {
|
||||
pub oss: Option<bool>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub model: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub model_reasoning_effort: Option<ReasoningEffort>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub model_reasoning_summary: Option<ReasoningSummary>,
|
||||
#[serde(flatten)]
|
||||
pub cmd: CmdOverrides,
|
||||
}
|
||||
@@ -242,6 +267,20 @@ impl Codex {
|
||||
builder = builder.extend_params(["--model", model]);
|
||||
}
|
||||
|
||||
if let Some(effort) = &self.model_reasoning_effort {
|
||||
builder = builder.extend_params([
|
||||
"--config",
|
||||
&format!("model_reasoning_effort={}", effort.as_ref()),
|
||||
]);
|
||||
}
|
||||
|
||||
if let Some(summary) = &self.model_reasoning_summary {
|
||||
builder = builder.extend_params([
|
||||
"--config",
|
||||
&format!("model_reasoning_summary={}", summary.as_ref()),
|
||||
]);
|
||||
}
|
||||
|
||||
apply_overrides(builder, &self.cmd)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ fn generate_types_content() -> String {
|
||||
executors::executors::codex::Codex::decl(),
|
||||
executors::executors::codex::SandboxMode::decl(),
|
||||
executors::executors::codex::ApprovalPolicy::decl(),
|
||||
executors::executors::codex::ReasoningEffort::decl(),
|
||||
executors::executors::codex::ReasoningSummary::decl(),
|
||||
executors::executors::cursor::Cursor::decl(),
|
||||
executors::executors::opencode::Opencode::decl(),
|
||||
executors::executors::qwen::QwenCode::decl(),
|
||||
|
||||
@@ -50,6 +50,33 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model_reasoning_effort": {
|
||||
"description": "Reasoning effort for the underlying model",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
null
|
||||
]
|
||||
},
|
||||
"model_reasoning_summary": {
|
||||
"description": "Model reasoning summary style",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"auto",
|
||||
"concise",
|
||||
"detailed",
|
||||
"none",
|
||||
null
|
||||
]
|
||||
},
|
||||
"base_command_override": {
|
||||
"title": "Base Command Override",
|
||||
"description": "Override the base command with a custom command",
|
||||
|
||||
@@ -144,12 +144,16 @@ export type GeminiModel = "default" | "flash";
|
||||
|
||||
export type Amp = { append_prompt: AppendPrompt, dangerously_allow_all?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, approval?: ApprovalPolicy | null, oss?: boolean | null, model?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, approval?: ApprovalPolicy | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
|
||||
|
||||
export type ApprovalPolicy = "untrusted" | "on-failure" | "on-request" | "never";
|
||||
|
||||
export type ReasoningEffort = "low" | "medium" | "high";
|
||||
|
||||
export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
||||
|
||||
export type Cursor = { append_prompt: AppendPrompt, force?: boolean | null, model?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
export type Opencode = { append_prompt: AppendPrompt, model?: string | null, agent?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
|
||||
|
||||
Reference in New Issue
Block a user