---
type: concept
title: "Provider Independence"
description: "Architecting agents so the underlying model, framework, or client can be swapped without a rewrite, avoiding lock-in through low-level abstractions."
tags: [portability, abstraction, lock-in, model-swapping, open-models, llama]
videos: [pydantic-ai-20-the-new-best-way-to-build-ai-agents-is-composing-capabilities, i-love-the-karpathy-llm-wiki-but-it-doesnt-scale-heres-what-does, the-creators-of-claude-code-and-openclaw-dont-prompt-their-agents-anymore, omnigent-the-new-meta-harness-for-every-coding-agent-claude-code-codex-pi-more, claude-plans-gemini-designs-the-workflow-to-build-beautiful-frontends, pi-coding-agent-archon-build-any-ai-coding-workflow-no-claude-code-bloat, im-building-an-ai-dark-factory-that-ships-its-own-code-public-experiment, coding-agent-reliability-explodes-when-they-argue-new-adversarial-dev-technique, everything-you-thought-about-building-ai-agents-is-wrong, i-built-a-safer-openclaw-alternative-using-claude-code, claude-skills-arent-just-for-claude-heres-how-to-build-them-for-any-agent, i-forced-claude-to-code-for-24-hours-nonstop-heres-what-happened, github-is-the-future-of-ai-coding-heres-why, learn-90-of-building-ai-agents-in-30-minutes, super-special-livestream-this-weekend-live-ai-agent-build, claude-code-web-just-dropped-but-i-already-built-something-better-with-codex, claude-codes-real-purpose-its-bigger-than-you-think, build-your-first-voice-ai-agent-in-20-minutes-with-livekit-open-source, this-new-protocol-will-change-ai-coding-forever-acp, a-complete-guide-to-claude-code-here-are-all-the-best-strategies, context-engineering-101-the-simple-strategy-to-100x-ai-coding, the-ultimate-guide-to-local-ai-and-ai-agents-the-future-is-here, ive-been-holding-back-on-youtube-but-not-anymore, ag-ui-just-released-the-new-wave-of-ai-agent-apps, the-mcp-integration-everyone-is-sleeping-on-mcp-custom-ai-agents, openais-brand-new-agents-sdk-crash-course, this-is-hands-down-the-best-way-to-build-ai-agents, pydantic-ai-deepseek-v3-the-best-ai-agent-combo, boltdiy-the-future-of-open-source-ai-coding-whats-next, i-created-the-best-ai-agent-platform-in-just-2-months, how-to-use-boltnew-for-free-with-local-llms-and-no-rate-limits, were-taking-this-ai-coding-assistant-to-the-moon-plus-installation-instructions, ollama-openais-swarm-easily-run-ai-agents-locally, this-boltnew-fork-is-exploding-dont-miss-out-on-whats-happening, im-building-the-best-open-source-ai-coding-assistant-with-your-help, openais-swarm-a-game-changer-for-ai-agents, i-forked-boltnew-and-made-it-way-better, llama-32-is-insane-but-does-it-beat-gpt-as-an-ai-agent, the-hard-truth-about-hosting-your-own-llms, dont-sleep-on-the-ultimate-ai-agent-combo-n8n-langchain-python, openais-o1-is-barely-usable-but-i-fixed-it, the-secret-sauce-for-simple-powerful-ai-apps-ai-agents-masterclass-2]
created: 2026-07-21
updated: 2026-07-21
---

# Provider Independence

Provider independence is architecting an agent so the model, framework, or client underneath can be swapped without a rewrite. Cole states the imperative directly: "You don't want to be stuck with just one model or provider for your entire AI coding workflow. It's just not the best way to do things these days," and the personal design goal is "I want to be very LLM agnostic." The urgency is the pace of the field: "I see so many people get super married to using specific tools... that is so dangerous because of how fast the AI landscape is evolving," since "you never know when that tool is going to become irrelevant." The durable investment is not the tool but the surrounding system: "Building a system that can scale that can work with any tools that you have."

