[Feature] Ability for Claude Code to change used model by itself

Status Fixed / completed
Maintainer reply None cached
Activity 12 comments · opened Jun 8, 2025 · closed Aug 22, 2025

I'd love to have ability for Claude Code to change used model by itself. I have a flow that contains planning phase and then execution phase and I'd like Claude to automatically switch to Opus for it, while for execution I'd switch back to Sonnet. For now I need to some ugly hacks to interrupt Claude flow to switch the model manually myself.

View original on GitHub ↗

12 Comments

mateuszmazurek · 1 year ago

Yeah, that would be useful. Seems pretty easy to implement too – just need to add a ChangeModel tool to the existing embedded tools. If only Claude Code were open source... 🥲

musistudio · 1 year ago
Yeah, that would be useful. Seems pretty easy to implement too – just need to add a ChangeModel tool to the existing embedded tools. If only Claude Code were open source... 🥲

That sounds interesting, I’ll give it a try!

MarcinOrlowski · 1 year ago

I actually found a solution. It's one of the "if everything else failed, RTFM" because if you run claude code and do /release-notes and then scroll back to ancient times you find

Version 0.2.44:
• Ask Claude to make a plan with thinking mode: just say 'think' or 'think harder' or even 'ultrathink'

so I now run Sonnet as default model, but all my "recipes" do use think hard whenever I want Opus to be used for the task. Then it switches back and it works pretty reliable for me.

larryyu1285 · 1 year ago
I actually found a solution. It's one of the "if everything else failed, RTFM" because if you run claude code and do /release-notes and then scroll back to ancient times you find `` Version 0.2.44: • Ask Claude to make a plan with thinking mode: just say 'think' or 'think harder' or even 'ultrathink' ` so I now run Sonnet as default model, but all my "recipes" do use think hard whenever I want Opus` to be used for the task. Then it switches back and it works pretty reliable for me.

think hard just activates Sonnet-4’s extended-thinking mode (Both Sonnet 4 and Opus have extended thinkg mode); it doesn’t auto-switch to Opus. You’d still need to pick Opus explicitly. Please correct me if I am wrong.

lpalm · 1 year ago

+1 it would be so useful

deksden · 1 year ago

+2!!! please implement

mmkhatib · 1 year ago

+3 that would be extremely helpful.

ugolafosse · 1 year ago

+1

deksden · 1 year ago
AlfredoDinunzioTR · 1 year ago

I would consider this resolved with yesterday's update to assign models to agents. Working great for me.

shawnm-anthropic · 1 year ago

This feature was implemented in v1.0.77! Use /model and select "Opus for planning, Sonnet for execution".

This automatically:

  • Uses Opus during plan mode for complex reasoning
  • Switches to Sonnet for execution to optimize costs

You can also assign different models to subagents when using the Task tool, allowing planning agents to use Opus while execution agents use Sonnet.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.