This guide uses source checks from Sep 10, 2026. Provider and gateway prices can change; preserve the checked date with every forecast.
Why This Topic Matters Now
The useful GLM question for Tier 1 and Tier 2 teams is not simply whether a GLM route exists. The useful question is whether a GLM migration can be tested, billed, rolled back, and explained. The Sep 9 keyword report showed `glm 5 api` in the visible query set and also warned that exact third-party rows should be rechecked because official pricing pages are dynamic. That combination points to a practical topic: cached-input regression tests for GLM API migrations.
Cached input can make a GLM route attractive for repeated prompts, but it can also create false confidence when teams do not measure whether their own templates actually repeat. A migration plan should test GLM-5.1 and GLM-5 with the same redacted prompts, the same stable prefix, the same output budget, and the same receipt schema. If the route changes but the ledger cannot show cache-hit input, output, retry behavior, and checked source date, the migration is not ready for production traffic.
Source Facts Checked Today
AIWave /api/pricing checked on Sep 10, 2026 returned success=true, 63 records, pricing_version 5a90f2b86c08bd983a9a2e6d66c255f4eaef9c4bc934386d2b6ae84ef0ff1f1f, auto_groups=['default'], and public rows enabled for default, vip, and svip groups. Computed base examples per 1M text-token units were DeepSeek V4 Flash at $0.638 input, $0.020288 cache-hit input, and $1.914 output; DeepSeek V4 Pro at $1.914 input, $0.063736 cache-hit input, and $5.742 output; GLM-5.1 at $2.10 input, $0.680001 cache-hit input, and $6.60 output; GLM-5 at $1.55 input, $0.400001 cache-hit input, and $4.96 output; Kimi K3 at $4.50 input, $0.90 cache-hit input, and $22.50 output; qwen3.8-2.4t-a95b at $2.678053 input and $8.03416 output; and qwen3.7-flash-2026-07-15 at $0.267805 input and $1.071221 output. Actual invoices still depend on the account group, final route, and request receipt.
Z.AI pricing and developer documentation returned HTTP 200 during live checks on Sep 10, 2026. The current keyword report says the public pricing docs expose model families, OpenAI SDK compatibility, and pricing sections with input, cached-input, cached-storage, and output columns. Because the docs are dynamic, this article uses AIWave live rows for exact gateway examples and treats provider rows as source links to recheck before procurement.
AIWave current-state decisions D-013 through D-020 keep public content narrow: dated prices, route receipts, machine-readable evidence, trust boundaries, and current probes are acceptable; private user, revenue, call-volume, paying-customer, workload-scale, unsupported uptime, and price-war claims are not. This article follows that boundary by using route evidence instead of private operating metrics.
Planning Matrix
A source-dated planning matrix keeps the page useful for engineers and procurement reviewers. It turns a search query into an auditable route decision instead of a loose model preference.
| Test area | Evidence field | Acceptance rule |
|---|---|---|
| Stable prefix | prompt_template_version | Same prefix across baseline and candidate |
| Cache signal | cache_hit_input_tokens | Measured, not assumed |
| Output budget | max_output_tokens | Pinned by task class |
| Route identity | model and owner | GLM row is not blended with another provider |
| Retry behavior | retry_count and retry_class | Bounded and visible |
| Fallback | fallback_route | Requires explicit approval |
| Receipt | pricing_version and checked date | Stored with every run |
Implementation Pattern
The implementation pattern keeps credentials as placeholders, pins the AIWave base URL, records the model, and leaves room for route-specific controls. Production applications should move credentials into environment or secret storage.
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY_HERE", base_url="https://aiwave.live/v1")
PROMPT_PREFIX = "You are reviewing a redacted migration plan. Return risks first."
def run_glm_regression(model: str, case_id: str, task: str):
response = client.chat.completions.create(
model=model,
messages=[
{"role": "system", "content": PROMPT_PREFIX},
{"role": "user", "content": f"Case {case_id}: {task}"},
],
temperature=0.1,
max_tokens=900,
)
return {
"api_key": "YOUR_API_KEY_HERE",
"model": model,
"source_checked_at": "2026-09-10",
"pricing_version": "5a90f2b86c08bd983a9a2e6d66c255f4eaef9c4bc934386d2b6ae84ef0ff1f1f",
"usage": response.usage,
}
print(run_glm_regression("glm-5.1", "redacted-001", "compare route migration risks"))
Build a Baseline Before Switching
A GLM migration should start with a baseline set rather than a new production route. Use redacted prompts from the current workload: extraction, planning, support answer, coding review, and long-context summarization. Store the current route result, GLM candidate result, route owner, status, usage fields, and reviewer notes. A migration that improves one task while breaking another should be visible before it reaches a customer path.
Measure Cached Input Directly
Cached-input pricing is only useful when the route actually sees repeated content. Keep the system prompt, policy block, schema, and reference preamble stable across the regression set. Store prompt_template_version and cache_hit_input_tokens beside total input. If the client does not expose cache-hit fields for a route, mark the field as unavailable rather than entering zero. That distinction matters in finance reviews.
Pin Output Budgets by Task Class
GLM routes can be used for brief extraction or multi-step reasoning. Those task classes need different output ceilings. Put max_output_tokens in configuration and link it to the route receipt. If a migration increases quality by writing much longer answers, that tradeoff may still be acceptable, but it should be an explicit approval rather than a hidden spend increase.
Treat Fallback as a Release Gate
A fallback route can protect uptime but also change behavior, price, privacy review, and quality. Do not let the client silently move from GLM-5.1 to another model without writing fallback_route and fallback_reason. For agent workloads, fallback can also affect tool choices and final answer style. The migration review should include one forced-failure test that proves the fallback is visible.
Keep Provider and Gateway Rows Separate
Z.AI documentation is the direct-provider source. AIWave /api/pricing is the gateway source. They are both useful, but they answer different questions. A buyer should not paste one row into the other owner column. Keep owner, URL, checked_at, currency, unit, model name, cache definition, and route availability as separate fields in the workbook. That protects the forecast when either source changes.
Internal Links for GLM Evaluators
A GLM evaluator should move through Models docs, Chat Completions, Pricing, Status, Trust, and the GLM route-receipt guide. This article adds cached-input regression discipline so the route-receipt topic is not repeated as a generic checklist.
Procurement Review
Procurement should ask for the live AIWave row, the direct Z.AI source link, checked date, cache-hit definition, output budget, fallback policy, and one redacted receipt per accepted task class. The reviewer should also ask whether the migration changes data class or tool access. A route with good model quality can still fail procurement if cache behavior and fallback are undocumented.
Final Checklist
A GLM-5.1 migration is ready for a limited rollout when baseline and candidate runs are stored, cached input is measured, output budgets are pinned, fallback is explicit, provider and gateway rows are separated, and receipts preserve pricing_version and checked date. Recheck AIWave and Z.AI pages before wider traffic or monthly forecasts.