The argument in one line.
Claude Desktop gateway mode lets you substitute any OpenAI-compatible local model for the paid Anthropic API, making Claude Code multi-agent workflows accessible at zero inference cost.
Read if. Skip if.
- You want to try Claude Code Dynamic Workflows without committing to an Anthropic API subscription.
- You already run LM Studio or Ollama locally and want to pipe those models into Claude agentic interface.
- You are exploring ways to reduce AI tooling costs while keeping access to multi-agent orchestration.
- You are technically comfortable but new to the Claude Desktop gateway to LM Studio connection.
- You need production-grade speed or reliability -- local Gemma is noticeably slower than the hosted API, especially at ingesting large prompts.
- You want a deep-dive on prompt engineering or agent architecture rather than a click-by-click setup tutorial.
The full version, fast.
Claude Desktop ships a gateway mode that routes inference to any OpenAI-compatible endpoint instead of the Anthropic API. By pointing it at LM Studio local server and loading a Gemma model aliased as claude-opus-4.8, you satisfy Claude model-discovery without an Anthropic account. The Dynamic Workflows feature lets a single /deep-research command spawn up to 16 concurrent agents with a 1,000-agent-per-run ceiling, all on your local machine. The main tradeoff is prefill latency: Claude Code first message includes roughly 30,000 tokens of system context, and local models are slower at ingesting that than at generating responses.
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Create a free account →Where the time goes.

01 · Hook + gateway overview
Introduces Claude Dynamic Workflows, names the two backend options (LM Studio local, OpenRouter cloud), and frames the cost angle.

02 · Claude docs: Cowork on 3P
Walks through official setup guide. Step 1: download Claude Desktop. Step 2: do not sign in with an Anthropic account.

03 · Configure third-party inference
In Claude Desktop settings: set connection type to gateway, credential kind to static API key.

04 · LM Studio overview
Download, model search interface, GPU compatibility green-tick indicator, three setup steps.

05 · Developer mode + gateway URL
Enable developer mode in LM Studio, open Developer tab, copy local server URL, paste into Claude gateway base URL field.

06 · The model-alias trick
Claude rejects models not named Sonnet/Opus/Haiku. Fix: rename the model API identifier to claude-opus-4.8 in LM Studio load settings.

07 · Disable built-in tools + BraveSearch MCP
Local models lack built-in web search. Toggle disables native tools so Claude looks for MCP connections.

08 · Sign-in flow
If already signed in to Claude, sign out first to see the gateway login screen. Continue without account.

09 · Adding MCP via config file
Copy NPX install snippet from BraveSearch docs, use Claude to merge it into existing claude_desktop_config.json.

10 · Dynamic Workflows explained
16 concurrent agents, 1,000 total per run. /deep-research is a bundled slash command. Live business-plan demo.

