Skip to content
Local and cloud · One list · MCP-native

Switch models from inside Claude Code.

Turn on ToolPiper's Engine switch once. Then /model lists your local and cloud models together, each compacting at its own number, and a session moves to another with one pick. No env vars, no shell restart, no editor restart.

Before you start

  • Two or more language models in ToolPiper, local or cloud. A local model needs a trained window of at least 98,304 tokens and enough memory; a cloud model needs Pro.
  • Claude Code installed.
  • ToolPiper installed, with Engine turned on in the Claude Code row on Home.

Setup

  1. 1

    Start a new session

    Run claude. A session you opened before turning on Engine stays as it is, so the list below appears in a session started after it.

  2. 2

    Open the list

    Type /model. It lists every model the switch can offer, local and cloud together. A local model the switch can't offer stays off the list, and the row on Home says why.

  3. 3

    Pick a model

    Pick one and the session's next message goes to it. Your chat history, system prompt and tools stay intact. A prompt too long for a smaller model's window comes back as a too-long error, and Claude Code compacts and carries on from it.

  4. 4

    Or ask for it in chat

    With the Tools switch on too, ask Claude Code to change the engine's model. It calls ToolPiper's claude_code_engine_set tool, and ToolPiper raises an Allow card the first time. This changes the model new sessions start on, and a session on the engine that never made a pick follows it on its next message.

    chat
    "Run Claude Code on my local Qwen."
    "Use my OpenAI model for Claude Code."
    "Turn the engine off."
  5. 5

    Add a model while you work

    A model you add in ToolPiper joins the list as it appears. It compacts at its own number from the next new session; a session already open reads the default until then.

Why this recipe

One list, one pick

Local and cloud sit in the same /model list under the names you gave them. A cloud row runs on your own account, and a local row runs on this Mac.

Each model compacts at its own number

ToolPiper states each model's window to Claude Code, so sessions on different models run side by side and each compacts on its own. A gateway can't declare a size to Claude Code; a per-model setting can.

Conversation continues

Your chat history, system prompt, and tool definitions stay intact across the switch. Only the model changes; the one on the other side picks up where the last one left off.

Frequently asked

Can different sessions run different models?

Yes. A pick in /model belongs to that session. Any number of sessions on different models each compact on their own.

What about cost? Won't a session end up on a paid model by accident?

A session changes model only when you pick one or allow a change. The Engine row names the model new sessions start on, and each row says whether it runs on your Mac or on your own cloud account.

Does a pick survive across Claude Code launches?

The pick is saved in Claude Code's settings while Engine is on, and ToolPiper's choice of model stays too. Turning Engine off takes both out of the file, and a session that made a pick runs /model once more to choose an Anthropic model.

What about endpoint_set?

ToolPiper's endpoint_set tool still switches the backend for a client that calls ToolPiper with its own token. Claude Code on the engine names its model on every request, so /model is what moves it.

Ready to try it?

ToolPiper is a free download. Configure once and Claude Code routes through your Mac.

Other Claude Code recipes