This pull request resolves #2296; I've confirmed if it works by: 1. Add settings to ~/.codex/config.toml: ```toml model_reasoning_effort = "minimal" ``` 2. Run the CLI: ``` cd codex-rs cargo build && RUST_LOG=trace cargo run --bin codex /status tail -f ~/.codex/log/codex-tui.log ``` Co-authored-by: pakrym-oai <pakrym@openai.com>
This commit is contained in:
@@ -94,6 +94,7 @@ pub(crate) struct Reasoning {
|
|||||||
#[derive(Debug, Serialize, Default, Clone, Copy)]
|
#[derive(Debug, Serialize, Default, Clone, Copy)]
|
||||||
#[serde(rename_all = "lowercase")]
|
#[serde(rename_all = "lowercase")]
|
||||||
pub(crate) enum OpenAiReasoningEffort {
|
pub(crate) enum OpenAiReasoningEffort {
|
||||||
|
Minimal,
|
||||||
Low,
|
Low,
|
||||||
#[default]
|
#[default]
|
||||||
Medium,
|
Medium,
|
||||||
@@ -103,6 +104,7 @@ pub(crate) enum OpenAiReasoningEffort {
|
|||||||
impl From<ReasoningEffortConfig> for Option<OpenAiReasoningEffort> {
|
impl From<ReasoningEffortConfig> for Option<OpenAiReasoningEffort> {
|
||||||
fn from(effort: ReasoningEffortConfig) -> Self {
|
fn from(effort: ReasoningEffortConfig) -> Self {
|
||||||
match effort {
|
match effort {
|
||||||
|
ReasoningEffortConfig::Minimal => Some(OpenAiReasoningEffort::Minimal),
|
||||||
ReasoningEffortConfig::Low => Some(OpenAiReasoningEffort::Low),
|
ReasoningEffortConfig::Low => Some(OpenAiReasoningEffort::Low),
|
||||||
ReasoningEffortConfig::Medium => Some(OpenAiReasoningEffort::Medium),
|
ReasoningEffortConfig::Medium => Some(OpenAiReasoningEffort::Medium),
|
||||||
ReasoningEffortConfig::High => Some(OpenAiReasoningEffort::High),
|
ReasoningEffortConfig::High => Some(OpenAiReasoningEffort::High),
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ impl From<ShellEnvironmentPolicyToml> for ShellEnvironmentPolicy {
|
|||||||
#[serde(rename_all = "lowercase")]
|
#[serde(rename_all = "lowercase")]
|
||||||
#[strum(serialize_all = "lowercase")]
|
#[strum(serialize_all = "lowercase")]
|
||||||
pub enum ReasoningEffort {
|
pub enum ReasoningEffort {
|
||||||
|
Minimal,
|
||||||
Low,
|
Low,
|
||||||
#[default]
|
#[default]
|
||||||
Medium,
|
Medium,
|
||||||
|
|||||||
Reference in New Issue
Block a user