A friend pinged me last week about an invoice. He had been testing on a model he was certain cost nothing, and his usage page showed charges. Nothing had errored. Every request returned 200. The responses were good.
He had sent glm-5.3 instead of glm-5.3-free.
One suffix. Not a typo in the usual sense — both strings are valid model IDs. They just point at two different entries with two different prices, and the one without the suffix is the expensive one.
The short version
Three text models are at zero cost through December 9, served the same way as their billed siblings — no throttling, no reduced variant:
glm-5.3-freeglm-5.3-flash-freedeepseek-v4.1-flash-1017-freeCopy the IDs. Do not retype them — the version without the suffix is a different model at a different price, and nothing will warn you. There is a one-command check in the next section, and a guard you can drop into your code after that.
This is not a vendor being sneaky. It is what happens when a catalog lists a family of models and one variant is a promotional copy of another. The suffix is part of the identifier, not a label that the platform strips off. glm-5.3-free and glm-5.3 are siblings, like gpt-4o and gpt-4o-mini, except the difference is three characters at the end instead of a word in the middle — which makes it much easier to lose.
Why it fails silently
Every layer of the stack is behaving correctly:
- Your client sends a well-formed request.
- The gateway finds a model with that exact name.
- The provider serves it.
- You get a 200 and a good answer.
There is no point in that chain where "you probably meant the cheap one" is knowable. A model ID is an opaque string. The API has no idea what you intended, and guessing would be worse than not guessing.
So the failure has no signal except the invoice, which arrives later, aggregated, and without the request-level context you would need to see what happened.
The ten-second check
Most catalogs expose their rate card as JSON. If yours does, the zero-cost set is whatever reports a zero ratio — not whatever a blog post from last month says.
curl -s https://aiwave.live/api/pricing \
| jq -r '.data[] | select(.model_ratio == 0) | .model_name'
If jq isn't installed:
curl -s https://aiwave.live/api/pricing \
| python3 -c "import json,sys;print('\n'.join(m['model_name'] for m in json.load(sys.stdin)['data'] if m.get('model_ratio')==0))"
Run that before you start a session, not after. The output is your actual zero-cost list, dated today, from the same source of truth the billing system uses. Anything else — a screenshot, a tweet, this article — is a claim about the past.
Make it impossible instead of remembering it
The real fix is not discipline. People send the wrong string because the wrong string is one keystroke away and has no consequences until later. That is a design problem, and it has a code answer: check before you spend.
import os
import httpx
PRICING_URL = "https://aiwave.live/api/pricing"
def zero_cost_models() -> set[str]:
"""Model IDs currently billed at zero, straight from the rate card."""
r = httpx.get(PRICING_URL, timeout=15)
r.raise_for_status()
return {m["model_name"] for m in r.json()["data"] if m.get("model_ratio") == 0}
def pick_zero_cost(preferred: str) -> str:
"""Return `preferred` if it is at zero right now, else its promotional sibling."""
at_zero = zero_cost_models()
if preferred in at_zero:
return preferred
# Promotional variants are published as sibling IDs that extend the base name,
# so we match on prefix rather than assuming any particular spelling. Shortest
# match first: "glm-5.3-free" beats "glm-5.3-flash-free" for the base "glm-5.3".
siblings = sorted((m for m in at_zero if m.startswith(preferred + "-")), key=len)
if siblings:
return siblings[0]
raise RuntimeError(
f"{preferred} is not at zero cost right now (checked {PRICING_URL}). "
f"Currently at zero: {sorted(at_zero)}"
)
MODEL = pick_zero_cost(os.environ.get("MODEL", "glm-5.3"))
print("using", MODEL)
Two things worth noticing about this snippet.
First, it fails at startup rather than at request time. A misconfiguration that raises before your first call is a five-second fix; the same misconfiguration discovered on an invoice is a support ticket.
Second, it reads the catalog instead of hardcoding. Hardcoded model lists rot. The one in this article will be wrong eventually — that is not a flaw in the article, it is the nature of a rate card. The code that reads the rate card stays correct.
The other half of the habit: log what you actually sent
Even with a guard, print the resolved model next to each response during development:
resp = client.chat.completions.create(model=MODEL, messages=[...])
print(MODEL, "->", resp.model, resp.usage)
Some gateways echo back a normalized model name, which is exactly the information you need when something costs more than you expected. Half of "but I set it to the cheap one" bugs end here, because the log shows what the client sent, not what you remember typing.
What "zero cost" can mean, and why it matters
Worth being precise, because the same word gets used for three different arrangements:
- Open weights. You download the model and run it on your own hardware. You pay in electricity and latency.
- Quota-limited access. A number of requests per minute or per day, then it either stops or starts billing.
- Promotional zero rate. The model is served normally and the rate is zero for a window.
These have very different operational consequences. The check above measures the third one: a model_ratio of zero on a model that is otherwise billed. It usually has an end date, and when the window closes the price comes back without an announcement.
So if you are running anything against a promotional model, the guard in the previous section is not optional. It is the thing that stops a demo from quietly turning into a line item.
The three IDs in the box at the top are on the default group, so a new account uses them without any plan change or upgrade — the only thing that decides the rate is the exact string you send. If you want to poke at it, signup is at aiwave.live and takes about a minute.
One last thing, and it is the reason I wrote this rather than just fixing my friend's config: run the curl above yourself before you trust any list, including the one in this article. The date in the sentence will be wrong soon. The command will not.
Full disclosure: I work on the endpoint linked in this article. The pattern described applies to any provider that lists model families with tier suffixes, which is most of them.
Top comments (0)