Skip to content

acp: add /model command for per-session model switching#575

Open
adityavkk wants to merge 1 commit intoOpenHands:mainfrom
adityavkk:feat/acp-session-model-switch
Open

acp: add /model command for per-session model switching#575
adityavkk wants to merge 1 commit intoOpenHands:mainfrom
adityavkk:feat/acp-session-model-switch

Conversation

@adityavkk
Copy link

Summary

  • Add a new ACP slash command /model so users can inspect the current session model and switch to a different model without restarting the CLI process.
  • Wire model switching into the agent runtime by updating set_session_model (previously a no-op) and the slash-command prompt handler to apply model changes to the active session agent.
  • Add focused ACP test coverage for slash command help/text generation, command routing, and runtime model updates.

Why

Switching models currently requires restarting the CLI session, which slows down iterative workflows (e.g., moving from a fast model to a stronger one mid-session). This change enables explicit in-session switching while keeping the command flow consistent with existing slash-command patterns like /confirm.

Validation

  • make lint
  • make test
  • make test-binary
  • uv run pytest tests/acp/test_slash_commands.py tests/acp/test_mode_switching.py tests/acp/test_agent.py

@VascoSch92
Copy link
Contributor

Hey @adityavkk

we are implementing that at the sdk level :-) see here: OpenHands/software-agent-sdk#2192
I will love your opinion :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants