feat: reasoning effort as optional (#3527)

Allow the reasoning effort to be optional
This commit is contained in:
jif-oai
2025-09-12 12:06:33 -07:00
committed by GitHub
parent abdcb40f4c
commit c6fd056aa6
17 changed files with 95 additions and 61 deletions

View File

@@ -1191,9 +1191,13 @@ impl ChatWidget {
tracing::info!(
"New model: {}, New effort: {}, Current model: {}, Current effort: {}",
model_slug.clone(),
effort,
effort
.map(|effort| effort.to_string())
.unwrap_or_else(|| "none".to_string()),
current_model,
current_effort
.map(|effort| effort.to_string())
.unwrap_or_else(|| "none".to_string())
);
})];
items.push(SelectionItem {
@@ -1264,7 +1268,7 @@ impl ChatWidget {
}
/// Set the reasoning effort in the widget's config copy.
pub(crate) fn set_reasoning_effort(&mut self, effort: ReasoningEffortConfig) {
pub(crate) fn set_reasoning_effort(&mut self, effort: Option<ReasoningEffortConfig>) {
self.config.model_reasoning_effort = effort;
}