At the model layer, the mechanism is almost trivial: the OpenAI chat-completions API is a de facto standard, so "the only thing we have to do to connect to Ollama instead of OpenAI is change this base URL." Frameworks like [Pydantic AI](../entities/tools/pydantic-ai.md) reduce a swap to "just changing this line or just changing my environment variable... A single line change. I can swap to any model I want like Gemini or DeepSeek or OpenAI." This is why Cole favors low-level abstractions (see [Abstraction Distraction](./abstraction-distraction.md) and the [SDK vs. Framework decision](./sdk-vs-framework-decision.md)): "they are a lowlevel abstraction... they don't try to do too much for you so you have to write more code but then you get that full control and customizability," including "being able to store the message history yourself." The recurring subtext across the Bolt.diy fork saga is the same fix applied to a coding tool that shipped locked to one model.

At the harness layer, independence means the [AI layer](./the-ai-layer.md) and workflows outlive the agent running them. Because commands and [skills](./skills.md) are just prompt files, "I could very easily take this repository, swap out Claude Code for Codex, and then still use the exact same harness because it is just those artifact files," and a slash command "can just be a prompt for any other AI coding assistant besides Claude Code." The result is deliberate mixing: "All of the top engineers right now, they're not relying on a single model or even a single harness... because we want to lean on the different strengths of the different AI coding assistants," e.g. Claude as implementer and Codex as evaluator, or Opus planning while Gemini designs. A strong harness even lifts a cheaper model: driving everything with Pi on Kimi still yields "really good results because of the harness that I built here that elevates the model." Emerging standards generalize the pattern: the [Agent Client Protocol](./agent-client-protocol.md) lets you "move between these code editors... try different ones seamlessly," and AG-UI decouples front ends so "you're not just limited to using OpenAI."

## Builds on

- [Abstraction Distraction](./abstraction-distraction.md) and [SDK vs. Framework Decision](./sdk-vs-framework-decision.md) - low-level abstractions are what preserve the freedom to swap.

## Related

- [Model Selection](./model-selection.md) - independence makes picking the best model per task cheap.
- [AI Coding Harness](./ai-coding-harness.md) and [The AI Layer](./the-ai-layer.md) - portable artifacts that outlive any single agent.
- [Slash Commands](./slash-commands.md) and [Tool Use](./tool-use.md) - prompt files and tool adapters that carry across assistants.
- [Local & Self-Hosted AI](./local-ai.md) - OpenAI-compatible base URLs make local a drop-in provider.
- [Agent Client Protocol (ACP)](./agent-client-protocol.md) and [Generative UI](./generative-ui.md) - protocols (ACP, AG-UI) that standardize swapping editors and front ends.
- [Agentic Workflow Engineering](./agentic-workflow-engineering.md), [Global Rules](./global-rules.md), [Agent Deployment](./agent-deployment.md) - where portability pays off across the lifecycle.
- [Self-Hosting Cost Crossover](./self-hosting-cost-crossover.md) - The napkin-math point where monthly per-token spend exceeds a fixed cloud-GPU bill, which is exactly when self-hosting an open model starts paying for itself.
- [Coding-Agent Bloat](./coding-agent-bloat.md) - The critique that feature-maxed coding tools accumulate bugs, heavy token usage, and an uncontrollable, constantly-shifting system prompt that degrades and obscures results, arguing for minimal, moldable foundations instead.
- [Meta-Harness](./meta-harness.md) - A layer above individual AI coding assistants that orchestrates many of them together on larger tasks, distinct from a single-agent harness.
- [Long-Running Agents](./long-running-agents.md) - Coding agents that run autonomously for hours or days as background tasks, chaining dozens of fresh-context sessions through shared artifact files to produce a working proof of concept before a human takes over.
- [LLM Data Privacy Tiers](./llm-data-privacy-tiers.md) - The privacy ladder from closed models that may train on your data, to hosted open-model providers, to true self-hosting - and using mock data until you reach the tier your workload requires.
- [Local vs. Cloud Decision Framework](./local-vs-cloud-decision-framework.md) - A four-question decision tree (POC or production? sensitive data? frontier-model capability needed? scaling past ~1,000 users?) that decides whether an AI stack should be self-hosted or run on managed services, instead of treating local-vs-cloud as a dogmatic all-or-nothing rule.

