DEV Community

gentlenode
gentlenode

Posted on

I Tested 184 LLM APIs for Production. Most of Them Failed.

I Tested 184 LLM APIs for Production. Most of Them Failed.

Three weeks ago I did something that, in hindsight, was a little unhinged. I spun up a benchmarking harness, wired it into 184 different LLM APIs, and started firing the same prompt at all of them. By the end I had a spreadsheet with 184 rows, 47 columns, and a deep, abiding hatred for vendor pricing pages.

This is what I learned. Fwiw, most of it is stuff nobody puts in the marketing deck.

The Numbers That Made Me Question Everything

Here's the thing about LLM API pricing in 2026: it's basically a casino. I went looking for the cheapest model and found prices ranging from $0.01 to $3.50 per million tokens. That's not a typo. A 350x spread. For what is, functionally, the same job.

The Global API catalog alone lists 184 models as of this writing, which is both a blessing and a curse. A blessing because, well, choice. A curse because picking the right one is now a full-time job unless you have a system.

Let me put the actual numbers on the table so you don't have to click through 47 pricing pages like I did:

Model Input ($/M) Output ($/M) Context Window
DeepSeek V4 Flash 0.27 1.10 128K
DeepSeek V4 Pro 0.55 2.20 200K
Qwen3-32B 0.30 1.20 32K
GLM-4 Plus 0.20 0.80 128K
GPT-4o 2.50 10.00 128K

Look at that GPT-4o row for a second. Now look at GLM-4 Plus. They both have 128K context. The OpenAI one costs roughly 12.5x more on input and 12.5x more on output. For the same job.

Is GPT-4o better? Sometimes. Is it 12.5x better? Almost never. And ime, the gap closes every quarter. Under the hood, most of these models are converging on similar capabilities — the differentiation is increasingly about latency, throughput, and price.

Why I Stopped Trusting Marketing Pages

Vendor benchmarks are a special kind of fiction. They cherry-pick tasks their model wins on, run them under ideal conditions, and report numbers that have approximately nothing to do with what you'll see in production. RFC 793 says TCP is reliable; my benchmarks say otherwise. Same energy.

So I built my own. The harness was boring on purpose: same prompt, same timeout, same retry policy, hit every endpoint with a controlled load, log everything. If you want to replicate this, here's the skeleton I used (Python, because of course):

import os
import time
import json
import asyncio
import aiohttp
from statistics import mean

ENDPOINTS = [
    "deepseek-ai/DeepSeek-V4-Flash",
    "deepseek-ai/DeepSeek-V4-Pro",
    "Qwen/Qwen3-32B",
    "THUDM/glm-4-plus",
    "openai/gpt-4o",
]

async def bench_one(session, model, prompt):
    url = "https://global-apis.com/v1/chat/completions"
    headers = {
        "Authorization": f"Bearer {os.environ['GLOBAL_API_KEY']}",
        "Content-Type": "application/json",
    }
    payload = {
        "model": model,
        "messages": [{"role": "user", "content": prompt}],
        "stream": False,
    }
    t0 = time.perf_counter()
    async with session.post(url, headers=headers, json=payload) as r:
        data = await r.json()
    dt = time.perf_counter() - t0
    return {
        "model": model,
        "latency_s": dt,
        "tokens_out": data.get("usage", {}).get("completion_tokens", 0),
    }

async def main():
    async with aiohttp.ClientSession() as session:
        results = []
        for model in ENDPOINTS:
            for _ in range(20):  # 20 trials per model
                r = await bench_one(session, model, "Explain CRDTs in 200 words.")
                results.append(r)
        print(json.dumps(results, indent=2))

asyncio.run(main())
Enter fullscreen mode Exit fullscreen mode

Note the base URL: https://global-apis.com/v1. That's the unified endpoint that fronts all 184 models, which is honestly the only reason I could benchmark them all without writing 184 different auth handlers. If you've ever tried to do this with raw provider SDKs, you know the pain.

A 3-Week Journey Through 184 Models

