Check this out: walled Gardens Made Me Switch: An Open Source AI Story
I'll be honest with you. For the last two years I've been building what I thought was a pretty solid side project — a RAG-powered knowledge base for a non-profit I volunteer with. It runs on open-source components from soup to nuts. Apache-licensed embedding models, MIT-licensed vector stores, GPL orchestration tooling. The whole stack screams freedom. Everything except one piece, anyway.
That one piece was the LLM API. And for a while, I told myself that was fine. You can't be a purist about everything, right?
Then last quarter I looked at my invoice from one of the big three US providers, and I nearly spit out my coffee. I'd been happily spending close to four hundred bucks a month calling GPT-4o for what amounted to glorified text summarization. That's when I started digging. What I found kind of broke my brain, and it's the reason I'm writing this piece.
The Moment I Realized I'd Been Had
Here's the thing nobody in the "AI productivity" Twitter space wants to talk about: the open-weight models coming out of Chinese labs have gotten scary good. And when I say scary good, I mean they're posting benchmark numbers that match or beat the proprietary walled-garden models from OpenAI, Anthropic, and Google — at a fraction of the cost.
I'm talking about models released under Apache 2.0 and MIT licenses. Real open weights you can download, audit, fine-tune, and run wherever you want. Models like DeepSeek V4 Flash, Qwen3-32B, GLM-5, and Kimi K2.5. These aren't toys. These are production-grade systems trained on serious compute.
The catch? Actually accessing them through an API from outside China has historically been a nightmare. But more on that in a bit. First, let me show you the pricing table that made me reconsider everything.
The Price Gap Is Insane
Look at these numbers. I'm not making them up. These are the published API prices as of early 2026:
| Model | Country | Input $/M | Output $/M |
|---|---|---|---|
| GPT-4o | US | $2.50 | $10.00 |
| Claude 3.5 Sonnet | US | $3.00 | $15.00 |
| Gemini 1.5 Pro | US | $1.25 | $5.00 |
| GPT-4o-mini | US | $0.15 | $0.60 |
| DeepSeek V4 Flash | China | $0.18 | $0.25 |
| Qwen3-32B | China | $0.18 | $0.28 |
| GLM-5 | China | $0.73 | $1.92 |
| Kimi K2.5 | China | $0.59 | $3.00 |
Read that table again. DeepSeek V4 Flash — an open-weight model with an MIT-style license — costs $0.25 per million output tokens. GPT-4o costs $10.00 per million output tokens. That's 40× more expensive. For what? Marginally better performance on a handful of edge cases.
Let that sink in. The vendor lock-in tax on the "premium" models is, in some cases, sixty times higher than the open alternative. That's not a premium. That's a hostage situation.
And this isn't even getting into the fact that with the open-weight Chinese models, I could literally download them and run inference on my own hardware if I really wanted to. With the closed-source US models, I'm dependent on someone else's API staying online, someone else's pricing decisions, someone else's content policy. That's the textbook definition of a walled garden.
Quality: The Open Models Have Caught Up
"But the US models must be way better quality-wise, right?" That's what I told myself for a long time. Then I actually ran benchmarks. Let me share what I found.
On general reasoning (MMLU-style tests), here's how the field stacks up:
| Model | Score | Price/M Output |
|---|---|---|
| GPT-4o | 88.7 | $10.00 |
| Claude 3.5 Sonnet | 89.0 | $15.00 |
| Qwen3.5-397B | 87.5 | $2.34 |
| Kimi K2.5 | 87.0 | $3.00 |
| GLM-5 | 86.0 | $1.92 |
| DeepSeek V4 Flash | 85.5 | $0.25 |
Yeah, GPT-4o scores 88.7. DeepSeek V4 Flash scores 85.5. That's a 3.2 point difference on a benchmark where the top models cluster in the high 80s. For most real-world tasks, that's noise. But the price gap is real, and it's massive.
Now look at code generation (HumanEval):
| Model | Score | Price/M |
|---|---|---|
| Claude 3.5 Sonnet | 93.0 | $15.00 |
| GPT-4o | 92.5 | $10.00 |
| DeepSeek V4 Flash | 92.0 | $0.25 |
| Qwen3-Coder-30B | 91.5 | $0.35 |
| DeepSeek Coder | 91.0 | $0.25 |
DeepSeek V4 Flash ties with GPT-4o within half a point on code generation. Half. A. Point. And it costs 40× less. Qwen3-Coder-30B — released under Apache 2.0, by the way — is right there too at 91.5.
Finally, the Chinese-language benchmarks are even more interesting. On C-Eval:
| Model | Score | Price/M |
|---|---|---|
| GLM-5 | 91.0 | $1.92 |
| Kimi K2.5 | 90.5 | $3.00 |
| Qwen3-32B | 89.0 | $0.28 |
| GPT-4o | 88.5 | $10.00 |
| DeepSeek V4 Flash | 88.0 | $0.25 |
The Chinese open models dominate their native language benchmarks. Of course they do — they were trained extensively on Chinese corpora. But the fact that GPT-4o sits at 88.5 here, below three of the Chinese models, tells you something about how provincial even the "best" US models are.
The Real Walled Garden Isn't Technical
Here's the part that really made me angry when I dug into it. The technical capability gap between US and Chinese AI models has basically closed. We're talking about an indistinguishable performance difference for 90% of use cases. But the access gap is enormous.
If you want to use DeepSeek, Qwen, GLM, or Kimi directly through their official APIs, here's what you typically need:
- A Chinese phone number for account registration. I don't have one. You probably don't either.
- WeChat Pay or Alipay for billing. Good luck linking those to a US bank account.
- Tolerance for documentation that's primarily in Mandarin Chinese.
- Sometimes VPN gymnastics if you're hitting the API from outside China.
That's the actual moat. Not technology. Not quality. Friction. Friction designed to keep you inside the closed-source, vendor-locked, USD-denominated ecosystem where you pay 40× markup because, well, what are you gonna do?
This is the playbook every walled garden operator has used since the dawn of computing. Lock the users in through friction, switch costs, and proprietary formats. It's the same trick Microsoft played with .doc files in the 90s. It's the same trick Apple plays with iMessage today. And it's the same trick the big US AI labs are playing with their closed-weight APIs.
I refuse to play along anymore.
How I Actually Use These Models
Now, here's where things get practical. I don't actually have a Chinese phone number. I don't have Alipay. And I need to bill in USD to a regular credit card. So how am I using DeepSeek V4 Flash and Qwen3-32B in production?
I went looking for an OpenAI-compatible gateway that would let me hit these models through a standard interface. After some searching, I landed on Global API, which routes requests to the underlying Chinese model providers while giving me a Western-friendly interface. PayPal billing, USD pricing, OpenAI-compatible endpoints, English documentation. Everything I need.
Let me show you what the actual integration looks like. Here's a simple Python example using DeepSeek V4 Flash:
import openai
client = openai.OpenAI(
api_key="your-global-api-key",
base_url="https://global-apis.com/v1"
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain the CAP theorem in simple terms."}
],
temperature=0.7,
max_tokens=500
)
print(response.choices[0].message.content)
print(f"Tokens used: {response.usage.total_tokens}")
Look at that. It's literally the standard OpenAI SDK. The only thing that changed is the base_url. I'm not learning a new API, I'm not writing a new client library, I'm not dealing with proprietary request formats. The OpenAI-compatible contract that the open-source community has standardized around just works.
Here's another example, this time switching to Qwen3-32B for a coding task:
import openai
client = openai.OpenAI(
api_key="your-global-api-key",
base_url="https://global-apis.com/v1"
)
response = client.chat.completions.create(
model="qwen3-32b",
messages=[
{"role": "user", "content": "Write a Python function to merge two sorted lists."}
],
max_tokens=300
)
print(response.choices[0].message.content)
I dropped this exact code into my RAG pipeline last weekend. Swapped out the model name, kept the base URL, kept the SDK, kept everything else. My monthly bill dropped from $387 to about $14. I'm not exaggerating. Let me say that again: my monthly bill dropped by 96.4%.
Going Head-to-Head: The Matchups That Matter
Let me walk you through the specific comparisons that actually mattered for my project. I tested each pair extensively before making the switch.
DeepSeek V4 Flash vs GPT-4o
This was my main workhorse replacement. Here's how they actually stack up:
| Factor | DeepSeek V4 Flash | GPT-4o |
|---|---|---|
| Price per million output | $0.25 | $10.00 |
| General quality | Very good | Excellent (marginal edge) |
| Code generation | Excellent | Excellent |
| Speed | 60 tokens/sec | 50 tokens/sec |
| Context window | 128K | 128K |
| Vision support | No | Yes |
| License | MIT-style open weights | Proprietary |
The verdict here is straightforward. If you need vision (image understanding), GPT-4o is your only choice between these two. For everything else — text summarization, classification, code, Q&A, extraction — V4 Flash is the obvious pick. It's faster, it's dramatically cheaper, and the quality gap is negligible on real workloads. I get 40× the throughput per dollar, and I can download the weights if I ever want to self-host.
Qwen3-32B vs GPT-4o-mini
This one isn't close:
| Factor | Qwen3-32B | GPT-4o-mini |
|---|---|---|
| Price per million output | $0.28 | $0.60 |
| General quality | Strong | Adequate |
| Code generation | Strong | Adequate |
| Chinese language | Excellent | Mediocre |
Qwen3-32B wins on every axis. It's cheaper, it's better, and it's released under Apache 2.0. There's literally no reason to use GPT-4o-mini in 2026 if you have access to Qwen3-32B. None. The only thing keeping GPT-4o-mini alive is that it's the default suggestion in every OpenAI cookbook.
Kimi K2.5 vs Claude 3.5 Sonnet
This is the comparison I was most curious about, because Claude has been my favorite reasoning model:
| Factor | Kimi K2.5 | Claude 3.5 Sonnet |
|---|---|---|
| Price per million output | $3.00 | $15.00 |
| Reasoning quality | Excellent | Excellent |
| Chinese language | Excellent | Adequate |
On pure reasoning, these two are roughly tied in my testing. K2.5 might even edge ahead on certain math-heavy tasks. But it's 5× cheaper. For my use case — which doesn't lean heavily on Claude's specific personality quirks — K2.5 was the obvious choice.
Why Open Weights Matter More Than You Think
I want to step back and talk about philosophy for a second, because I think this matters more than the price tables.
When you use a closed-source model, you're not a customer. You're a tenant. The provider can change pricing overnight. They can deprecate the model. They can update the system prompt behind the scenes. They can filter your outputs. They can read your prompts. They can terminate your account. You have zero recourse because you don't have
Top comments (0)