## Tools

- [Pydantic AI](../entities/tools/pydantic-ai.md), [LangChain](../entities/tools/langchain.md), [LangGraph](../entities/tools/langgraph.md) - low-level frameworks built for model swapping.
- [Ollama](../entities/tools/ollama.md) and [OpenRouter](../entities/tools/openrouter.md) - OpenAI-compatible gateways to local and hosted models; [Llama](../entities/tools/llama.md) and [Gemini](../entities/tools/gemini.md) as swap targets.
- [Claude Code](../entities/tools/claude-code.md) and the [Claude Agent SDK](../entities/tools/claude-agent-sdk.md), [Codex](../entities/tools/codex.md), [Pi Coding Agent](../entities/tools/pi-coding-agent.md), [OpenClaw](../entities/tools/openclaw.md) - interchangeable harnesses over the same artifact files.
- [OpenAI Agents SDK](../entities/tools/openai-agents-sdk.md), [OpenAI Swarm](../entities/tools/openai-swarm.md), [AG-UI](../entities/tools/ag-ui.md), [bolt.diy](../entities/tools/bolt-diy.md) - SDKs and forks that expose provider choice.
- [Gemini 3.5 Flash](../entities/tools/gemini-3-5-flash.md) - Google's cheap, fast LLM that builds unusually beautiful, handcrafted-looking frontends; the design half of Cole's provider-mixing workflow, paired with Opus 4.8 for planning and integrations.
- [Zed](../entities/tools/zed.md) - A free, open-source code editor from the team that created the Agent Client Protocol, shipping the first beta ACP implementation with native Gemini CLI and adapter-based Claude Code support.

## Sources