11 · Live demo + prefill/decode explainer
Agents running in real time on Gemma 26B. Explains why first message is slow (30K tokens). Suggests leaving the computer for 1-2 hours.
Lines worth screenshotting.
- Claude Desktop has an official gateway mode that swaps Anthropic API for any OpenAI-compatible endpoint including a localhost LM Studio server.
- Claude model-discovery rejects model IDs that do not contain Sonnet, Opus, or Haiku -- renaming your local model to match is the entire fix.
- Dynamic Workflows cap at 16 concurrent agents and 1,000 total per run, a ceiling designed to prevent runaway loops.
- The /deep-research slash command in Claude Code is a pre-built Dynamic Workflow -- no custom JavaScript scripting required.
- Local model latency is front-loaded -- the first response is slowest because Claude Code system prompt is around 30,000 tokens on the first message.
- Disabling built-in tools in gateway settings forces Claude to use MCP connections for web search instead of its native tools.
- BraveSearch MCP still needs its own free API key -- the MCP handles the interface but not the credential.
- Ollama and LM Studio are interchangeable in this setup using the same gateway URL pattern and model-alias trick.
- OpenRouter plugs into the same gateway slot and gives access to hundreds of cloud models at roughly 98 percent less than direct Anthropic API pricing.
- A paid Claude.ai subscription coexists with gateway mode -- switching to local inference does not conflict with the paid plan.
How to run Claude agents without an Anthropic bill.
Claude Desktop gateway mode is an official feature that lets you substitute any local model for the Anthropic API, and one naming convention is the only non-obvious requirement.
- Claude Desktop model-discovery filter only accepts model IDs containing Sonnet, Opus, or Haiku -- renaming your local model to match this pattern before loading it is the single step most tutorials skip.
- Dynamic Workflows are capped at 16 concurrent agents and 1,000 total per run, which is more than enough for most research, analysis, and code-generation tasks running locally.
- The /deep-research slash command is already bundled into Claude Code -- there is no scripting required to access multi-agent behavior, just type the command.
- Local model latency is front-loaded: the first response in a Claude Code session is the slowest because the system context runs around 30,000 tokens, and prefill speed is where local hardware trails hosted inference most noticeably.
- BraveSearch and other web-search providers require their own API keys even when connected through an MCP -- the MCP provides the interface but not the credential.
- OpenRouter is a drop-in alternative to LM Studio in this same setup and gives access to hundreds of cloud models including free tiers and paid options at a significant discount over direct API pricing.
Terms worth knowing.
- Cowork on 3P
- Anthropic official term for running Claude Desktop against a third-party inference provider rather than Anthropic own API. Documented at claude.com/docs/cowork/3p/overview.
- Dynamic Workflows
- A Claude Code feature where Claude writes and executes a JavaScript orchestration script that can spin up hundreds of sub-agents to work on a single task in parallel.
- Gateway mode
- A Claude Desktop configuration that replaces the default Anthropic API endpoint with any OpenAI-compatible URL, enabling local or third-party model inference.
- Prefill (TTFT)
- The first phase of LLM inference where the model processes the incoming prompt. Time To First Token is determined by prefill speed, and large prompts like Claude Code system context make this the main bottleneck on local hardware.
- Decode (TPS)
- The second phase of LLM inference where the model generates each output token. Local hardware often performs well at decoding relative to prefill.
- MCP (Model Context Protocol)
- An open protocol for connecting external tools and data sources to AI models. In this context, an MCP server provides web search to a local model that has no built-in internet access.
- Model alias / API identifier
- A custom name assigned to a local model in LM Studio that overrides its default identifier. Used here to rename Gemma as claude-opus-4.8 so Claude Desktop model-discovery accepts it.
Things they pointed at.
Lines you could clip.
“Instead of us using the paid API from Anthropic or even needing an Anthropic account, I'm gonna show you how to do this by using local AI models that are running completely on your computer.”
“The gateway returned no usable models -- Claude is only looking for things that have Sona or Opus or Haiku.”
“A dynamic workflow is a JavaScript that lets you basically deploy hundreds of sub agents.”
“From the very first message, we're sending like 30,000 tokens. It's a lot. But then from here, you can literally just leave your computer.”
Word for word.
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
The bait, then the rug-pull.
A thousand agents, zero API bill. The Claude Desktop app ships a gateway mode that routes all inference to a local LM Studio server -- and the only non-obvious step is a model-renaming trick that takes thirty seconds.
Named ideas worth stealing.
Prefill vs. Decode
- Prefill (TTFT -- prompt ingestion speed)
- Decode (TPS -- token generation speed)
Two phases of local LLM inference. Prefill determines time to first token; decode determines generation speed. Local hardware bottlenecks at prefill for large contexts.
Cowork on 3P
Anthropic term for running Claude Desktop against a third-party inference provider, enabling any OpenAI-compatible endpoint as a drop-in replacement.
How they asked for the click.
“If you enjoyed it, I would appreciate if you could like the video, drop a comment, or subscribe to my channel.”
Standard subscribe ask after content wraps. Also seeds a follow-up video on OpenRouter integration.





































































