Qwen4 Max is live on Together AI Together AI made Alibaba's flagship Qwen4 Max available on Together Serverless Inference with a 1M-token context window, and in a test the model took a bug report plus all 344 files of the Tornado Python web framework (652,519 tokens) in a single request and returned a patch that passes the maintainers' regression tests. The request completed in 72 seconds, with the first token at 54 seconds, and cost 69 cents; the model also cited a precedent in tornado/iostream.py that the bug report never mentioned and that Tornado's maintainers cite in their own fix. Through November 22, 2026, Qwen4 Max is priced at $1.05 per 1M input tokens, $0.0525 per 1M cached input tokens and $3.15 per 1M output tokens, and requests must stream, with thinking on by default and thinking tokens counted as output tokens. - Qwen4 Max on Together AI: Alibaba's flagship Qwen model is available on Together Serverless Inference with a 1M-token context window. - What we tested: Qwen4 Max took a bug report and all 344 files of the Tornado repository in one request, and its patch passes the maintainers' tests. - Sale pricing: Through November 22, 2026, it costs \$1.05 per 1M input tokens, \$0.0525 per 1M cached input tokens and \$3.15 per 1M output tokens. - Before you call it: Requests have to stream, and thinking is on by default, with thinking tokens counted as output tokens. We gave Qwen4 Max https://www.together.ai/models/qwen4-max a bug report and an entire codebase in one request. The codebase was Tornado, the Python web framework: all 344 files, 652,519 tokens. The model had no tools, and we didn't select relevant files or run a retrieval step first. Seventy-two seconds later it returned a patch, and the patch passes the tests Tornado's maintainers wrote for that bug. The request cost 69 cents. It also found a precedent elsewhere in the repository. The bug report never mentions tornado/iostream.py , but the model pointed to code there that already handles errors the way its patch needed to. Tornado's maintainers cite the same code in their own fix. Qwen4 Max is Alibaba's flagship Qwen model. It's live on Together AI today, and it's 30% off through November 22, 2026. The test Tornado is an open-source Python web framework. Its repository holds about 340 files of code, tests and docs. That fits in Qwen4 Max's context window, and it's far more than anyone would paste into a prompt by hand. We picked a fix the maintainers committed on November 18, 2026, two days after Qwen4 Max was released, and tested against the repository as it was just before that commit. This is one example, chosen to show what a single call can do and what it costs. The bug is in Tornado's websocket code. When a connection closed with messages still unsent, every write message call that wasn't awaited logged an error, even though awaiting it is optional. We sent every text file in that checkout as one prompt, with a bug report that describes only the symptom: write message logs "Task exception was never retrieved" when the connection closes When a websocket connection closes while messages are still unsent for example, the client sends its messages and a FIN, or resets the connection, without reading the replies , every write message call whose result was not awaited logs "Task exception was never retrieved" at ERROR level. Awaiting the Future returned by write message is optional, so an unawaited call should not log anything. A caller that does await it should still get WebSocketClosedError. We asked for the cause and a patch. This is the request, replayed: What came back The first token arrived after 54 seconds, and the reply was complete at 72. Qwen4 Max traced the error to WebSocketProtocol13.write message in tornado/websocket.py . That method wraps each write in a task. When the connection closes, the task fails with an exception that nobody is required to collect, and Python logs that as "Task exception was never retrieved." The model's patch marks the exception as retrieved. Nothing is logged, and a caller who does await the write still gets the error: The precedent is what makes the patch read like it belongs in the project. The model's explanation says the fix should do what BaseIOStream.write already does for its own futures. That method is in tornado/iostream.py , one layer below the websocket code, and it solves the same problem the same way. The maintainers' commit makes the same comparison. Nobody picked those files for it. All 344 went in, and the model found the two that mattered. How we checked it Tornado's maintainers added two regression tests with their fix: one for a write that isn't awaited, and one for a write that is. On the code before the fix, the first one fails. With the model's patch applied, both pass. We then ran Tornado's full suite, 1,673 tests, with the patch in place, and none failed. What it cost At the sale price, the request works out to about 69 cents, nearly all of it for the 652,519 input tokens. At list price it would be 98 cents. Sending the same repository again costs far less. Together AI caches prompt input automatically, and cached input is \$0.0525 per million tokens during the sale. When we repeated a request of about 630,000 tokens, nearly all of it came back cached. The first token arrived in 8 seconds instead of 54, and the input cost about 3 cents instead of 66. About Qwen4 Max Alibaba released Qwen4 Max on November 16, 2026, and describes it as the most capable model in the Qwen family to date. It positions the model for long agent work, including coding across large repositories, which is the kind of task we tested. Qwen4 Max is a sparse mixture-of-experts model with 2.4 trillion parameters, of which 71 billion are active for each token. On Work360, Alibaba's own benchmark of industry tasks across 721 specialized fields, Alibaba reports that it outperforms Qwen3.8 Max overall, uses 35% fewer tokens at high reasoning effort, and costs about 60% less per task on average. Those are Alibaba's figures, and its announcement https://www.alibabacloud.com/en/press-room/alibaba-unveils-qwen4-max has the details. Run it on Together AI Qwen4 Max is on Together Serverless Inference under the model string Qwen/Qwen4-Max . This script sends a whole repository and a bug report in one request, the way our test did. You need the Together Python SDK pip install together , a TOGETHER API KEY , a local clone of the repository and the bug report saved as bug report.md . It sends every text file git tracks, so check the repository for secrets first. Two things in it are specific to this model. Requests have to set stream=True , because Qwen4 Max on Together AI accepts streaming requests only. And thinking is on by default, so the model's reasoning streams first in delta.reasoning and there's a pause before the answer starts. Thinking tokens count as output tokens. To skip the thinking on a simple request, pass reasoning={"enabled": False} . To try it without writing code, open it in the playground https://api.together.ai/playground/v2/chat/Qwen/Qwen4-Max . The model page https://www.together.ai/models/qwen4-max has the same details. FAQs How much does Qwen4 Max cost on Together AI? Qwen4 Max on Together AI has a list price of \$1.50 per 1M input tokens, \$4.50 per 1M output tokens and \$0.075 per 1M cached input tokens. Through November 22, 2026, it's 30% off: \$1.05, \$3.15 and \$0.0525. Thinking tokens count as output tokens. What is the context window of Qwen4 Max on Together AI? Qwen4 Max has a 1M-token context window on Together AI. In our test, a request with 652,519 input tokens returned its first token after 54 seconds. Does Qwen4 Max accept images? Yes, Qwen4 Max accepts text and image input on Together AI and returns text. Send each image as an image url block in the message content, as described in the vision docs https://docs.together.ai/docs/inference/vision/overview . Why does my Qwen4 Max request fail without streaming? Qwen4 Max on Together AI accepts streaming requests only. A request without "stream": true returns a 400 error with the code streaming required . Set stream=True in the SDK, or "stream": true in the request body, and read the reply from the stream. How do I turn off thinking on Qwen4 Max? Pass reasoning={"enabled": False} in the Python SDK, or "reasoning": {"enabled": false} in the request body, to turn off thinking on Qwen4 Max. Thinking is on by default, and it comes back in the reasoning field ahead of the answer. To get more thinking on a hard problem, set reasoning effort to "max" . Does Qwen4 Max support tool calling? Yes, Qwen4 Max supports tool calling on Together AI through the standard tools parameter. It can return more than one call in a turn. Does prompt caching work with Qwen4 Max? Yes, prompt caching is automatic for Qwen4 Max on Together AI, and cached input tokens cost \$0.075 per 1M at list price. In our test, a repeat of a 630,000-token request came back almost entirely cached, and its first token arrived in 8 seconds instead of 54. Caching is best effort, so not every repeat is cached. Can I fine-tune Qwen4 Max or run it on a dedicated endpoint? No, Qwen4 Max is serverless only on Together AI today, and it isn't available for fine-tuning. Alibaba says smaller open-weight models from the Qwen4 series will follow.