- [I've Been Holding Back on YouTube... But Not Anymore](../sources/ive-been-holding-back-on-youtube-but-not-anymore.md) - "[0:05:18] I see so many people get super married to using specific tools... that is so dangerous because of how fast the AI landscape is evolving."
- [Omnigent: The New Meta-Harness for EVERY Coding Agent](../sources/omnigent-the-new-meta-harness-for-every-coding-agent-claude-code-codex-pi-more.md) - "[0:14:15] You don't want to be stuck with just one model or provider for your entire AI coding workflow. It's just not the best way to do things these days."
- [Learn 90% of Building AI Agents in 30 Minutes](../sources/learn-90-of-building-ai-agents-in-30-minutes.md) - "[0:05:38] just changing this line or just changing my environment variable here. A single line change. I can swap to any model I want like Gemini or DeepSeek or OpenAI"
- [The Ultimate Guide to Local AI and AI Agents](../sources/the-ultimate-guide-to-local-ai-and-ai-agents-the-future-is-here.md) - "[0:44:00] the only thing we have to do to connect to Ollama instead of OpenAI is change this base URL"
- [I Forced Claude to Code for 24 Hours NONSTOP](../sources/i-forced-claude-to-code-for-24-hours-nonstop-heres-what-happened.md) - "[0:08:27] I could very easily take this repository, swap out Claude Code for Codex, and then still use the exact same harness because it is just those artifact files."
- [The Creators of Claude Code and OpenClaw don't Prompt Their Agents Anymore?!](../sources/the-creators-of-claude-code-and-openclaw-dont-prompt-their-agents-anymore.md) - "[0:19:19] I'm still getting really good results because of the harness that I built here that elevates the model."
- [Coding Agent Reliability EXPLODES When They Argue](../sources/coding-agent-reliability-explodes-when-they-argue-new-adversarial-dev-technique.md) - "[0:09:21] we don't have to stick to Anthropic just because we're taking inspiration from an Anthropic article."
- [OpenAI's BRAND NEW Agents SDK (Crash Course)](../sources/openais-brand-new-agents-sdk-crash-course.md) - "[0:27:35] they are a lowlevel abstraction... they don't try to do too much for you so you have to write more code but then you get that full control and customizability"
- [Everything You Thought About Building AI Agents is Wrong](../sources/everything-you-thought-about-building-ai-agents-is-wrong.md) - "[0:08:20] For a lot of these production agents where you need a lot of observability and control, like being able to store the message history yourself... you can't be using something like the Claude Agent SDK"
- [Pydantic AI + DeepSeek V3 - The BEST AI Agent Combo](../sources/pydantic-ai-deepseek-v3-the-best-ai-agent-combo.md) - "[0:12:03] you could change llm model to be Gemini or Claude or Qwen or Mistral whatever you want you can set that super easily here and it's going to work instantly no matter the model"
- [Context Engineering 101 - The Simple Strategy to 100x AI Coding](../sources/context-engineering-101-the-simple-strategy-to-100x-ai-coding.md) - "[0:19:03] you can use this whole process with the Gemini CLI or Cursor or Windsurf... you can just take these slash commands and then use them as regular prompts."
- [This New Protocol Will Change AI Coding Forever (ACP)](../sources/this-new-protocol-will-change-ai-coding-forever-acp.md) - "[0:01:55] we want to move between these code editors and try different ones seamlessly. And that's what ACP gives us."
- [AG-UI Just Released: The NEW WAVE of AI Agent Apps](../sources/ag-ui-just-released-the-new-wave-of-ai-agent-apps.md) - "[0:13:02] you're not just limited to using OpenAI. Like you could use any LLM, any framework that you want, as long as you are emitting these standard events"
- [I Built a Safer OpenClaw Alternative Using Claude Code](../sources/i-built-a-safer-openclaw-alternative-using-claude-code.md) - "[0:10:18] if we're using Claude Code and the Claude Agent SDK ourself directly... then it's totally allowed even if you deploy it to a VPS."
- [Claude Skills Aren't Just for Claude](../sources/claude-skills-arent-just-for-claude-heres-how-to-build-them-for-any-agent.md) - "[0:02:36] the concept here is going to work no matter what tool you end up using like LangChain, CrewAI, Eggno, no framework at all, literally anything that you want."
- [I'm Building an AI Dark Factory That Ships Its Own Code](../sources/im-building-an-ai-dark-factory-that-ships-its-own-code-public-experiment.md) - "[0:16:22] Claude Code you... can use environment variables to route it to other providers like GLM, miniax, OpenRouter"
- [Ollama + OpenAI's Swarm - EASILY Run AI Agents Locally](../sources/ollama-openais-swarm-easily-run-ai-agents-locally.md) - "[0:06:31] you pass in a new client point it to AMA and that is it you are now good to go that is literally the only change we have to do"
- [Llama 3.2 is INSANE - But Does it Beat GPT as an AI Agent?](../sources/llama-32-is-insane-but-does-it-beat-gpt-as-an-ai-agent.md) - "[0:03:43] you don't have to change any code to go from Groq to Anthropic or Anthropic to OpenAI it is so so easy"
- [I Forked Bolt.new and Made it WAY Better](../sources/i-forked-boltnew-and-made-it-way-better.md) - "[0:00:59] with bolt. new you don't get to pick the llm that you use it is always Claude 3.5 Sonnet... but what if I want to use GPT or... a local llm that is fine-tuned for coding"
- [Pydantic AI 2.0: The New Best Way to Build AI Agents](../sources/pydantic-ai-20-the-new-best-way-to-build-ai-agents-is-composing-capabilities.md) - "[0:14:23] when you want to deploy an agent to production... you can't just lean on those coding agent SDKs or something like Hermes or OpenClaw. You need a framework."
- [Claude Plans, Gemini Designs: The Workflow to Build BEAUTIFUL Frontends](../sources/claude-plans-gemini-designs-the-workflow-to-build-beautiful-frontends.md) - "[0:02:18] mixing providers for the sake of cost and because we're leaning on the strengths for different parts of our workflow."
- [Pi Coding Agent + Archon](../sources/pi-coding-agent-archon-build-any-ai-coding-workflow-no-claude-code-bloat.md) - "[0:11:39] in Archon we can mix providers between different nodes. A lot of people love using Claude for implementation, then Codex for validation or here we're using Pi for planning."
- [Claude Code Web JUST Dropped but I Already Built Something BETTER (with Codex!)](../sources/claude-code-web-just-dropped-but-i-already-built-something-better-with-codex.md) - "[0:02:04] we're not reliant on Claude Code for any of these freaking awesome things we can build"
- [Build Your First Voice AI Agent in 20 Minutes with LiveKit](../sources/build-your-first-voice-ai-agent-in-20-minutes-with-livekit-open-source.md) - "[0:14:08] you can also self-host because LiveKit is free open source. You can run all of the infrastructure if you want complete control for your voice agents."
- [This is Hands Down the BEST Way to Build AI Agents](../sources/this-is-hands-down-the-best-way-to-build-ai-agents.md) - "[0:26:18] it's going to be an OpenAI model but we're going to override the base URL which is how we can use a local llm or not"
- [The MCP Integration EVERYONE is Sleeping On](../sources/the-mcp-integration-everyone-is-sleeping-on-mcp-custom-ai-agents.md) - "[0:00:53] what I'm going to show you how to do is going to apply no matter your framework and even if you don't want to use one at all"
- [I Love the Karpathy LLM Wiki but it Doesn't Scale](../sources/i-love-the-karpathy-llm-wiki-but-it-doesnt-scale-heres-what-does.md) - "[0:04:13] these ideas apply to any system you're going to create for a production agent."
- [A Complete Guide to Claude Code](../sources/a-complete-guide-to-claude-code-here-are-all-the-best-strategies.md)
- [Claude Code's Real Purpose (It's Bigger Than You Think)](../sources/claude-codes-real-purpose-its-bigger-than-you-think.md)
- [GitHub is the Future of AI Coding (Here's Why)](../sources/github-is-the-future-of-ai-coding-heres-why.md)
- [Super Special Livestream this Weekend! (LIVE AI Agent Build)](../sources/super-special-livestream-this-weekend-live-ai-agent-build.md)
- [bolt.diy: The Future of Open Source AI Coding - What's Next?](../sources/boltdiy-the-future-of-open-source-ai-coding-whats-next.md)
- [I Created the BEST AI Agent Platform in Just 2 MONTHS!](../sources/i-created-the-best-ai-agent-platform-in-just-2-months.md)
- [How to Use Bolt.new for FREE with Local LLMs (And NO Rate Limits)](../sources/how-to-use-boltnew-for-free-with-local-llms-and-no-rate-limits.md)
- [We're Taking this AI Coding Assistant to the MOON](../sources/were-taking-this-ai-coding-assistant-to-the-moon-plus-installation-instructions.md)
- [This Bolt.new Fork is EXPLODING](../sources/this-boltnew-fork-is-exploding-dont-miss-out-on-whats-happening.md)
- [I'm Building the BEST Open Source AI Coding Assistant with YOUR Help](../sources/im-building-the-best-open-source-ai-coding-assistant-with-your-help.md)
- [OpenAI's Swarm - a GAME CHANGER for AI Agents](../sources/openais-swarm-a-game-changer-for-ai-agents.md)
- [The HARD Truth About Hosting Your Own LLMs](../sources/the-hard-truth-about-hosting-your-own-llms.md)
- [Don't Sleep on the ULTIMATE AI Agent Combo (n8n, LangChain, Python)](../sources/dont-sleep-on-the-ultimate-ai-agent-combo-n8n-langchain-python.md)
- [OpenAI's o1 is Barely Usable, but I Fixed it...](../sources/openais-o1-is-barely-usable-but-i-fixed-it.md)
- [The Secret Sauce for SIMPLE + POWERFUL AI Apps - AI Agents Masterclass #2](../sources/the-secret-sauce-for-simple-powerful-ai-apps-ai-agents-masterclass-2.md)
