This guide uses source checks from Sep 9, 2026. Provider and gateway prices can change; preserve the checked date with every forecast.
Why This Topic Matters Now
Streaming is where an API migration stops being a simple endpoint swap. A non-streaming request proves that the model can answer. A streaming request proves that the client, proxy, timeout policy, usage ledger, and user interface can survive partial output. The Sep 8 keyword report included `chat completion stream` and `responses api streaming` in the visible query set, so today's article focuses on acceptance gates rather than another broad Chinese AI API overview.
Tier 1 and Tier 2 teams evaluating DeepSeek, GLM, Qwen, Kimi, or a unified AIWave route should test streaming with the same discipline they use for payments or authentication. The gate should be redacted, source-dated, and reproducible. It should capture first token time, chunk count, final status, final usage fields, retry behavior, and the exact route string. A route that works only in a notebook is not yet ready for customer chat or a coding agent queue.
Source Facts Checked Today
AIWave /api/pricing checked on Sep 9, 2026 returned success=true, 63 records, pricing_version 5a90f2b86c08bd983a9a2e6d66c255f4eaef9c4bc934386d2b6ae84ef0ff1f1f, and auto_groups=['default']. Computed public 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 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; qwen3.7-flash-2026-07-15 at $0.267805 input and $1.071221 output; and qwen3.6-35b-a3b at $0.401708 input and $2.410248 output. Account group, route, and receipt fields should be preserved with every forecast.
DeepSeek official pricing docs checked on Sep 9, 2026 returned HTTP 200 and exposed a model table for deepseek-v4-flash, deepseek-v4-pro, and deepseek-v4-flash-vision-exp with OpenAI and Anthropic base URLs, 1M context, 384K maximum output, peak and off-peak token rows, and route-level concurrency context. Those direct-provider facts are useful for migration review, but they should not be blended into AIWave gateway rows.
AIWave public status, feed.xml, llms.txt, sitemap.xml, and pricing API returned HTTP 200 on Sep 9, 2026 from a browser-style read-only check. The current-state record says public proof should stay narrow: dated prices, machine-readable pages, route receipts, trust boundaries, and current probes rather than private operating metrics or unsupported availability claims.
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.
| Gate | Evidence field | Acceptance rule |
|---|---|---|
| First chunk | first_token_ms | Within team threshold for the chosen route |
| Chunk order | sequence_id | No missing or repeated chunks |
| Finish event | finish_reason | Captured once and tied to the request id |
| Usage object | input, cache-hit input, output | Recorded after stream completion |
| Timeout | timeout_class | Stops with a clear user message |
| Retry | retry_count | Bounded and never changes route silently |
| Receipt | model, source date, pricing_version | Stored with redacted prompt metadata |
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
from time import perf_counter
client = OpenAI(api_key="YOUR_API_KEY_HERE", base_url="https://aiwave.live/v1")
started = perf_counter()
chunk_count = 0
first_token_ms = None
text_parts = []
stream = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Write a short migration checklist for a redacted chat route."}],
temperature=0.1,
max_tokens=500,
stream=True,
)
for chunk in stream:
chunk_count += 1
delta = chunk.choices[0].delta.content or ""
if delta and first_token_ms is None:
first_token_ms = round((perf_counter() - started) * 1000)
text_parts.append(delta)
print({
"api_key": "YOUR_API_KEY_HERE",
"model": "deepseek-v4-flash",
"source_checked_at": "2026-09-09",
"pricing_version": "5a90f2b86c08bd983a9a2e6d66c255f4eaef9c4bc934386d2b6ae84ef0ff1f1f",
"first_token_ms": first_token_ms,
"chunk_count": chunk_count,
"chars": len("".join(text_parts)),
})
Start With a Redacted Stream
A streaming gate should use a prompt that represents the production shape without sending private data. For a support assistant, use a synthetic question with the same length and safety rules. For a coding agent, use a redacted module map. For a procurement demo, use a short request that forces several chunks. The purpose is to test transport, client parsing, and receipt capture before the team debates model quality.
Capture the First Token Separately
First-token timing is not the same as full response time. A user interface may feel responsive while the full answer still takes a long time, and a backend worker may care more about completion than interactivity. Store both fields. The gate should label network region, route string, client library, timeout, prompt class, and checked date so a later result can be compared against the same conditions.
Preserve Usage After the Stream
Many teams lose the final usage object because they only render chunks to the screen. That makes streaming hard to govern. The acceptance wrapper should collect chunks, wait for the final event, and store input, cache-hit input when exposed, output, finish reason, and request id. If the client library does not expose usage for a stream, record that gap and decide whether a follow-up non-streaming receipt is required.
Handle Mid-Stream Failure
A mid-stream failure is different from a normal 5xx before output. The user may already have partial text, the agent may have started a tool step, and the ledger may or may not include usage. The gate should test timeout, connection close, provider error, and retry behavior. Retrying with a different model can change the answer, so fallback should require an explicit route policy rather than hidden client logic.
Separate Responses and Chat Shapes
The keyword report mentions Responses API streaming, while AIWave docs expose an OpenAI-compatible chat completions path. Treat those as related client patterns, not identical contracts. If your application already uses chat completions, test the chat stream first. If a vendor-specific Responses path is required, create a separate adapter and receipt schema. Mixing both in one test can hide where an integration broke.
Internal Links for Stream Evaluators
A streaming evaluator should move through Chat Completions, Models docs, Pricing, Status, Trust, and model alias preflight. Those pages give route names, request shape, current probes, and trust boundaries before a production stream is approved.
Procurement Review
Procurement should ask for one streaming receipt per approved route. The receipt should include source URLs, checked date, pricing_version, route owner, model string, first token time, full duration, chunk count, final usage fields, retry count, timeout policy, and fallback rule. That evidence is stronger than a generic demo because it shows how the route behaves under the client mode the product will actually use.
Final Checklist
A streaming Chinese AI route is ready for a limited production trial when the redacted stream succeeds, chunk order is stable, final usage is captured, timeouts are classified, retries are bounded, fallback cannot silently change behavior, and the pricing source date is stored with the receipt. Recheck AIWave pricing and official provider pages before a monthly forecast or wider rollout.