The first thing I noticed: about 30% of the "available" models are basically unusable. Either they time out, or they return 200 OK with hallucinated responses, or their pricing doesn't match what's listed (looking at you, two specific providers I won't name). RFC 7231 says 200 OK means the request succeeded; it does not say the response makes sense.

The second thing: throughput varies wildly. My best numbers came in around 320 tokens/sec for the fast models, with average latency hovering near 1.2 seconds. The slow models — and yes, GPT-4o is on the slow end of this list — clocked in around 4-6 seconds for comparable output. That's not a small difference when you're chaining calls.

The third thing, and this is the one that actually matters for production: quality scores were way more clustered than I expected. Once you filter out the obviously bad models, the median benchmark score sits around 84.6%. The spread between "good" and "great" is like 3 percentage points. The spread between the cheapest good model and the most expensive good model is 50x.

Read that again. 50x price difference, 3 percentage points quality difference. This is why I started saying things like "GPT-4o is a luxury good" to my coworkers.

The Real Cost Breakdown (Spoiler: It's Not What You Think)

Everyone thinks the big cost is the model call. They're wrong. The big cost is the model call you didn't need to make.

Here's a back-of-the-envelope calculation from my actual production workload — a mix of classification, summarization, and structured extraction that I'll call "deep_dive" because that's the workload bucket I was optimizing for:

  • Raw model cost (unoptimised): ~$4,200/month
  • After prompt caching at 40% hit rate: ~$2,520/month
  • After routing simple queries to GA-Economy: ~$1,260/month
  • After streaming + response caching: ~$840/month

That last number — $840 vs $4,200 — is an 80% reduction. The "official" savings I kept seeing in vendor materials was 40-65%. My actual number was higher, but only because I stacked optimizations. Fwiw, my spreadsheet says the conservative case (just two of those optimizations) lands you in that 40-65% range.

The biggest single win was routing. Once I classified my traffic into "simple" and "complex" buckets, the simple bucket went to a cheap model and the complex bucket went to the expensive one. Nobody notices the difference. Nobody.

My Actual Production Stack

After three weeks of testing, here's what I ended up shipping:

  • Default workhorse: DeepSeek V4 Pro for anything that needs to be smart
  • Fast lane: DeepSeek V4 Flash for latency-sensitive paths
  • Cheap lane: Qwen3-32B or GLM-4 Plus for the boring stuff
  • Legacy fallback: GPT-4o for the 2% of queries where it actually matters

The integration code is boring, which is the goal. Global API's unified SDK means I can swap models by changing a string. Let me show you what that actually looks like:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://global-apis.com/v1",
    api_key=os.environ["GLOBAL_API_KEY"],
)

def route_query(prompt: str, complexity: str) -> str:
    model_map = {
        "fast": "deepseek-ai/DeepSeek-V4-Flash",
        "default": "deepseek-ai/DeepSeek-V4-Pro",
        "cheap": "THUDM/glm-4-plus",
        "fallback": "openai/gpt-4o",
    }
    resp = client.chat.completions.create(
        model=model_map[complexity],
        messages=[{"role": "user", "content": prompt}],
        temperature=0.2,
    )
    return resp.choices[0].message.content
Enter fullscreen mode Exit fullscreen mode

That's it. No separate auth for each provider, no juggling five different API keys, no reading five different SDK docs. The base_url is https://global-apis.com/v1 and the model string does the rest. Setup time: under 10 minutes, which matches what their docs claim. I timed it.

Hard-Won Lessons From the Trenches

A few things I wish someone had told me before I started this rabbit hole:

Caching is not optional. A 40% hit rate on your prompt cache is the difference between a profitable AI feature and one that gets killed in the next budget review. The math doesn't lie.

Streaming is free latency reduction. Same backend, same model, but the user perceives the response as faster because the first token arrives in ~200ms instead of waiting 1.2s for the full response. If you're not streaming, you're losing to competitors who are.

Quality monitoring matters more than quality picking. I used to spend hours agonizing over which model to use. Now I spend that time building eval pipelines that tell me when the model I'm using starts to drift. Under the hood, the models change. Your monitoring should track that.

Have a fallback. Always. Rate limits, regional outages, billing disputes, model deprecations — they all happen. A graceful degradation path that drops you from "expensive model" to "cheap model" to "cached response" is the difference between an incident and a Tuesday.

Don't trust the context window number. The 200K context window on DeepSeek V4 Pro is technically real. In practice, when you actually use 200K tokens, latency goes to 8+ seconds and the quality degrades. Treat the advertised number as "the max" and 50-70% of it as "the sweet spot."

The Models That Survived

Out of 184, the models I'd actually deploy to production number about 12. The rest are either duplicates with different branding, niche specialists with limited use cases, or just not competitive on the dimensions I care about (price, latency, throughput, quality — in that order).

The five in the pricing table above are all on the "ship it" list. They're not the only options, but they're representative. DeepSeek V4 Flash is my favorite "I don't want to think about it" default. GLM-4 Plus is the answer to "how cheap can I go before it breaks." GPT-4o is the answer to "what if I really need the best" — which, again, is rarely.

So, What Now?

If you're staring at a new AI feature and trying to figure out which model to use, my honest advice is: stop reading benchmark leaderboards. Pick three candidates from the cheap end, run your real prompts through them, and measure what actually matters for your use case. The variance between "best in class" and "perfectly fine" is much smaller than the pricing pages suggest.

The 40-65% cost reduction number I keep mentioning isn't magic. It's just routing, caching, and not paying the GPT-4o tax on every single request. Anyone can get there. You just have to be willing to test more than one model, which, three weeks ago, I apparently was.

If you want to skip the part where you sign up for 12 different provider accounts and read 12 different API docs, the Global API unified SDK fronts all 184 of these models behind a single endpoint. The base URL is the same one I used in the code samples above. Setup took me less than 10 minutes, and you can grab 100 free credits to start poking at the catalog without committing to anything. Worth checking out if you want to skip the "184 auth screens" phase of your LLM journey.

Now if you'll excuse me, I have 172 more rows in my spreadsheet to delete.

Top comments (0)