Skip to content

Commit 8ec5892

Browse files
committed
fix(cli): label reasoning vs toolcall slot explicitly in /model set output (#1182)
Reviewer (#1192) ran `/model set anthropic claude-haiku-4-5-20251001` and asked "how is the reasoning model changing then?" because the success line read switched LLM provider: anthropic (claude-haiku-4-5-20251001) with no indication of which slot the parenthetical model went into. The /model show table below it then showed reasoning and toolcall both equal to that model (toolcall was already haiku, reasoning had just changed), which made it look like one command had silently overwritten both. It hadn't — the parser treats the second positional as the reasoning model and the toolcall row was unchanged — but the message made the right behavior look wrong. Always label both slots on a switch: switched LLM provider: anthropic reasoning model: claude-haiku-4-5-20251001 (ANTHROPIC_REASONING_MODEL) [toolcall model: ... (ANTHROPIC_TOOLCALL_MODEL)] # only when --toolcall-model was passed
1 parent e66ad5b commit 8ec5892

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

app/cli/interactive_shell/commands.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,15 @@ def switch_llm_provider(
231231
env_path = sync_env_values(values)
232232
os.environ.update(values)
233233

234+
# Be explicit about which slot each model lands in. The previous output
235+
# ("switched LLM provider: anthropic (X)") read ambiguously: a reviewer
236+
# ran `/model set anthropic claude-haiku-...` and asked "how is the
237+
# reasoning model changing then?" because `(X)` did not say *which*
238+
# slot X went into. Always label both slots on a switch.
239+
console.print(f"[green]switched LLM provider:[/green] {provider.value}")
234240
console.print(
235-
f"[green]switched LLM provider:[/green] {provider.value} "
236-
f"[dim]({selected_model or 'provider default'})[/dim]"
241+
f"[green]reasoning model:[/green] {selected_model or 'provider default'} "
242+
f"[dim]({provider.model_env})[/dim]"
237243
)
238244
if selected_toolcall:
239245
console.print(

tests/cli/interactive_shell/test_commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ def test_set_switches_provider(
406406
output = buf.getvalue()
407407
assert "switched LLM provider" in output
408408
assert "anthropic" in output
409+
# Reviewer (#1192) couldn't tell from "anthropic (X)" which slot the
410+
# model went into; the success message must now explicitly label the
411+
# reasoning slot and name the env var it lands in.
412+
assert "reasoning model:" in output
413+
assert "ANTHROPIC_REASONING_MODEL" in output
409414
assert "LLM_PROVIDER=anthropic" in (tmp_path / ".env").read_text(encoding="utf-8")
410415

411416
def test_set_refuses_when_credential_missing(

0 commit comments

Comments
 (0)