AI coding on your own models: every app and model pairing
5 min read
Run Claude Code, OpenCode and Codex on models you choose. A table of every pairing guide: the app, the model source, local or cloud, and a link to the setup.
Claude Code, OpenCode and Codex can all run on a model you choose. The model can sit on your own machine through Ollama, LM Studio or Aventail™ Link, or with another provider through its API. This page lists every pairing guide, says where the model runs, and links to the setup.
Local means the model runs on hardware you control. Cloud means your prompts and code go to that provider's servers under its terms. Checked on 15 November 2026.
App | Model source | Local or cloud | Guide |
|---|---|---|---|
Claude Code | Ollama | Local. Ollama also offers cloud models | |
Claude Code | LM Studio | Local | Claude Code + LM Studio |
Claude Code | Aventail™ Link | Local, another machine, or an approved provider, set by rule | |
Claude Desktop | Aventail™ Link | Local, another machine, or an approved provider, set by rule | Claude Desktop with a local model |
OpenCode | Ollama | Local | |
OpenCode | LM Studio | Local | OpenCode + LM Studio |
OpenCode | Aventail™ Link | Local, another machine, or an approved provider, set by rule | |
Codex | Ollama | Local | |
Claude Code | OpenRouter | Cloud | |
Claude Code | DeepSeek API | Cloud | |
Claude Code | Z.ai GLM | Cloud | Claude Code + GLM |
Claude Code | Moonshot Kimi API | Cloud | Claude Code + Kimi |
Claude Code | MiniMax API | Cloud | Claude Code + MiniMax |
Claude Code | Google Gemini | Cloud | Claude Code + Gemini |
OpenCode | Google Gemini | Cloud | OpenCode + Gemini |
OpenCode | OpenRouter | Cloud | OpenCode + OpenRouter |
OpenCode | DeepSeek API | Cloud | OpenCode + DeepSeek |
How the pairings work
Claude Code talks to any endpoint that speaks Anthropic's Messages format. Ollama and LM Studio expose one on localhost. OpenRouter, DeepSeek, Z.ai and Moonshot expose one on their own servers. You change the base URL, and Claude Code treats the other model as its endpoint. Anthropic states that it does not support routing Claude Code to non-Claude models through any gateway, so a Claude Code update can break a pairing.
OpenCode is built to switch providers. Its configuration lists local runtimes and cloud providers side by side. Codex reaches a local model through Ollama with ollama launch codex.
Which pairing to pick
Code must stay on your machines: use a Local row, and check that the base URL is localhost.
You want a larger model than your hardware holds: use a Cloud row, and read that provider's data terms first.
A team needs both, with a record of where requests ran: use an Aventail™ Link row.
Choose a model, a tool and a team setup
Best local LLMs for coding: ten current models by memory size, with licence, context and a dated benchmark.
Local AI for a development team: laptops, a shared server or a routed mix, with sizing numbers.
OpenCode vs Claude Code: which coding tool suits your team.
Route local models and cloud APIs: rules, fallback order and how to check where a request ran.
The same pairings for a team
The guides above set up one developer's machine. A team lead also needs to know which machine sent which request where, and needs a setup that does not live in each developer's shell profile.
Aventail™ Connect configures Claude Desktop, Claude Code, OpenCode and Codex to send model requests through Aventail™ Link, the inference engine and gateway on each machine. Routing rules are set in Aventail™ Control and evaluated on the device. A request can run on the device, on another machine running Link, or with an approved provider through your own account. If no destination is permitted, the request fails with an error. Hosted Control receives device and routing events, not prompts or responses. The Free plan covers three connected devices.
Frequently asked questions
Can Claude Code run on models other than Claude?
Yes, on any endpoint that speaks Anthropic's Messages format. Anthropic does not support it.
Which pairings keep my code on my machine?
The Local rows, when the base URL is localhost and no cloud model or fallback is configured.
Is a cloud model in Claude Code my own model?
You choose it, and the provider still processes your prompts under its terms.
Do I need an Anthropic account for a local model?
No. Aventail™'s Connect path for Claude Code does not need one, and the Ollama path uses a placeholder token.
Which local model should I start with?
Qwen3.8-27B on a 32 GB machine. The full list is in best local LLMs for coding.
Related guides
Claude Code alternatives
Sources
Ollama, Claude Code, OpenCode and Codex integrations: https://docs.ollama.com/integrations/claude-code, https://docs.ollama.com/integrations/opencode, https://docs.ollama.com/integrations/codex
Ollama, Anthropic compatibility: https://docs.ollama.com/api/anthropic-compatibility
LM Studio, Claude Code: https://lmstudio.ai/docs/integrations/claude-code
OpenCode, Providers: https://opencode.ai/docs/providers
OpenRouter, Claude Code integration: https://openrouter.ai/docs/guides/guides/claude-code-integration
DeepSeek, Using the Anthropic API: https://api-docs.deepseek.com/guides/anthropic_api
Z.ai, Claude Code: https://docs.z.ai/devpack/tool/claude
Kimi API Platform, Use Kimi in Claude Code: https://platform.kimi.ai/docs/guide/claude-code-kimi
MiniMax, Claude Code with the M Plan: https://platform.minimax.io/docs/m-plan/claude-code
Anthropic, Other LLM gateways: https://code.claude.com/docs/en/llm-gateway
Aventail™, Connect overview: https://docs.aventail.co.uk/docs/connect/overview
Aventail™, Routing: https://docs.aventail.co.uk/docs/fleet/routing
Aventail™, Pricing: https://aventail.co.uk/#pricing
All sources were read on 15 November 2026.