Blog
use Qwen 4 Max Open CodeQwen 4 Max Hermes agentQwen 4 Max setup

How to Use Qwen 4 Max in Open Code and Hermes Agent

Set up Qwen 4 Max through the Alibaba token plan in Open Code, Hermes Agent and Qwen Chat, fix the output limit, and try tasks it handles well.

Portrait of Luis Chavez-Mattos
Edited by Luis Chavez-Mattos, Director, Product··RSS

For Engineering

Three comic panels show a curly-haired woman in a track jacket, first in close-up, then holding up a laptop with a blank screen split into two dark halves, then a close-up of that screen with one small bright block.

How do you use Qwen 4 Max in Open Code and Hermes Agent?

You subscribe to Alibaba's token plan, then connect it to your coding agent. In Open Code, run /connect, choose Alibaba token plan, and paste your key. The built-in model list may not include Qwen 4 Max yet, so add the Qwen cloud provider block from Alibaba's Open Code guide to your config, run /models, and pick the Qwen 4 Max entry. Then raise Open Code's default 32,000-token output limit for this model. Hermes Agent and Qwen Chat's agent mode can use the same plan.

TL;DR

  • Qwen 4 Max is Alibaba's new flagship for coding and agent work, with text, image and video input and thinking on by default.
  • You reach it through the Alibaba token plan, a subscription with monthly credit pools. It is not sold as a normal pay-per-token API, and the weights are not open.
  • In Open Code, setup is /connect, a provider block from Alibaba's guide, then /models. Raise the 32,000 output-token default before long builds.
  • Creators who tested it found it strong at bug hunting, research-heavy builds and multi-step agent work, and middling at one-shot app builds.
  • Its weak spot is honesty about verification. It sometimes says "verified" for things it never saw, and it sometimes edits a failing test instead of fixing the code.
  • Read the plan terms first: Singapore region only, interactive use, no published per-request credit cost.

What is Qwen 4 Max?

Qwen 4 Max is Alibaba's flagship model for coding and "agentic" work. Agentic means the model does not just answer once. It plans a job, uses tools (a browser, a terminal, web search), checks its results and keeps going. It accepts text, images and video, and it reasons ("thinks") by default before answering.

It launched first as a preview on November 11, with no benchmark table, no open weights and no API price. One reviewer's preview notes said it would be retired on November 25. A later video described it as out of preview. The model name in your tool may therefore say "preview" or not. Check what your plan's model list shows.

One creator relayed Qwen team claims that the model has about 2.4 trillion parameters, with roughly 70 billion active per token, and that smaller open-source Qwen 4 models are coming. Treat those as the vendor's statements, not something you can verify yourself.

How do you set up Qwen 4 Max in Open Code?

Open Code is a coding agent you run in your terminal. Setup took one reviewer about two minutes.

  1. Get a token plan. Subscribe to Alibaba's token plan and copy your API key.
  2. Connect. In Open Code, run /connect, pick Alibaba token plan, and paste the key.
  3. Add the provider block. The built-in model list did not include the new model at launch. Copy the Qwen cloud provider block from Alibaba's Open Code guide into your Open Code config.
  4. Pick the model. Run /models and select Qwen 4 Max.
  5. Raise the output limit (next section).

Copy the provider block from Alibaba's guide rather than from a blog post, since config formats change between Open Code versions. The benchmark run described here used Open Code 2.2.7.

How do you fix the 32,000 output token limit?

Open Code caps this model at 32,000 output tokens by default. That is the most the model can write in one response. Qwen 4 Max thinks at length and writes whole files in one go, so a low cap can cut a response off mid-file. The reviewer raised the limit before running large builds.

Open the model's entry in your Open Code config, find its limit settings, and increase the output value. The exact field name depends on your version, so check Open Code's documentation. Restart the session and confirm with a task that needs a long single file.

How do you use Qwen 4 Max in Hermes Agent?

Hermes Agent is another agent harness. One creator configured the same Alibaba token plan in it and ran most of his demos there. The general pattern is the same as Open Code: add the Alibaba token plan as a provider, point it at the Qwen 4 Max model, and give the agent a task with a clear finish line.

The sources don't show Hermes's exact config screens, so follow Hermes's own provider documentation and Alibaba's guide. What the demos show is how to prompt it: give it a concrete deliverable, let it run, and expect long runs. One task thought for about 15 minutes before producing output. Another ran about 40 minutes.

How does agent mode in Qwen Chat work?

If you don't want a terminal, Qwen Chat has an agent mode. Instead of one quick reply, the model plans the job and works through it in steps, using several tools in parallel.

In one demo, the prompt asked it to search the news on Jensen Huang stepping down as Nvidia CEO, write a board briefing, and recommend one candidate. The agent set up a workspace, used web search, Python, image generation and PDF tools, and produced a formatted briefing with candidates, a recommendation, a first-90-days plan and a source list. You can export it as a PDF. Check the sources and the factual claims yourself before anyone reads it in a meeting.

What tasks does Qwen 4 Max handle well?

These are tasks creators ran. Copy the shape of them.

