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:
ZacharyZhang-NY committed 2026-07-17 21:44:43 -04:00
1 parent 28050e8e75
commit 5919526e91
66 files changed
+43 -31221

No files matched your search

@@ -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,
};