unify flag

This commit is contained in:
Ahmed Ibrahim
2025-08-04 16:56:52 -07:00
parent bd171e5206
commit 1a33de34b0
3 changed files with 2 additions and 27 deletions

View File

@@ -57,10 +57,6 @@ pub struct Config {
/// users are only interested in the final agent responses.
pub hide_agent_reasoning: bool,
/// When `true`, the raw chain-of-thought text from reasoning events will be
/// displayed in the UI in addition to the reasoning summaries.
pub show_reasoning_content: bool,
/// Disable server-side response storage (sends the full conversation
/// context with every request). Currently necessary for OpenAI customers
/// who have opted into Zero Data Retention (ZDR).
@@ -329,10 +325,6 @@ pub struct ConfigToml {
/// UI/output. Defaults to `false`.
pub hide_agent_reasoning: Option<bool>,
/// When set to `true`, raw chain-of-thought text from reasoning events will
/// be shown in the UI.
pub show_reasoning_content: Option<bool>,
pub model_reasoning_effort: Option<ReasoningEffort>,
pub model_reasoning_summary: Option<ReasoningSummary>,
@@ -499,15 +491,6 @@ impl Config {
// Resolve hide/show reasoning flags with consistent precedence:
// if hide is true, force show_reasoning_content to false.
let hide_agent_reasoning_val = cfg.hide_agent_reasoning.unwrap_or(false);
let show_reasoning_content_val = if hide_agent_reasoning_val {
false
} else {
cfg.show_reasoning_content.unwrap_or(false)
};
if cfg.hide_agent_reasoning == Some(true) && cfg.show_reasoning_content == Some(true) {
tracing::warn!("Ignoring show_reasoning_content because hide_agent_reasoning is true");
}
let config = Self {
model,
@@ -539,7 +522,6 @@ impl Config {
codex_linux_sandbox_exe,
hide_agent_reasoning: hide_agent_reasoning_val,
show_reasoning_content: show_reasoning_content_val,
model_reasoning_effort: config_profile
.model_reasoning_effort
.or(cfg.model_reasoning_effort)
@@ -913,7 +895,6 @@ disable_response_storage = true
tui: Tui::default(),
codex_linux_sandbox_exe: None,
hide_agent_reasoning: false,
show_reasoning_content: false,
model_reasoning_effort: ReasoningEffort::High,
model_reasoning_summary: ReasoningSummary::Detailed,
model_supports_reasoning_summaries: false,
@@ -964,7 +945,6 @@ disable_response_storage = true
tui: Tui::default(),
codex_linux_sandbox_exe: None,
hide_agent_reasoning: false,
show_reasoning_content: false,
model_reasoning_effort: ReasoningEffort::default(),
model_reasoning_summary: ReasoningSummary::default(),
model_supports_reasoning_summaries: false,
@@ -1030,7 +1010,6 @@ disable_response_storage = true
tui: Tui::default(),
codex_linux_sandbox_exe: None,
hide_agent_reasoning: false,
show_reasoning_content: false,
model_reasoning_effort: ReasoningEffort::default(),
model_reasoning_summary: ReasoningSummary::default(),
model_supports_reasoning_summaries: false,