You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support switching LLM models in the middle of conversation #416
We can implement resolve_diff_from_deserialized differently in LLMRouter -- it should allow us to set a different LLM on the fly:
We start a conversation with LLMRouter with ONE model instead of LLM
User sets new LLM config
LLMRouter save the LLMConfig, set it to the current LLM service (LLMRouter should be the serializable class that contains all information about the history of LLM switch actions)
@jpelletier1 Not yet. Switching models mid-conversation is currently blocked, because I have concerns about one way of doing it, and I need to finalize and propose another way of doing it. Sorry. I’ll open that discussion by tonight!
The designs are fairly minimal at this stage, but were included with the Planning Agent design. In this design screenshot, there is a small dropdown in the Input Textarea (labeled GPT5) where a user can switch models within the context of a conversation: OpenHands/OpenHands#8964 (comment)
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
They are two totally different problems :-) and from the first example in the issue it seems that we want to switch LLM but than in the example we have two different agents.
For LLM switching specifically (not agent), ClawRouter handles this at the request level:
* Each API call gets routed to the optimal model based on prompt complexity
* No agent-level changes needed - just swap the endpoint
* Works transparently with any agent framework
The distinction matters because:
* **Agent switching** = changing behavior/tools/prompts mid-conversation
* **LLM switching** = same agent, different backend model per request
ClawRouter focuses purely on the LLM layer - it's invisible to your agent logic.
llama.cpp provides an alternative way for local LLMs - just a single REST request to load the model to start chatting with it (sending a REST request with different model name switches it):
Activity
jpelletier1 commentedon Nov 12, 2025
@xingyaoww Is this already implemented in V1, such that once we have the GUI using V1, we should be able to support switching models mid-conversation?
We currently have designs for this so wanted to check on whether there's additional Agent SDK features that are needed.
enyst commentedon Nov 12, 2025
@jpelletier1 Not yet. Switching models mid-conversation is currently blocked, because I have concerns about one way of doing it, and I need to finalize and propose another way of doing it. Sorry. I’ll open that discussion by tonight!
What designs are we talking about?
jpelletier1 commentedon Nov 13, 2025
@enyst Thanks for the update.
The designs are fairly minimal at this stage, but were included with the Planning Agent design. In this design screenshot, there is a small dropdown in the Input Textarea (labeled
GPT5) where a user can switch models within the context of a conversation: OpenHands/OpenHands#8964 (comment)all-hands-bot commentedon Feb 11, 2026
This issue is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days.
VascoSch92 commentedon Feb 12, 2026
This is related to #2018.
Question: Do we want to switch LLM or Agent?
They are two totally different problems :-) and from the first example in the issue it seems that we want to switch LLM but than in the example we have two different agents.
maveilo commentedon Mar 21, 2026
llama.cpp provides an alternative way for local LLMs - just a single REST request to load the model to start chatting with it (sending a REST request with different model name switches it):
VascoSch92 commentedon Apr 6, 2026
I think this issue can be closed because of: #2192
We could open another issue to port the switching logic in the agent-server if needed.
@xingyaoww WDYT?
enyst commentedon Apr 6, 2026
I think we do need it in the agent-server. 👍