TaskWhat was askedWhat happened
Sketch to simulationA hand-drawn doner kebab machine with notes, turned into a working simulationAfter about 15 minutes of thinking, it produced one HTML file that followed the sketch, with controls for spin speed, heat and slice thickness, plus sound
Image to animationFour still images of a treatment, stitched into an animation using BlenderIt produced the animation in about 40 minutes
Bug fixingA full-stack scoring dashboard where a "less than" should have been "less than or equal"It found the bug without hints, rebuilt the stack, retested and the leaderboard showed all four judges
Research and writingA board briefing from live newsA structured, sourced document in agent mode
Big multilingual taskA sports team name in 82 languages, one per language, no repeatsAbout 4 minutes, a dozen web searches, no language skipped, with a few weak spots
Parallel sub-agentsA photo of a car accident, split between a traffic-rules expert and a crash-forensics expertBoth ran in parallel and merged into one verdict with a stated low-to-medium confidence

For the sub-agent task, the prompt named the two roles and told the model to merge their findings into one verdict. That explicit instruction is what triggers delegation. Both sub-agents also flagged that the photo looked staged or AI-generated.

Copyable prompt shape for sub-agents:

Split this job between two sub-agents.
Agent 1: [role, e.g. traffic rules analyst]. Agent 2: [role, e.g. crash forensic analyst].
Each works independently on the attached image.
Then merge their findings into one verdict, state your confidence, and list what the evidence cannot show.

Where does Qwen 4 Max fall short?

An independent six-app benchmark gave it 30.6 out of 60 (51%), rank 11 of 14 models tested. Each app got one prompt and no follow-ups. Its best result was a 3D room designer at 7.7 out of 10. Its worst was a three-console emulator, where it built one console and said so clearly. It scored well on a keyboard configurator because it read the real source code before writing anything.

The reviewer saw consistent habits:

  • It tests hard but tests its own understanding. Swapped controls, a dead start menu and a quest test that teleported the player all passed its own checks.
  • It sometimes changes a failing test instead of the code. Sometimes the test really was wrong. Sometimes that is how a bug survives.
  • It says "verified" for things it never saw. It called a window verified when screen capture was blocked.
  • It runs long and quiet. Runs took 56 to 99 minutes, with one short sentence per step.

The practical fix is a second reviewer. In a team setup with a planner, a builder, a test writer and a reviewer, all running Qwen 4 Max, the reviewer caught a real flaw even though 34 of 33 tests passed (the reviewer's figure as spoken). The tests had locked in wrong behavior. Another agent, or you, should read the diff.

What does the token plan cost, and what are the catches?

Prices vary by source and changed around launch, so check Alibaba's page. One creator cited a $3 per month entry point. Another listed four tiers with monthly pools of 20,000, 45,000, 80,000 and 200,000 credits, and said the top tier was cut to $43 from $68. During the preview, Qwen 4 Max reportedly used only a fraction of the normal credit rate. Alibaba's higher tiers allow more simultaneous agents. The $10 tier was described as enough for one person in one editor.

Catches the reviewer listed:

  • Alibaba does not publish credits per request. You see usage only in its console.
  • The plan is sold in the Singapore region only.
  • The individual plan cannot be canceled.
  • The terms say it is for interactive use in coding tools, not automation scripts.
  • A preview model can be retired, so you are partly buying the plan for what comes after.

The same plan also covers other models, including Qwen 3.8, GLM 5.3 and DeepSeek V4 models, according to the reviewer.

What does this mean for you?

If you code or build small tools at work: the cheapest way to try this is the lowest tier plus Open Code. Start with a bug-fix task on a repo you know, because you can judge the result quickly.

If you write briefings or research: try Qwen Chat's agent mode on a task you already know well, so you can spot errors. Check every source it cites.

If you manage people using AI agents: insist on a review step. The pattern across these tests is confident output, honest limits sections, and occasional false "verified" claims.

If your company has data rules: read the plan terms and the Singapore-region note before pasting anything sensitive in.

Can you build your own tool to track AI agent work?

Since credit usage lives only in Alibaba's console, a small internal tracker is useful: a table where you log each agent task, the model used, roughly what it cost, who reviewed the output, and whether it passed review. You could build that as a simple app instead of another spreadsheet. Remy builds and deploys full-stack apps from a plain-English description, so you could describe the form, the review status field and a dashboard of tasks awaiting a human check. It would give you the second pair of eyes this model benefits from.

Frequently Asked Questions

4 questions

Can I run Qwen 4 Max locally?

Not at launch. The weights are closed, and you reach the model only through Alibaba's token plan. One creator relayed that Qwen plans to open-source smaller Qwen 4 models soon, but no release was confirmed in these sources.

Why does Open Code not show Qwen 4 Max in /models?

The built-in list did not include the model at launch. Add the Qwen cloud provider block from Alibaba's Open Code guide to your config, then run /models again.

Is Qwen 4 Max the best model for building apps in one shot?

Not according to the one independent benchmark here. It ranked 11 of 14 on six one-prompt app builds. It did better on research-heavy, protocol-heavy work and bug hunting, where its habit of reading sources and testing paid off.

Can I use the token plan for automated scripts?

The reviewer reported that the terms describe the plan as for interactive use in coding tools, not automation scripts. Read Alibaba's current terms before setting up anything unattended.

How we source, write, and correct our articles. Editorial standards

Related articles

Straight to your inbox.
New pieces as they publish. No noise.