🙌 OpenHands: AI-Driven Development
F12 — Model router (meta-LLM profiles)
A model router (the UI also calls it a "meta-profile") names a classifier LLM
profile, a prompt template and a model table. On a local backend each OpenHands
agent profile picks its router in Settings → Agent (F13.profile-router); a
conversation launched from a profile with a router gets a route_task_to_model
tool: the classifier picks one saved LLM profile from the table and the agent
switches to it (the chat shows Switched to profile <name>). With Run on first
message on, the agent is told to route the first user message before doing
anything else. Users create routers from the Router Pro / Router Flash templates
or from scratch, can have the missing router LLM profiles created from a
provider connection, and edit and delete routers under Settings → Model Router.
Only an organization-bound Cloud backend still activates one router on this
page.
Source: src/routes/meta-llm-settings.tsx, src/components/features/settings/meta-llm-profiles/, src/api/meta-profiles-service/meta-profiles-service.api.ts, src/api/agent-server-adapter.ts (buildRouterAtStartSystemSuffix), src/constants/settings-nav.tsx, src/hooks/mutation/use-delete-meta-profile.ts.
Sub-features
F12.page: Settings → Model Router opens/settings/meta-llmwith the subtitleMeta-profiles that route each task to the right LLM profile.; the command menu offers a Model Router command that opens it, like the other settings pages.F12.empty-states: with no LLM profiles the page saysCreate LLM profiles first — meta-profiles route between your saved LLM profiles.; with no routers it saysNo meta-profiles yet. Add one to route tasks across your LLM profiles.and Run on first message is off and disabled.F12.load-error: when only the meta-profile request fails, a red generic error shows under the header.F12.unsupported: an agent server without/api/meta-profiles(404) showsThis backend doesn't support model routing yet. Update the agent server to manage meta-profiles.F12.cloud: a Cloud backend without an organization showsMeta-profiles are only available for local backends.; an organization-bound Cloud backend shows the full page.F12.template-chooser: Add Model Router opensChoose Model Router template(Add OpenHands Router Pro, Add OpenHands Router Flash, Custom, Cancel); Cancel, Escape and a backdrop click close it; Pro and Flash prefill the name, classifierminimax-m3, their own long routing prompt and the same 11-model table.F12.template-custom: Custom opens a blank editor; the placeholders show an example prompt and a two-line example model table.F12.editor-validation: Save stays disabled until the name is valid, a classifier is set and the prompt contains{{ instance_text }}(spaces inside the braces optional).F12.duplicate-name: a new router cannot take an existing router's name (A meta-profile with this name already exists..., Save disabled).F12.add-connection: Add connection in the create editor opensAdd provider connection; saving it selects the new connection in the picker.F12.add-connection-cancel: Cancel inAdd provider connectioncloses it without creating a connection and keeps the editor's values and picker choice.F12.editor-cancel: while the create or edit editor is open it replaces the list, Add Model Router and the switch; Cancel returns to the list without saving anything.F12.router-profiles: with a connection picked under Create missing router LLM profiles using, Save creates an LLM profile<provider>/<name>linked to that connection for every model-table name (and the classifier) that does not exist yet; Don't create profiles creates none.F12.create-first: saving the first router lists it and turns Run on first message on; locally no router becomes active (active_meta_profilestaysnull).F12.create-more: saving another router lists it and leaves Run on first message as it was.F12.list: each row shows the name,<classifier> · Direct promptand a...menu (no Active badge locally; Cloud shows it on the active router); routers survive a stack restart.F12.row-menu: the row menu offers Edit and Delete (Cloud adds Set active, disabled on the active row), and closes on Escape.F12.activate: on an organization-bound Cloud backend, Set active toastsMeta-profile "<name>" activatedand moves the badge. Local backends have no Set active (blocked here: needs a Cloud organization).F12.edit: Edit opensEdit meta-profilewith the name locked and no connection picker; changes persist.F12.delete: Delete asksAre you sure you want to delete "<name>"? This cannot be undone.; Cancel keeps the row, Delete removes it and detaches it from every agent profile that used it (meta_profile_refnull, routing off).F12.delete-active: deleting the last router shows the empty state and the switch off and disabled (the stored preference keeps its value); profiles that used it launch without the tool or the first-message instruction.F12.run-first-message-toggle: the switch is enabled while any router exists, saves immediately (no Save button, no toast) and survives a reload; its help readsRoute the first message of every new conversation through its agent profile's Model Router before the agent proceeds. Each agent profile picks its router in Settings → Agent.F12.route-first-message: with the launched agent profile's router set and the switch on, a new conversation routes its first message (route_task_to_modelaction,Switched to profile <name>in the chat); with the switch off the tool is still attached but the instruction is absent.F12.light-theme: in a light colour theme the list heading and router names are readable.F12.phone: the list, template modal, editor and row menu fit a 390 px viewport without horizontal overflow.
How to get to it (user POV)
- Sidebar settings gear (
backend-selector-settings-link), then Model Router in the settings navigation (sidebar-settings-/settings/meta-llm, between LLM and Condenser). Used byF12.page. - Direct URL
/settings/meta-llm. Used by most recipes (browser goto). - Command menu (
Control+korMeta+k, orcommand-menu-triggerin the sidebar): search "Model Router" (or "router", "meta"), choose Model Router ("Meta-profiles that route each task to the right LLM profile."). Used byF12.page. - Per-router actions: the row
...button (meta-profile-menu-trigger-<name>), then Edit / Set active / Delete. - The effect of a router is seen in a conversation started from the home composer (
F12.route-first-message; see F05/F06 for the composer and activity rendering).
Driving it with control-openhands
Preconditions:
F12.empty-statesneeds a freshlaunch --newwithonboard --skipdone and beforellm preset deepseek(no LLM profiles, no routers).Everything after it needs
control-openhands llm preset deepseek --api-key-file <key file>(profilesdeepseek-flashanddeepseek-pro), no meta-profile namedQA_*(control-openhands api GET /api/meta-profiles), no provider connection (control-openhands api GET /api/llm/provider-connectionsis[]) and no LLM profile nameddeepseek-chat(control-openhands api GET /api/profiles).F12.add-connectionandF12.route-first-messageuse the DeepSeek key file; never print it.Blocked here:
F12.unsupported(needs an agent server older than software-agent-sdk #3744, for examplelaunch --new --sdk-ref <older release>),F12.cloudandF12.activate(need a Cloud account, with and without an organization) andF12.load-error(needs/api/meta-profilesto fail while the rest of the agent server answers;service stop agent-serverswaps the whole app for the Manage backends card instead).Desktop viewport unless a bullet says otherwise.
Open from navigation (
F12.page). From/runcontrol-openhands browser click 'testid=backend-selector-settings-link' --expect-url '/settings',control-openhands browser click 'testid=sidebar-settings-/settings/meta-llm' --expect-url '/settings/meta-llm(\?|$)',control-openhands browser text 'testid=settings-page-subtitle'andcontrol-openhands browser attr 'testid=sidebar-settings-/settings/meta-llm' aria-current. The subtitle isMeta-profiles that route each task to the right LLM profile.andaria-currentispage.Command menu (
F12.page). Runcontrol-openhands browser goto /(the previous bullet ends on/settings/meta-llm, where the URL wait would pass at once),control-openhands browser press Control+k,control-openhands browser type 'testid=command-menu >> role=combobox' 'Model Router'andcontrol-openhands browser snapshot 'testid=command-menu': the only option isModel Router Meta-profiles that route each task to the right LLM profile. Go[selected].control-openhands browser fill 'testid=command-menu >> role=combobox' router(and thenmeta) keeps that single option (control-openhands browser count 'testid=command-menu >> role=option'is1). Runcontrol-openhands browser press Enterandcontrol-openhands browser wait-url '/settings/meta-llm(\?|$)';browser text 'testid=settings-page-subtitle'is the subtitle above.Empty states (
F12.empty-states). On the fresh run runcontrol-openhands browser goto /settings/meta-llm,control-openhands browser text 'testid=meta-profile-no-llm-profiles',control-openhands browser text 'testid=meta-profile-empty'andcontrol-openhands browser eval "(()=>{const i=document.querySelector('[data-testid=meta-profile-run-at-conversation-start-switch]');return {checked:i.checked,disabled:i.disabled}})()". The texts are the two messages in Sub-features, the switch is{checked:false, disabled:true}andbrowser text 'testid=meta-profile-run-at-conversation-start'carries the per-profile help text (F12.run-first-message-toggle).control-openhands browser screenshot --feature F12.empty-states --name no-llm-profilesshows both messages above a greyed switch.Template chooser (
F12.template-chooser). Runcontrol-openhands browser click 'testid=add-meta-profile'andcontrol-openhands browser snapshot 'role=dialog': dialogChoose Model Router templatewith buttonsAdd OpenHands Router Pro,Add OpenHands Router Flash,Custom,Cancel.control-openhands browser click 'testid=meta-profile-template-cancel'thencontrol-openhands browser count 'testid=meta-profile-template-modal'is0; reopen andcontrol-openhands browser press Escapegives0too. Reopen,control-openhands browser click 'testid=meta-profile-template-router-pro', thencontrol-openhands browser value 'testid=meta-profile-name-input'(openhands-router-pro),control-openhands browser value 'testid=meta-profile-classifier-input'(minimax-m3),control-openhands browser eval "document.querySelector('[data-testid=meta-profile-model-table]').value.split('\n').length"(11),control-openhands browser eval "document.querySelector('[data-testid=meta-profile-prompt-template]').value.includes('{{ instance_text }}')"(true),control-openhands browser value 'testid=meta-profile-router-connection'(Don't create profileswhile no connection exists) andcontrol-openhands browser enabled 'testid=meta-profile-save'(true). Leave withcontrol-openhands browser click 'testid=meta-profile-cancel'. The Flash template (testid=meta-profile-template-router-flash) givesopenhands-router-flash, the same classifier and identical table, and a different prompt (about 5,900 characters against Pro's 5,000; compare withbrowser eval "document.querySelector('[data-testid=meta-profile-prompt-template]').value.length"). A backdrop click also closes the chooser: reopen it andcontrol-openhands browser mouse-click 20 980, thencountis0.Custom template (
F12.template-custom). Runcontrol-openhands browser click 'testid=add-meta-profile',control-openhands browser click 'testid=meta-profile-template-custom', thencontrol-openhands browser valueontestid=meta-profile-name-input,testid=meta-profile-classifier-input,testid=meta-profile-prompt-templateandtestid=meta-profile-model-table(all""),control-openhands browser enabled 'testid=meta-profile-save'(false) andcontrol-openhands browser eval "document.querySelector('[data-testid=meta-profile-model-table]').placeholder.split('\n')": two example rows,["- GPT-5.4: strong for coding and reasoning", "- MiniMax-M3: efficient fallback"], joined by a real line break (#18035), andcontrol-openhands browser screenshot --feature F12.template-custom --name custom-emptyshows them on two lines under the prompt placeholder, which breaks lines the same way.Validation (
F12.editor-validation). In that Custom editor runcontrol-openhands browser fill 'testid=meta-profile-name-input' 'QA router!',control-openhands browser fill 'testid=meta-profile-classifier-input' qa-classifier,control-openhands browser fill 'testid=meta-profile-prompt-template' 'Pick a model for: {{ instance_text }}'andcontrol-openhands browser enabled 'testid=meta-profile-save'(false: bad name).control-openhands browser fill 'testid=meta-profile-name-input' QA_routerturns ittrue;control-openhands browser fill 'testid=meta-profile-prompt-template' 'Pick a model for: {{ task }}'turns itfalse;'Pick a model for: {{instance_text}}'turns ittrueagain;control-openhands browser fill 'testid=meta-profile-classifier-input' ''turns itfalse. Keep the editor open.Add a connection (
F12.add-connection). Runcontrol-openhands browser click 'testid=meta-profile-add-provider-connection',control-openhands browser fill 'testid=provider-connection-name-input' QA_deepseek,control-openhands browser fill 'testid=provider-connection-provider-input' deepseek,control-openhands browser click 'role=option[name="deepseek"]',control-openhands browser fill 'testid=provider-connection-api-key-input' --value-file <key file>,control-openhands browser click 'testid=provider-connection-submit'andcontrol-openhands browser wait 'testid=provider-connection-modal' --state detached.control-openhands browser toastshasConnection "QA_deepseek" createdandcontrol-openhands browser value 'testid=meta-profile-router-connection'isQA_deepseek (deepseek).Create the first router (
F12.create-first,F12.router-profiles). Write the prompt and table to files:printf 'You route tasks. Reply only with JSON {"model": "<name>", "reason": "<short>"} using one name from this table:\n{{ model_table }}\n\nTask:\n{{ instance_text }}' > <prompt file>andprintf -- '- deepseek-flash: cheap, for simple tasks\n- deepseek-pro: stronger, for hard tasks\n- deepseek-chat: general chat' > <table file>. Runcontrol-openhands browser click 'testid=meta-profile-classifier-input',control-openhands browser click 'role=option[name="deepseek-flash"]',control-openhands browser fill 'testid=meta-profile-name-input' QA_router,control-openhands browser fill 'testid=meta-profile-prompt-template' --value-file <prompt file>,control-openhands browser fill 'testid=meta-profile-model-table' --value-file <table file>,control-openhands browser click 'testid=meta-profile-save'andcontrol-openhands browser wait-text 'Meta-profile "QA_router" saved'. Aftercontrol-openhands browser reload:control-openhands browser text 'testid=meta-profile-row-QA_router'isQA_router\ndeepseek-flash · Direct prompt,control-openhands browser count 'testid=meta-profile-active-badge'is0, the switchevalabove returns{checked:true, disabled:false},control-openhands api GET /api/meta-profileshasactive_meta_profilenull,control-openhands api GET /api/settingshas"run_router_at_conversation_start": true, andcontrol-openhands api GET /api/profileshas a newdeepseek-chat(deepseek/deepseek-chat,provider_connection_idset) whiledeepseek-flash/deepseek-proare unchanged.control-openhands browser screenshot --feature F12.create-first --name list-after-createshows the row without a badge and the switch on.Duplicate name (
F12.duplicate-name). Runcontrol-openhands browser click 'testid=add-meta-profile',control-openhands browser click 'testid=meta-profile-template-custom',control-openhands browser fill 'testid=meta-profile-name-input' QA_router,control-openhands browser text 'testid=meta-profile-name-taken'(A meta-profile with this name already exists. Choose a different name, or edit the existing one.), pick classifierdeepseek-proas above, fill the prompt with'Route: {{ instance_text }}', andcontrol-openhands browser enabled 'testid=meta-profile-save'(false).control-openhands browser fill 'testid=meta-profile-name-input' QA_router_2makescontrol-openhands browser count 'testid=meta-profile-name-taken'0and Savetrue. Clicktestid=meta-profile-cancel;control-openhands browser count 'testid=meta-profile-row-QA_router_2'is0."Don't create profiles" in a template (
F12.router-profiles). Runcontrol-openhands browser click 'testid=add-meta-profile',control-openhands browser click 'testid=meta-profile-template-router-pro',control-openhands browser value 'testid=meta-profile-router-connection'(QA_deepseek (deepseek), preselected),control-openhands browser click 'testid=meta-profile-router-connection'andcontrol-openhands browser click "role=option[name=\"Don't create profiles\"]" --observe 'testid=meta-profile-router-connection' --observe-ms 1500. The picker stays onDon't create profiles: the observed states areQA_deepseek (deepseek)at 0 ms andDon't create profilesabout 300 ms later, with nothing after it, andcontrol-openhands browser value 'testid=meta-profile-router-connection'isDon't create profiles. Cancel the editor (control-openhands browser click 'testid=meta-profile-cancel');F12.create-moresaves a template with this choice. The Custom template starts onDon't create profileseven with a connection present; there, pickrole=option[name="QA_deepseek (deepseek)"]first and thenDon't create profiles: the second pick sticks. Cancel the editor.Create another router without new profiles (
F12.create-more,F12.router-profiles). Runcontrol-openhands browser click 'testid=add-meta-profile',control-openhands browser click 'testid=meta-profile-template-router-flash',control-openhands browser value 'testid=meta-profile-router-connection'(QA_deepseek (deepseek), preselected),control-openhands browser fill 'testid=meta-profile-name-input' QA_router_flash,control-openhands browser click 'testid=meta-profile-router-connection',control-openhands browser click "role=option[name=\"Don't create profiles\"]"andcontrol-openhands browser value 'testid=meta-profile-router-connection'(Don't create profiles). Thencontrol-openhands browser click 'testid=meta-profile-save'andcontrol-openhands browser wait-text 'Meta-profile "QA_router_flash" saved'. Aftercontrol-openhands browser reload,control-openhands browser text 'testid=meta-profile-list'isQA_router\ndeepseek-flash · Direct prompt\nQA_router_flash\nminimax-m3 · Direct promptandcontrol-openhands browser count 'testid=meta-profile-active-badge'is0.control-openhands api GET /api/profilesstill lists onlydeepseek-chat,deepseek-flashanddeepseek-pro: none of the template's 11 models became a profile, soQA_router_flashnames a classifier (minimax-m3) that does not exist, which saving allows (see Gotchas).Row menu (
F12.row-menu). Runcontrol-openhands browser click 'testid=meta-profile-menu-trigger-QA_router'andcontrol-openhands browser snapshot 'testid=meta-profile-actions-menu'(menuitem "Edit",menuitem "Delete";browser count 'testid=meta-profile-set-active'is0); screenshot--feature F12.row-menu --name menu;control-openhands browser press Escapecloses it (count0).Activate (
F12.activate). Blocked locally: the row menu has no Set active. On an organization-bound Cloud backend, row menu →testid=meta-profile-set-activeandwait-text 'Meta-profile "<name>" activated'move the Active badge; recordblockednaming the Cloud organization login.Edit (
F12.edit). Runcontrol-openhands browser click 'testid=meta-profile-menu-trigger-QA_router',control-openhands browser click 'testid=meta-profile-actions-menu >> testid=meta-profile-edit',control-openhands browser text 'testid=meta-profile-editor >> role=heading'(Edit meta-profile),control-openhands browser enabled 'testid=meta-profile-name-input'(false),control-openhands browser count 'testid=meta-profile-router-connection'(0). Pick classifierdeepseek-pro, filltestid=meta-profile-model-tablewith the first two table lines only, clicktestid=meta-profile-saveandcontrol-openhands browser wait-text 'Meta-profile "QA_router" saved'. After a reload the row readsQA_router\ndeepseek-pro · Direct promptandcontrol-openhands api GET /api/meta-profiles/QA_routershows the new classifier and table.Cancel the connection dialog (
F12.add-connection-cancel). Runcontrol-openhands browser click 'testid=add-meta-profile',control-openhands browser click 'testid=meta-profile-template-custom',control-openhands browser fill 'testid=meta-profile-name-input' QA_router_cancel,control-openhands browser click 'testid=meta-profile-add-provider-connection',control-openhands browser fill 'testid=provider-connection-name-input' QA_unused,control-openhands browser click 'role=dialog >> role=button[name="Cancel"]'(the Cancel button has no test id) andcontrol-openhands browser wait 'testid=provider-connection-modal' --state detached.browser value 'testid=meta-profile-name-input'is stillQA_router_cancel, the picker still readsDon't create profiles, andcontrol-openhands api GET /api/llm/provider-connectionshas noQA_unused(display_nameis the field).Leave the editor (
F12.editor-cancel). In that editorcontrol-openhands browser countontestid=meta-profile-list,testid=add-meta-profileandtestid=meta-profile-run-at-conversation-startis0each. Pick classifierdeepseek-flash, fill the prompt'Pick: {{ instance_text }}', clicktestid=meta-profile-cancel:count 'testid=meta-profile-list'is1,count 'testid=meta-profile-row-QA_router_cancel'is0andapi GET /api/meta-profileshas noQA_router_cancel. In edit mode (row menu → Edit onQA_router),control-openhands browser fill 'testid=meta-profile-prompt-template' 'Changed: {{ instance_text }}'then Cancel leavescontrol-openhands api GET /api/meta-profiles/QA_routerwith its savedprompt_template.Run on first message (
F12.run-first-message-toggle). Runcontrol-openhands browser click 'testid=meta-profile-run-at-conversation-start >> text=Run on first message', thencontrol-openhands browser reloadand the switcheval:checkedflips and stays flipped;api GET /api/settingsshowsrun_router_at_conversation_startwith the same value;control-openhands browser toastsis empty. Click again to restoretrue.Routing in a conversation (
F12.route-first-message). Set the active agent profile's router toQA_router(Settings → Agent → Edit →agent-settings-router-select,F13.profile-router; the recipe there uses a named profileQA_ohpinned todeepseek-pro, activated with Set as active) with the switch on. Runcontrol-openhands conversation start --prompt "Run echo routed in the terminal and tell me its output." --wait --timeout 300, thencontrol-openhands conversation events <id> --kinds ActionEvent,ObservationEvent,MessageEvent(<id>from the start output). The first action isroute_task_to_model, its observation startsClassified task as 'model: deepseek-flash' and switched to LLM profile 'deepseek-flash', then the terminal runsecho routed. On the conversation pagecontrol-openhands browser wait-text 'Switched to profile'succeeds andcontrol-openhands browser screenshot --feature F12.route-first-message --name conversationshows theSwitched to profile deepseek-flashline above the answer.control-openhands api GET "/api/conversations/<id>/events/search?limit=1" --max-bytes 200000(the system prompt) containsROUTE_AT_CONVERSATION_STARTand"route_task_to_model". Switch Run on first message off (control-openhands browser goto /settings/meta-llmfirst: the browser is on the conversation), start--prompt "Reply with only the word pong.", and the same GET contains"route_task_to_model"but noROUTE_AT_CONVERSATION_START; there is no route action.Delete (
F12.delete). Runcontrol-openhands browser goto /settings/meta-llm,control-openhands browser click 'testid=meta-profile-menu-trigger-QA_router_flash',control-openhands browser click 'testid=meta-profile-actions-menu >> testid=meta-profile-delete'andcontrol-openhands browser snapshot 'role=dialog'(Delete meta-profile,Are you sure you want to delete "QA_router_flash"? This cannot be undone., Cancel, Delete).control-openhands browser click 'role=dialog >> role=button[name="Cancel"]'keeps the row (count1). Repeat the menu click, thencontrol-openhands browser click 'testid=delete-meta-profile-confirm',control-openhands browser wait-text 'Meta-profile "QA_router_flash" deleted',control-openhands browser reload;control-openhands browser count 'testid=meta-profile-row-QA_router_flash'is0.Delete the last router (
F12.delete-active). WithQA_routerthe active agent profile's router, the switch on and no other router left (deleteQA_router_2first if F13 created it), delete it the same way (wait-text 'Meta-profile "QA_router" deleted'). After a reloadtestid=meta-profile-emptyis back and the switchevalis{checked:false, disabled:true}, whileapi GET /api/settingsstill has"run_router_at_conversation_start": true;api GET /api/agent-profiles/<profile>hasmeta_profile_refnullandenable_classify_and_switch_llm_toolfalse(screenshot--feature F12.delete-active --name last-deleted). A newconversation start --prompt "Reply with only the word pong." --waithas neither"route_task_to_model"norROUTE_AT_CONVERSATION_STARTin its events/search output.Light theme (
F12.light-theme). No router is left afterF12.delete-active, whose lastconversation startleft the browser on a conversation: runcontrol-openhands browser goto /settings/meta-llmand create one through Custom as inF12.phone(nameQA_router_light, classifierdeepseek-flash, prompt'Pick one model for: {{ instance_text }}',wait-text 'Meta-profile "QA_router_light" saved'), thencontrol-openhands browser goto /settings/app,control-openhands browser click 'testid=color-theme-input',control-openhands browser click 'role=option[name="Light+"]',control-openhands browser goto /settings/meta-llmandcontrol-openhands browser eval "(()=>{const h=[...document.querySelectorAll('h2')].find(e=>e.textContent.includes('Available meta-profiles'));const n=document.querySelector('[data-testid^=meta-profile-row-] span');return {heading:getComputedStyle(h).color,rowName:getComputedStyle(n).color,bg:getComputedStyle(document.body).backgroundColor}})()". It returns{heading: "rgb(31, 31, 31)", rowName: "rgb(31, 31, 31)", bg: "rgb(255, 255, 255)"}: dark text, the same ink as LLM profile names on/settings/llm.control-openhands browser screenshot --feature F12.light-theme --name listshows the headingAvailable meta-profilesand the nameQA_router_lightnext to its summary. Restore withrole=option[name="OpenHands-Neutral"]the same way, then deleteQA_router_lightthrough its row menu (wait-text 'Meta-profile "QA_router_light" deleted') soF12.phonestarts on a router-less page.Phone (
F12.phone, also re-provesF12.create-firston a router-less page). Runcontrol-openhands browser viewport phone,control-openhands browser goto /settings/meta-llm,control-openhands browser click 'testid=add-meta-profile'andcontrol-openhands browser bbox 'testid=meta-profile-template-modal'(insideViewporttrue,pageHorizontalOverflowfalse). Choose Custom, fillQA_router_phone, classifierdeepseek-flashand prompt'Pick one model for: {{ instance_text }}';control-openhands browser bbox 'testid=meta-profile-editor'has no page overflow (taller than the screen, scrolls). Save, reload, thencontrol-openhands browser bbox 'testid=meta-profile-row-QA_router_phone'and, aftercontrol-openhands browser click 'testid=meta-profile-menu-trigger-QA_router_phone',control-openhands browser bbox 'testid=meta-profile-actions-menu'are inside the viewport without page overflow.control-openhands browser screenshot --feature F12.phone --name listshowsQA_route…truncated, the summary and the switch on. Return withcontrol-openhands browser viewport desktop.Restart persistence (
F12.list). Runcontrol-openhands restart,control-openhands doctor,control-openhands browser goto /settings/meta-llmandcontrol-openhands browser count 'testid=meta-profile-row-QA_router_phone'; it is1.Cleanup. Switch Run on first message off through its label first (it disables once no router is left), then delete each
QA_*router through the row menu. Remove the arranged LLM profile and connection withcontrol-openhands api DELETE /api/profiles/deepseek-chat --writeandcontrol-openhands api DELETE /api/llm/provider-connections/<connection id> --write(<connection id>fromcontrol-openhands api GET /api/llm/provider-connections), or through Settings → LLM (F10).
Gotchas
- Settings nav test ids embed the route: quote
'testid=sidebar-settings-/settings/meta-llm'as written. - The empty-state hint about LLM profiles only exists before any profile is saved: drive
F12.empty-statesfirst on a fresh run. - The first router you create turns Run on first message on by itself; later routers do not. Locally no router is ever active here: whether a conversation routes depends on its agent profile's router (
F13.profile-router). Run on first messageis ansr-onlycheckbox (keyboard reachable): click the label text insidetestid=meta-profile-run-at-conversation-startand read.checked/.disabledwithbrowser eval. The stored preference (misc_settings.app_preferences.run_router_at_conversation_start) is independent of what the disabled switch shows; with no active router it may still betrue. Turn it off before deleting the last router, or a later "first router" will not re-enable it because it is already on.- Router templates name 11 models (
gpt-5.4…claude-sonnet-4-5) that will not exist in a sandbox. With a provider connection present, a template preselects it, and saving creates all 11 as LLM profiles linked to that connection unless you pick Don't create profiles first (F12.create-moredoes). If a run created them, remove them withfor p in gpt-5.4 gpt-5.5 minimax-m3 claude-opus-4-6 claude-opus-4-7 claude-opus-4-8 claude-fable-5 kimi-k2.5 kimi-k2.6 deepseek-v3.2-reasoner claude-sonnet-4-5; do control-openhands api DELETE /api/profiles/$p --write; done(they live in the run's private state and only add rows to Settings → LLM). - Profile matching is case-insensitive and exact by name: table rows are
- <profile name>: description; existingdeepseek-flash/deepseek-proare not re-created, and the endpoint is derived as<provider lowercased>/<name>. - The classifier and the model table refer to LLM profile names, not model ids. A router whose classifier profile does not exist (for example a template's
minimax-m3without a connection) saves fine and only fails when a conversation tries to route. - The agent decides whether to call
route_task_to_model: a prompt that conflicts with routing (Reply with only the word pong.) made deepseek-flash skip the call even with the instruction present. Use a task-like prompt for the positive check and assert the system prompt viaevents/searchfor the instruction itself. conversation eventsdoes not print the system prompt; read it withcontrol-openhands api GET "/api/conversations/<id>/events/search?limit=1" --max-bytes 200000and grep the output.service stop agent-serverdoes not show this page's error state: the whole app switches to the Manage backends card (F02). Runcontrol-openhands restartafterwards.- The selection in the classifier and connection pickers is a combobox: open it with a click on the input, then click
role=option[name="..."];browser fillon the classifier sets a free-text value (allowed) instead of picking a profile. - At 390 px the row truncates the name (
QA_route…) and summary; read names withbrowser text, not the screenshot. - The Model table placeholder displays separate lines (
F12.template-custom). - Known issue OpenHands/software-agent-sdk#5878: Router files can be written under a literal
~directory when Agent Server was configured with leading-tildeOH_PERSISTENCE_DIR. Blocked on the normal absolute-path launcher fixture: needs a disposable server with private HOME/cwd and literal~/...or relative persistence configuration, then a router save and filesystem readback. Never point it at user state. (F12.create-first,F12.list).