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:
2026-07-17 21:44:43 -04:00
parent 28050e8e75
commit 5919526e91
66 changed files with 43 additions and 31221 deletions
+1 -1
View File
@@ -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,
};