Model Router works with OpenHands Agent Profiles. ACP agents such as Claude Code, Codex, and Gemini CLI manage model selection in their own runtime.
Create a Model Router
- Open
Settings > Model Router. - Select
Add Model Router. - Choose one of the templates:
Add Default Pareto Max Score— prefilled with the default Pareto prompt that favors the highest expected task score.Add Default Pareto Min Cost— prefilled with a placeholder min-cost Pareto prompt.Custom— starts with an empty router form.
- Review the classifier model, default model, prompt template, and model table.
- Save the router.
Default Pareto templates
The default Pareto templates use:minimax-m3as the classifier profileminimax-m3as the fallback/default profile- a model table with the target model names and benchmark score/cost data
- a direct prompt template that must include
{{ instance_text }}and may include{{ model_table }}
Create the target LLM profiles
When you create a default Pareto router, Agent Canvas can create any missing target LLM profiles for you. LeaveCreate missing LLM profiles for this router checked to reuse your current provider settings for all router models.
This copies the active LLM profile’s provider settings and changes only the model identifier and usage id for each router target. It is the quickest way to try a router with an existing LiteLLM proxy or compatible provider configuration.
Custom routers
ChooseCustom when you want to write your own router prompt or route between a smaller set of saved profiles.
A custom router starts blank and leaves automatic target-profile creation unchecked. Fill in:
- Classifier model — the saved LLM profile that classifies the task.
- Default model — the saved LLM profile used if routing fails or no task class matches.
- Prompt template — the prompt sent to the classifier. It must include
{{ instance_text }}. - Model table — optional text injected wherever the prompt uses
{{ model_table }}.
model value that matches a saved LLM profile name. Matching is case-insensitive, so GPT-5.4 and gpt-5.4 resolve to the same profile name.
Use the router in a conversation
After a router is active, start a new OpenHands conversation. The agent receives a routing tool and can call it before doing the task. Agent Canvas shows the selected profile in the conversation list and updates the model selector below the chat after a successful switch. You can ask the agent to call the router the same way you would ask it to use any other tool. For example:/model command. See Manage LLM Profiles.

