Alibaba Qwen4 Max Launches Serverless Inference Service via Together AI
Alibaba's Qwen4 Max, announced on November 16, 2026, is now available on Together AI's serverless inference platform. The model identifier is `Qwen/Qwen4-Max`, and Together AI applies a 30% discount from the launch date until November 22, 2026. This model is the flagship with the most powerful performance in the Qwen product line, with Alibaba stating it is suitable for "long agent tasks, especially coding across large repositories."
The architecture is a Sparse Mixture-of-Experts model, with 2.4 trillion parameters in total, of which 71 billion are activated per token. In the Together AI environment, it provides a 1 million token context window, accommodating both text and image inputs while outputting text.
Real-World Validation of the 1 Million Token Context Window: Full Analysis of the Tornado Repository
To validate the practical capabilities of Qwen4 Max, Together AI conducted a test by inputting the entire Tornado Python web framework repository into a single prompt. The test conditions are as follows:
- Target Repository: 344 text files based on Tornado git checkout
- Token Count: 652,519 input tokens
- Bug Report: Only describes the phenomenon where calling `write_message()` logs an error while there are untransmitted messages upon websocket disconnection
- No Tool Usage: Skipped the steps of selecting or searching relevant files (Retrieval)
- Thinking Mode: Default activation
"The bug report did not mention `tornado/iostream.py` at all, but the model pointed out that there was code handling errors in the same way that needed a patch there. Tornado maintainers also cited the same code in their fixes."
Detailed Test Results
| Metric | Value | Note |
|---|---|---|
| First Token Arrival Time | 54 seconds | Streaming response starts |
| Response Completion Time | 72 seconds | Full patch and explanation generated |
| Generated Patch | Single patch | `WebSocketProtocol13.write_message` modification |
| Maintainer Test Passed | 2/2 | All regression tests passed |
| Total Test Suite | 1,673 | All passed after patch application |
| Precedent Found | `tornado/iostream.py` | Reuse of `BaseIOStream.write` pattern |
The model accurately identified that the `write_message` method in the websocket protocol layer wraps each write operation as a task, and when the connection is closed, the task fails with an exception that no one collects, causing Python to log "Task exception was never retrieved." The patch marked this exception as "collected" to prevent unnecessary logging while still allowing the caller to receive an error if `await` was used.
Pricing Structure and Caching Effect: Real Cost Analysis
Together AI automatically caches prompt inputs, applying significantly discounted rates to cached input tokens. The price list based on sale period (until 2026-11-22) and regular price is as follows:
| Category | Sale Price (30% Discount) | Regular Price |
|---|---|---|
| Input Tokens (per 1M) | $1.05 | $1.50 |
| Cached Input Tokens (per 1M) | $0.0525 | $0.075 |
| Output Tokens (per 1M) | $3.15 | $4.50 |
Actual Cost Breakdown
- Initial Request (652,519 input tokens): Approximately $0.69 (sale price) / $0.98 (regular price)
- Input cost accounts for most
- Thinking tokens are counted as output tokens
- Re-requesting the Same Repository (approximately 630,000 tokens, nearly all cache hits): Approximately $0.03 input cost
- First token arrival: 8 seconds (85% reduction from the initial 54 seconds)
| initial_request | 69 |
| cached_re_request | 3 |
| regular_initial | 98 |
| regular_cached | 5 |
The caching effect resulted in a 95% reduction in input costs and an 85% reduction in latency, providing a decisive advantage in workflows that repeatedly analyze large codebases.
Technical Characteristics and Constraints: Streaming Required, Thinking Tokens Default Activation
There are constraints to be aware of when calling Qwen4 Max from Together AI.
- Streaming Required: If `stream=True` (SDK) or `"stream": true` (HTTP) is not set, a 400 error is returned with `streaming_required` code
- Thinking Default Activation: The inference process is streamed in advance with the `delta.reasoning` field, causing a pause before answer generation
- Thinking Tokens = Output Tokens: Charged as output tokens
- Thinking Control: Can be disabled with `reasoning={"enabled": False}`, can be deepened with `reasoning_effort: "max"`
- Tool Invocation Support: Function calls possible through standard `tools` parameter
- clone_and_secret_scan
- collect_all_files
- combine_bug_report
- streaming_request
- receive_thinking_stream
- receive_answer_stream
- validate_patch_application
Together AI has made the Python script used for testing public, with the main steps being local repository clone → secret information scan → collection of all git-tracked text files → combination with bug report → sending a single streaming request.
Benchmark Performance and Model Architecture
According to the Work360 benchmark results released by Alibaba, Qwen4 Max outperforms its predecessor Qwen3.8 Max across 721 industry tasks.
- Overall Performance: Superior to Qwen3.8 Max
- Token Usage in High-Difficulty Inference: 35% reduction
- Average Cost per Task: Approximately 60% reduction
"These figures are based on Alibaba's announcement materials, and details should refer to those announcements."
The structure of 71 billion activated parameters out of 2.4 trillion appears to be designed to balance inference efficiency and model capacity. Maintaining the number of active parameters during large context processing is presumed to have positively impacted memory bandwidth and latency.
Implications for Developer Workflow
This test suggests that it is possible to digest the context at the entire repository level with a single call and generate patches at the maintainer level. If the document segmentation, embedding, searching, and re-ranking steps required by existing RAG (Retrieval-Augmented Generation) pipelines can be omitted, the development cycle will be significantly shortened.
However, several practical considerations remain.
- Preventing Secret Information Leakage: A secret scan is mandatory before sending the entire file
- Managing Thinking Token Costs: In complex tasks, thinking tokens may account for a significant portion of output tokens
- Streaming-Only Architecture: Existing non-streaming client code needs modification
- Cache Key Management: Documentation is needed to confirm how Together AI's automatic caching operates (by file? project? session?)
As Alibaba has positioned Qwen4 Max for "long agent tasks," future integration cases with agent frameworks (LangGraph, AutoGen, etc.) will be noteworthy.