Show reasoning effort in the model's own vocabulary (K3: max, not xhigh)
The welcome and prompt model labels (and /effort's 'current' hint) rendered the canonical internal level name, so K3 at its default effort showed 'K3 (xhigh)' even though the server's vocabulary for that level is 'max' (live /models think_efforts: low/high/max). New ModelState::reasoning_effort_display() resolves the current effort through the model's own effort menu (option id whose value matches), falling back to the canonical name only when the model has no entry for the level. All three display sites route through it; test pins the K3 mapping (Xhigh → 'max', Low → 'low', no-menu-entry → canonical).
This commit is contained in:
@@ -2038,7 +2038,7 @@ impl AgentView {
|
||||
}
|
||||
let mode_flags: &[PromptFlag] = &mode_flags_vec;
|
||||
let multiline = self.multiline_mode;
|
||||
let model_label = match self.session.models.reasoning_effort {
|
||||
let model_label = match self.session.models.reasoning_effort_display() {
|
||||
Some(eff) => format!("{model_id} ({eff})"),
|
||||
None => model_id,
|
||||
};
|
||||
|
||||
@@ -3060,7 +3060,7 @@ impl AppView {
|
||||
self.tip.as_deref()
|
||||
};
|
||||
let model_name_base = self.models.current_model_name().unwrap_or_default();
|
||||
let model_name = match self.models.reasoning_effort {
|
||||
let model_name = match self.models.reasoning_effort_display() {
|
||||
Some(eff) => format!("{model_name_base} ({eff})"),
|
||||
None => model_name_base,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user