Ollama can now put its models inside Claude Desktop and ChatGPT Desktop. You turn it on from the Ollama app on a Mac: open it, select Apps in the sidebar, and connect Claude or ChatGPT. Local models work as well as Ollama’s cloud models, but both apps send a large agent prompt, so a local model needs a context length of at least 64,000 tokens and, in practice, a GPU or Mac with 24GB or more.
This guide covers the setup steps for each app, exactly which features use your Ollama model, what still goes to Anthropic or OpenAI, which local models fit, and the problems people report. BFWR has not set this up itself. The steps come from Ollama’s documentation, release notes and source code, and Anthropic’s Claude Desktop configuration reference, read on 22 November 2026. Memory figures are computed with our own VRAM calculator.
Quick answer
- Where: the Ollama desktop app on macOS, Apps page. Claude Desktop’s docs say “Windows support coming soon.”
- Claude Desktop: Ollama runs a local gateway on
127.0.0.1:11435and switches Claude into Anthropic’s third-party gateway mode. Chat, Cowork, subagents and Auto mode run on the Ollama models you assign. - ChatGPT Desktop: needs Ollama v0.34.0 or newer. Ollama models appear in Codex mode only; regular Chat and voice still use OpenAI.
- Context: Ollama defaults to 4K tokens on GPUs under 24 GiB. Its docs say agents need at least 64,000. Set the slider in Ollama’s settings, or start it with
OLLAMA_CONTEXT_LENGTH=64000 ollama serve. - Models: Ollama’s built-in list for Claude is all cloud models. For a local one on a 24GB card, Gemma 4 26B-A4B (19.1 GB at 64K) or Qwen3.8 27B (22.4 GB) fit.
- Undo: disconnect in Apps, or run
ollama launch claude-desktop --restore/ollama launch chatgpt --restore.
How long this has existed
The release notes show the feature has changed several times:
- v0.23.0, 3 May 2026: “Claude Desktop is now supported with Ollama Launch.”
- v0.23.2, 7 May 2026: removed from
ollama launch“due to the third-party integration being limited to Anthropic models.” - v0.24.0, 14 May 2026: support for OpenAI’s Codex App, renamed to ChatGPT in v0.32.0 (11 July).
- v0.33.0, 21 August 2026: Claude Desktop returns, configured “to seamlessly work with Ollama as a third-party gateway provider.”
- v0.34.0, 5 September 2026: “Ollama models can now be used directly in ChatGPT Desktop”, with setup “available from the Ollama app on MacOS.”
The latest Ollama release on 22 November 2026 was v0.40.17 (10 November). Fixes for both integrations are still landing, so update Ollama before you start.
Before you start: context length
This matters more than the model choice. Ollama’s context-length page says it defaults to 4K tokens on GPUs with less than 24 GiB of VRAM, 32K between 24 and 48 GiB, and 256K at 48 GiB or more, and that “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”
Claude Desktop’s prompt is big. In Ollama issue #19359, a user on a 64 GiB M4 Max found that a trivial message produced an initial prompt of “roughly 17K tokens”, which included 31 built-in tools. At 4K, most of that is cut off before the model sees your question.
Raise it in the Ollama app under Settings with the context-length slider, or start the server like this:
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
Check what you got with ollama ps: the CONTEXT column shows the allocated length, and PROCESSOR should read 100% GPU. Cloud models are set to their maximum context automatically.
Claude Desktop with Ollama
Setup, from Ollama’s docs
- Install Ollama. To use a local model, download it first, for example
ollama pull gemma4:26b. To use a cloud model, sign in to Ollama and enable cloud models; the docs note “Some models require a paid plan.” - Open Ollama and select Apps.
- Connect Claude.
- Follow the prompts to install Claude if needed, and restart it when asked.
To change models, open Ollama Settings → Apps, choose your models and select Restart Claude. The docs add: “You can use the same model for more than one option.” Those options are Claude Desktop’s own model slots. In Ollama’s source, the gateway exposes them as Fable 5, Opus 5, Sonnet 5 and Haiku 4.5, and maps each to the Ollama model you pick. Since v0.40.15 the picker “shows Ollama’s actual model names”.
What works
Ollama’s page lists four supported features:
- Subagents: “Split larger tasks across agents”
- Web search: through Ollama’s web search service. Ollama’s web search docs say “A free Ollama account is required.”
- Cowork: Claude’s agent mode for longer tasks
- Auto mode: “Let the agent decide when to ask before making changes”
The profile Ollama writes also sets chatTabEnabled to true, so ordinary chat runs on your Ollama model too.
What Ollama changes in Claude Desktop
From cmd/launch/claude_desktop.go in Ollama’s repository: it writes a profile named Ollama to ~/Library/Application Support/Claude-3p/configLibrary/, separate from Claude’s normal ~/Library/Application Support/Claude folder. The profile sets:
inferenceProvidertogatewayandinferenceGatewayBaseUrlto Ollama’s local gateway athttp://127.0.0.1:11435.disableEssentialTelemetryanddisableNonessentialTelemetryto true. Anthropic’s configuration reference describes these as blocking “Crash, error, and performance reports to Anthropic” and “Product-usage analytics (no message content).”coworkEgressAllowedHoststo*. Anthropic’s reference says this list controls the “Hosts reachable from Chat, Cowork and Code’s sandbox”, and*means all of them. A comment in Ollama’s code says Cowork “needs unrestricted egress for user-configured plugins and MCP servers.”
So your prompts and the model’s replies go to Ollama on your machine, and Claude Desktop’s tools can still reach any website. Anthropic’s gateway documentation says a gateway “must implement the Anthropic Messages API”; Ollama’s gateway does that and forwards each request to the model you mapped.
What we could not confirm: whether Claude Desktop still asks you to sign in to an Anthropic account in this mode, and what other background requests it makes to Anthropic beyond the two telemetry settings. Neither Ollama’s docs nor Anthropic’s gateway page state it.
Switching back
Open Ollama Apps and disconnect Claude; the docs say “Ollama restores Claude’s previous settings.” From a terminal:
ollama launch claude-desktop --restore
The docs also say “Quitting Ollama while Claude is connected also restores Claude’s usual configuration.”
ChatGPT Desktop with Ollama
ChatGPT Desktop includes Codex, OpenAI’s coding agent. Ollama’s docs say it “adds compatible local and cloud models to Codex’s model picker alongside ChatGPT’s native models.”
Setup, from Ollama’s docs
- Update to Ollama v0.34.0 or newer.
- Open the Ollama desktop app and select Apps.
- Toggle ChatGPT (Desktop) to On.
- Follow the prompts. If ChatGPT is open, Ollama asks to restart it before the new models appear.
- Open ChatGPT and switch to Codex mode.
To pick models, open Ollama Settings → Apps → ChatGPT. You can “Choose up to five compatible local or cloud models”. Ollama’s source also has a terminal route, ollama launch chatgpt, which its code allows on macOS and Windows; the documented setup is the Mac app.
What goes where
The docs are clear on this:
- “Only requests made with an Ollama model go to Ollama. ChatGPT’s native models keep using their usual provider.”
- “Ollama models are for Codex mode. Regular Chat and voice keep using their usual ChatGPT connection.”
- “Codex manages sessions.” Ollama routes model requests and compaction, but “does not store ChatGPT sessions.”
- Web search with an Ollama model uses Ollama’s service, “requires Ollama sign-in and is limited to three calls per response.”
In the source, Ollama points Codex’s openai_base_url at a route on Ollama’s own server, /api/codex/v1, and leaves model_provider unset “to preserve ChatGPT’s native account controls.” Every Codex request passes through that local route; requests for models in Ollama’s list go to Ollama, and the rest are forwarded to OpenAI. If a model reports no context length, Ollama tells Codex it has 128,000 tokens, so the real limit is still the one you set in Ollama.
We could not confirm from OpenAI’s or Ollama’s documentation whether Codex mode works with Ollama models when you are not signed in to ChatGPT.
Switching back
Turn ChatGPT off in Ollama Apps, which “restores ChatGPT’s connection settings and usual profile”, or run:
ollama launch chatgpt --restore
Since v0.40.17, that command asks before switching an active profile and “preserves existing settings and chat history”.
Which local model to use
The fallback list in Ollama’s code for Claude Desktop is entirely cloud models: glm-5.2:cloud, kimi-k3:cloud, deepseek-v4-pro, deepseek-v4-flash and gemma4:31b-cloud, with only the last marked as available on the free plan. Ollama’s default mapping puts Sonnet 5 on gemma4:31b-cloud. To stay local, pull a model and select it in Settings → Apps.
Pick a model with tool support (ollama show <model> lists tools under Capabilities). Memory at 64,000 tokens of context, Q4_K_M weights with an FP16 KV cache, computed with the same formula as our VRAM calculator:
| Model | Ollama tag | Weights (GB) | KV cache at 64K (GB) | Total (GB) | Fits |
|---|---|---|---|---|---|
| Gemma 4 12B | gemma4:12b |
7.2 | 1.29 | 10.3 | 12GB card |
| gpt-oss-20b | gpt-oss:20b |
13.8 | 1.47 | 17.1 | 24GB card |
| Gemma 4 26B-A4B | gemma4:26b |
15.9 | 1.42 | 19.1 | 24GB card |
| Qwen3.8 27B | qwen3.8:27b |
16.7 | 3.91 | 22.4 | 24GB card, tight |
| Gemma 4 31B | gemma4:31b |
18.8 | 5.66 | 26.3 | 32GB card or 36GB+ Mac |
Totals include 1.8 GB of engine overhead. On a Mac, remember macOS keeps part of unified memory for itself; our Mac VRAM optimizer shows how much the GPU can use. A 12B model fits more machines but is a weak agent; the table is about what fits, not how well each model drives Claude’s or Codex’s tools.
Problems people report
- The Claude toggle flips back to off. Issue #18073 (open) describes the toggle reverting after the restart prompt, with nothing in the logs. Update Ollama, quit Claude yourself and try again.
- Claude opens in a different account. Issue #18491 (open) reports Claude Desktop starting in the separate
Claude-3pprofile as a new account, and Disconnect not always restoring the normal one. If that happens, runollama launch claude-desktop --restore. - Slow first reply and HTTP 500 errors. Issue #19359 (closed 16 November) traced long first replies to the 17K-token prompt. Keep the model loaded and the context at 64K or more.
- Codex says a model “requires a subscription”. In issue #17352 (closed), a stuck conversation kept failing; an Ollama team member could not reproduce it, and the reporter found that starting a new Codex conversation worked.
- No toggle on Windows. Issue #18164 is open; Claude Desktop support is macOS-only for now.
Security notes
Both integrations listen only on your own machine: the Claude gateway on 127.0.0.1:11435, and the Codex route on Ollama’s server, which the source calls “loopback-only”. Keep Ollama itself on 127.0.0.1:11434 unless you mean to share it; our Ollama server guide covers that. Remember that Cowork and Codex can run commands and edit files on your Mac with a local model behind them, and with Claude’s egress list set to *, its tools can reach any site.
FAQ
Can I use Ollama models in Claude Desktop on Windows?
Not yet. Ollama’s Claude Desktop page says “Windows support coming soon”, and its launcher code allows setup only on macOS.
Do Ollama models work in ChatGPT’s normal chat?
No. They appear only in Codex mode. Regular Chat and voice keep using OpenAI.
Is this the same as Claude Code with Ollama?
No. Claude Code is the terminal tool and uses ollama launch claude; see our Claude Code with Ollama guide. This page is about the desktop apps.
Why does the model ignore my question?
Almost always context length. Claude Desktop’s opening prompt is around 17K tokens, and Ollama defaults to 4K on cards under 24 GiB. Set 64,000 and check ollama ps.
Does anything still go to Anthropic or OpenAI?
For ChatGPT, yes: native models, regular Chat and voice. For Claude, Ollama turns off both of Claude Desktop’s telemetry settings, and requests for the mapped models go to Ollama. Neither vendor documents every other background request, so we cannot say the apps make none.
Related guides and tools
- Ollama models, VRAM and run commands
- VRAM and KV cache calculator
- Claude Code with a local model on Ollama
- Cline with a local model: Ollama and LM Studio setup
- OpenCode with a local LLM
- How to run Ollama as a server and in Docker
Sources
- Ollama docs: Claude Desktop, ChatGPT Desktop and integrations overview
- Ollama docs: context length
- Ollama release notes (v0.23.0, v0.23.2, v0.24.0, v0.32.0, v0.33.0, v0.34.0, v0.40.15, v0.40.17)
- Ollama source: cmd/launch/claude_desktop.go, cmd/launch/codex_app.go, internal/proxy/codex_desktop.go
- Anthropic: Claude Desktop with an LLM gateway and configuration reference
- Ollama issues #19359, #18491, #18073, #17352, #18164
Updated 22 November 2026. Ollama’s integration docs, release notes (latest v0.40.17), source files and issues, and Anthropic’s Claude Desktop third-party configuration pages were read on that date. Memory figures come from the BFWR VRAM calculator’s formula at 64,000 tokens.
Work out what your hardware can actually run
Free calculators and directories, sized from real model weights — before you download gigabytes or order a card:

