Change model from inside coding harness
Hi,
It would be nice to have the possibility to change the model and the thinking level directly from the coding agent. For example:
/plannotator-model
it would open a menu to select model and its thinking level
Thanks for the request. Before we scope it, two questions, because there are a few different things this could mean:
- Which coding agent are you using Plannotator with (Claude Code, OpenCode, Codex, Pi, other)?
- Whose model do you want to change from the menu:
- the coding agent's own model and thinking level (the one writing your code), or
- the model used by Plannotator's AI features, such as Ask AI and the launchable review agents?
Context on what exists today, in case part of this is already covered: the review UI's agent-job launcher lets you pick engine, model, and reasoning effort per run, and Ask AI has a provider picker with per-agent persisted defaults. If your ask is a quicker path to those settings from a slash command, that is a different (and smaller) feature than a menu that switches the host agent's model, which some harnesses expose to plugins and some do not.
If you can describe the moment where you wanted this (what you were doing, what you wished happened), we can figure out the right shape.
Hi,
- In my case I am using pi coding agent
- The idea is to change plannotator model (agent own model is easy to change in almost any harness) so we don't have to modify plannotator.json manually.
The way I was thinking it was:
/plannotator-model
Then:
- It would show a menu to select first the phase (default one [which would change general model for all plannotator phases], planning, executing...)
- You are displayed your list of available models
- You select your thinking level
This command would be useful at any time (in plan mode, out of plan mode...) to change quickly the model for a phase or default one(without having to use plannotator specific UI or editing plannotator.json manually)
I hope it's more clear now, if not feel free to ask.
Thanks!
That helps a lot, thanks. One precise question so we build against the right file: which plannotator.json are you editing manually today? If it is a Pi agent definition (something like ~/.pi/agents/plannotator.json with a model and thinking level in it), paste its shape here (redact anything private) and that pins the design.
What we can say already:
- A
/plannotator-modelcommand in the Pi extension presenting a picker (scope, then model, then thinking level) is feasible: the extension already intercepts slash commands and Pi gives it UI affordances, so this does not need the browser UI at all. - Some of what you want exists but is scattered, which is a fair criticism: the review UI's agent-job launcher picks engine, model, and reasoning effort per run, and Ask AI on Pi rides the
pi-sdkprovider with per-agent persisted defaults. Neither is reachable without opening the browser UI, and neither covers a "default for everything" switch. - The phase concept (default, planning, executing) is the part that does not exist today as configuration; today model choice is per-feature (Ask AI, review jobs) rather than per-phase. If your
plannotator.jsonalready encodes phases, that is exactly the shape we want to see.
Once you confirm the file, we will scope it properly. Marked as an enhancement; realistic sequencing is after the current release queue clears.
Right now I am using plannotator pi extension (https://pi.dev/packages/@plannotator/pi-extension) Which according to the documentation (and it worked for me), it supports changing the model for the different phases.
The documentation itself shows an example for it:
{
"executionMode": "automatic",
"defaults": {
"model": { "provider": "anthropic", "id": "claude-sonnet-4-5" },
"thinking": "medium",
"activeTools": ["read", "bash"],
"statusLabel": "Ready",
"systemPrompt": "Optional prompt template"
},
"phases": {
"planning": {
"model": null,
"thinking": null,
"activeTools": ["grep", "find", "ls", "plannotator_submit_plan"],
"statusLabel": "⏸ plan",
"systemPrompt": "[PLANNING]\nPlan file: ${planFilePath}"
},
"executing": {
"model": { "provider": "anthropic", "id": "claude-sonnet-4-5" },
"thinking": "high",
"activeTools": [],
"statusLabel": "",
"systemPrompt": "[EXECUTING]\nRemaining steps:\n${todoList}"
},
"reviewing": {
"systemPrompt": "..."
}
}
}
Regarding the config file, I am using currently: ~/.pi/agent/plannotator.json, but the documentation also states that you could use per project config file. Maybe it's a good idea to also ask as a first step, which config file you want to override.
Perfect, that pins it completely. You are configuring the Pi extension's phase orchestration (~/.pi/agent/plannotator.json, or the per-project variant), and the ask is an interactive editor for the model and thinking fields so routine switches do not require hand-editing JSON.
Shape we will build, incorporating your suggestion:
/plannotator-modelasks which config to modify when both exist: project (.pi/agent/plannotator.json) or global, defaulting to whichever is currently in effect for the session.- Pick scope: defaults, planning, executing, or reviewing.
- Pick model from the models Pi actually has available in your session, then thinking level. Selecting "inherit" writes
nullfor a phase, matching the existing semantics where a phase falls back to defaults. - Write back preserving everything else in the file untouched: activeTools, systemPrompt, statusLabel, executionMode, and your formatting.
Two behaviors we will nail down during implementation and document: whether a change applies to the current session immediately or on the next phase transition (we will make it immediate where Pi allows it, and say so either way), and what happens when the file has a syntax error (show the error and refuse to write rather than clobbering).
This is actionable as filed. It is queued behind the current release work; if you would like to take a swing at it yourself the relevant code is apps/pi-extension/ (command interception in index.ts, and the phase config handling), and we would be glad to review.
Similar request, but from the plan review UI:
Related idea: instead of (or in addition to) a slash command in the harness, it would be great to pick the execution model from the plan HTML review page, right before approving.
When the plan opens in the browser, show a model selector (model + thinking level) next to the approve/deny actions. Selecting a model and clicking approve would tell the agent to run this plan with that model.
This is especially useful when a plan looks complex — I want to switch to a stronger model for execution without restarting the session or digging into config.
@Otherworldy which harness are you using? Only scalability concern is that not every harness supports switching models mid-session, but Pi and OpenCode should.
@backnotprop I am using pi coding agent
Closing this after maintainer review, and a correction to the earlier replies in this thread: the "we will build this" framing was posted prematurely and did not reflect a maintainer decision. That is on us, not on the request.
The decision: not planned. The core reason is the scalability concern raised above. Mid-session model switching is not something every harness supports, so a Plannotator-owned model picker cannot behave consistently across the agents Plannotator integrates with, and shipping a control that works on two harnesses and silently cannot work on the rest is not a shape we want to own.
For the Pi users on this thread, the good news is that Pi already covers this natively: the phase config (~/.pi/agent/plannotator.json or the per-project variant) supports per-phase model and thinking settings today, exactly as documented earlier in the thread. Editing that file is the supported path, and it is Pi-native rather than Plannotator-mediated, which is where this capability belongs.
Thanks to both of you for the clear requests and the config details; sorry for the whiplash from the earlier over-commitment.
Hi,
I think most of the harnesses allow changing model mid session. I understand if some harness don't support changing model mid session this won't work for them (but we could even show a warning for those specific cases), but as they seem to be a minority, I am not sure it's a good idea to reject features just because of them.
In any case thanks for having a look