feat: always show the LLM selector; move agent-profile switching to the tools menu - #1932
feat: always show the LLM selector; move agent-profile switching to the tools menu#1932hieptl wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@hieptl I'd expect In testing against a Cloud backend, it looks like it's the LLM Model path (openhands/claude-sonnet-5) rather than 'Sonnet', which is the name of my LLM profile. |
|
Hello @jpelletier1, I've pushed a commit that addresses the issue you reported. You can refer to the video below for additional context. Screen.Recording.2026-07-27.at.20.18.56.movThank you very much! 🙏 |
✅ Mock-LLM E2E Tests60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
✅ Mock-LLM Docker E2E Test Results60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
|
This repository has moved to https://github.com/OpenHands/OpenHands. We’d appreciate it if you re-opened this pull request there. Thank you! |


HUMAN:
End-to-end evidence (beyond unit tests): I ran the full stack locally with an isolated state directory —
OH_CANVAS_SAFE_STATE_DIR=<scratch> npm run dev(Vite :3001, uvx agent-server 1.37.0 :18000, ingress :8000) — and drove the UI in Chrome against a fresh onboarding that configured a Claude Code ACPdefaultprofile:Home pill rendered the constrained Claude model picker (“Available models: Default / Claude Opus 4.8 (1M) / Claude Sonnet 4.6 / Claude Haiku 4.5”) instead of the old agent-profile picker.
Picking Claude Sonnet 4.6 pre-start persisted into the profile — verified server-side:
GET /api/agent-profiles/default→acp_model: "sonnet", revision bump — and the launched conversation ran it (agent replied “hello”; sidebar chip showed Claude Sonnet 4.6).“+” menu showed Switch agent profile with both profiles; switching to a
codex-testACP profile flipped the pill to the Codex registry list with GPT‑5.5 as the valid default (whileagent_settingsstill described claude-code — proving the profile-detail sourcing), and switching back restored the profile's remembered Sonnet.In the started conversation the “+” menu no longer offered profile switching; the live model switch to Haiku worked and left the profile untouched (
acp_modelstillsonnetserver-side).Sidebar “+” → blank conversation: pill was the LLM selector, the menu offered Switch agent profile with the “Selecting starts a new conversation” hint, and picking
codex-testcreated and navigated to the replacement conversation (this exposed and led to themutateAsyncnavigation fix included here).A human has tested these changes.
AGENT:
Why
Since Agent Profiles (#1571/#1629), the chat pill becomes an agent-profile picker for every not-yet-started conversation, so users cannot choose an LLM before launching — they must start with the current default and change it afterwards. Making the pre-start LLM picker visible also exposed two latent defects: home ACP state was read from stale
agent_settings(activation is pointer-only), and home ACP model picks were persisted toagent_settings_diff.acp_model, which profile-launched conversations never read (agent_profile_idandagent_settingsare mutually exclusive launch sources; seeding is one-time).Summary
"agent-profile"picker kind is removed and the dead pill component deleted.mutateAsync— React Query drops mutate-scoped callbacks when the menu unmounts).useActiveAcpProfileDetail), and pre-start model picks are merge-saved onto the active ACP profile so launches honor them;agent_settings_diffremains only as the no-profiles legacy fallback; cloud members without org-profile permission don't get selectable rows they could only 403 on.Issue Number
Resolves OpenHands/OpenHands#15435
How to Test
npm install, thenOH_CANVAS_SAFE_STATE_DIR=$(mktemp -d) npm run devand open the app on a fresh origin (e.g.http://127.0.0.1:3001).npm run lint && npx vitest runfor the automated suites.Video/Screenshots
oss-5735.mov
Type
Notes
useActiveAcpProfileDetail, detail-over-settings sourcing, cloud-member gating, profile persistence + legacy fallback) andtsc --noEmitis clean. The full suite was green (3,960 tests) before the finalmutateAsyncnavigation fix; the post-fix full-suite/lint re-run was deferred to the human tester by request. One known-flaky unrelated test (api-key-entry-screenrouting) failed once and passed on re-run./switch_acp_modelis a 200 persist-only deferral pre-first-run, so blank ACP conversations use the normal live-switch path; stale “409 before first message” comments were corrected.llm_profile_reflayering question (home picks activate the global profile, cosmetic for named profiles), and the cloud-member 403 toast when switching org profiles from the new menu.🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.37.0-pythonopenhands-automation==1.3.1cd6324a5679161512994a6a2d225a5af7262fa81Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-cd6324aRun
All tags pushed for this build
About Multi-Architecture Support
sha-cd6324a) is a multi-arch manifest supporting both amd64 and arm64sha-cd6324a-amd64) are also available if needed