ai newsDi., 27. Okt.
EilmeldungSpace X: Vereinbarung zur Finanzierung von KI-Chips über 40 Milliarden US-Dollar

One API key, two GLM models: what routing easy steps to GLM-5.3-Flash does to the bill (prices checked 2026-10-27)

This is IteraCompute, so treat this as a disclosed write-up from one provider, not a neutral ranking. Every price below is a list price in USD per 1M tokens, checked on 2026-10-27 from the providers' pricing pages or OpenRouter's endpoint list. Prices change often, so check them again before you co

dev.toDienstag 03:30 · 27.10.2 Min. Lesezeit
Bild: dev.to

This is IteraCompute, so treat this as a disclosed write-up from one provider, not a neutral ranking. Every price below is a list price in USD per 1M tokens, checked on 2026-10-27 from the providers' pricing pages or OpenRouter's endpoint list. Prices change often, so check them again before you commit.

Most agent loops are made of a few hard steps (planning, writing the actual patch, the final answer) and many easy ones (classifying the request, summarising a file or tool output, extracting fields, checking formats, writing commit messages). If every step goes to GLM-5.3, you pay GLM-5.3 prices for the easy work too.

GLM-5.3-Flash is roughly a tenth of the price of GLM-5.3. If the endpoint is OpenAI-compatible and both models sit behind the same key, routing is one field:

from openai import OpenAI client = OpenAI ( base_url = " https://api.iteracompute.com/v1 ", api_key = " YOUR_KEY " ) EASY = { " classify ", " summarize_tool_output ", " extract ", " commit_message " } def run ( step: str, messages: list [ dict ]) -> str: model = " z-ai/glm-5.3-flash " if step in EASY else " z-ai/glm-5.3 " r = client. chat. completions. create ( model = model, messages = messages ) return r. choices [ 0 ]. message. content Enter fullscreen mode Exit fullscreen mode The same pattern works with any OpenAI-compatible provider that serves both models. What changes is the bill.

Sail Research and Near AI are the cheapest standard (no promo) endpoints that declare fp8 for each model. One exception: at 0% cache hit, AkashML (fp8, 0.19 / 0.19 / 4.40) is a little cheaper than Sail for GLM-5.3, which would make that row $28.00 instead of $30.10 in the first table.

Workload assumption: 70% of tokens go to the cheap model and 30% to GLM-5.3, with the same 10:1 input-to-output ratio on both. Cache-hit rate is the share of input tokens billed at the cached price.

If you want to check our prices for all models on one page, they're on the IteraCompute pricing page. Model IDs are z-ai/glm-5.3, z-ai/glm-5.3-flash and deepseek/deepseek-v4.1-flash on an OpenAI-compatible endpoint.

Quelle: dev.to (dev.to). Original öffnen