After Alibaba opened Qwen4-Max on November 16, how should qwen4-max JSON set reasoning_effort, prompt_cache_options, and thinking_display, and bill cache writes apart from input?

The model id does not choose the effort, the cache, or the summary. reasoning_effort, prompt_cache_options, and thinking_display do. The write on the bill is one cache field.

Setting model to qwen4-max turns thinking on. On 16 November 2026 Alibaba opened Qwen4-Max on QwenCloud. The id is qwen4-max. Thinking starts at reasoning_effort high and thinking_budget 131072. A prefix you want to reuse needs prompt_cache_options. A readable chain of thought needs thinking_display summarized.

This page is dated 17 November 2026 from the 16 November model changelog, the Qwen4-Max model page, the explicit-cache guide, the thinking-summary guide, the Chat and Responses references, and the pricing page. Yesterday’s note covered DeepSeek web tools. The fields that change this request and the bill are reasoning_effort, prompt_cache_options, and thinking_display.

What opened on 16 November

Alibaba describes a sparse mixture-of-experts model with 2.4 trillion total parameters and 71 billion active per token. On its Work360 set, at High effort, it reports about 35% fewer tokens than Qwen3.8-Max and about 60% lower average cost per task, plus a 6th-place Code Arena rank. Those figures are Alibaba’s. The preview id qwen4-max-preview, opened on 11 November, stays a separate Token Plan model. This request uses qwen4-max.

LimitTokens
Context1,000,000
Max input, thinking off991,808
Max input, thinking on983,616
Max thinking plus answer262,144
Max output, thinking off131,072
Default thinking budget131,072

The Singapore samples use https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1. Keys are region-specific. Beijing and the Global regions (Frankfurt, Hong Kong, Tokyo, and US Virginia) share one price card. Singapore has its own. Chat Completions, Responses, and Anthropic Messages accept the new explicit cache. DashScope does not. Batch inference is not supported. The code interpreter runs only while thinking is on. Pay-as-you-go in Singapore includes a 1 million token allowance, separate from Token Plan credits. The prices below are the list prices.

reasoning_effort on three endpoints

Send reasoning_effort or thinking_budget, not both. thinking_budget must be a positive integer. 0 is rejected. Effort alone keeps the budget at 131072. Budget alone maps 1–4096 to low, 4097–131072 to high, and 131073–262144 to xhigh, and the budget you sent is kept. Neither field means high and 131072. max_completion_tokens caps thinking and the answer together: 262144 while thinking is on, 131072 while it is off. Omit it and the cap is that mode’s maximum. preserve_thinking defaults to true, so replay the earlier assistant reasoning. That text is billed as input.

APIFieldValues
Chat Completions / DashScopereasoning_effortlow, high, xhigh. Default high. minimal and low map to low. medium and high map to high. xhigh and max map to xhigh. none turns thinking off. Chat also accepts enable_thinking false.
Responsesreasoning.effortThe same three values and the same mapping. none turns thinking off. Prefer reasoning.effort. enable_thinking on Responses is marked for removal.
Anthropic Messagesoutput_config.effortlow, high, xhigh. Default high. medium maps to high. max maps to xhigh.

Sampling defaults change with the mode.

ParameterThinkingThinking off
temperature1.00.7
top_p0.950.8
presence_penalty0.01.5
top_k2020

A direct HTTP body puts these fields next to model. The Python OpenAI SDK puts the non-standard ones in extra_body: enable_thinking, thinking_budget, preserve_thinking, thinking_display, and prompt_cache_options. This Chat body keeps a manual breakpoint, a 5-minute cache, and a summary.

{
  "model": "qwen4-max",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "<document of at least 1024 tokens>",
          "prompt_cache_breakpoint": { "mode": "explicit" }
        },
        { "type": "text", "text": "Summarize the document." }
      ]
    }
  ],
  "reasoning_effort": "high",
  "thinking_display": "summarized",
  "prompt_cache_options": { "mode": "explicit", "ttl": "5m" }
}

Responses uses input_text blocks and reasoning.summary auto. The cached prefix still needs at least 1,024 tokens.

{
  "model": "qwen4-max",
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "<document of at least 1024 tokens>",
          "prompt_cache_breakpoint": { "mode": "explicit" }
        },
        { "type": "input_text", "text": "Summarize the document." }
      ]
    }
  ],
  "reasoning": { "effort": "high", "summary": "auto" },
  "prompt_cache_options": { "mode": "explicit", "ttl": "5m" }
}

prompt_cache_options and the breakpoint

Explicit cache is deterministic: the same prefix, the same user, inside the TTL, reads the cache. The implicit cache, used when you set no cache fields, does not promise a hit. mode implicit is not that implicit cache. It places an automatic breakpoint at the end of the input and follows the explicit-cache TTL and prices. That breakpoint moves as the conversation grows, and it does not include the template suffix that starts the answer. A manual breakpoint on the last identical block still applies beside it. Each request keeps at most the last 4 breakpoints. The automatic one uses one of those slots. From each breakpoint the service looks back at most 20 content blocks.

prompt_cache_optionsWhat the call does
mode = implicitPlaces an automatic breakpoint at the end of the input. Manual breakpoints also apply.
mode = explicit + a manual breakpointCreates or reads the cache only at the breakpoints you marked.
mode = explicit, no breakpointNo automatic breakpoint. The call falls through to the implicit cache.
omitted, null, {}, or ttl onlyThe cache guide does not place the automatic breakpoint. Manual breakpoints still cache. Otherwise this is the implicit cache. The Chat parameter text says an empty object means mode implicit and ttl 5m. Send mode yourself.

Put the breakpoint on the last block that stays identical. prompt_cache_breakpoint is {"mode":"explicit"}. The older cache_control {"type":"ephemeral"} marks the same cut. Use one of them in a request. Content with a breakpoint is an array. Text after the breakpoint is outside that cache entry. ttl is 5m or 1h, and 5m is the default. A hit renews the entry. A prefix shorter than 1,024 tokens does not create a cache. The request still succeeds, and the TTL write fields are omitted. Setting only ttl on Chat does not start the explicit cache. Add a breakpoint, or set mode to implicit.

Chat reports the write twice, under two names that are equal. Store one. prompt_tokens already includes reads, writes, and the uncached tail. A hit does not shrink prompt_tokens. In the published first-write sample, the uncached tail is 2304 − 0 − 2048 = 256. On the next call with the same prefix, cached_tokens is 2048 and both write fields are 0. Responses reports the same counts under usage.input_tokens_details, with cache_write_tokens_details.ttl_5m_tokens and ttl_1h_tokens. Its input_tokens also includes reads and writes. Anthropic splits them: input_tokens is only the uncached part, cache_read_input_tokens is the read, and cache_creation_input_tokens is the write. Add those three for the Anthropic total. Do not mix the three shapes. Streaming Chat needs stream_options.include_usage true, and the usage is on the last chunk. Responses usage is on response.completed.

{
  "usage": {
    "prompt_tokens": 2304,
    "completion_tokens": 128,
    "total_tokens": 2432,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 2048,
      "cache_creation_input_tokens": 2048,
      "cache_type": "ephemeral",
      "cache_creation": {
        "ephemeral_5m_input_tokens": 2048,
        "ephemeral_1h_input_tokens": 0
      }
    }
  }
}

Fields that do not apply are left out, rather than returned as 0. The response can echo prompt_cache_options with mode and ttl.

thinking_display and encrypted_content

Full reasoning is the default plaintext. thinking_display summarized replaces that plaintext with a display summary plus the encrypted full reasoning. Turn it on every turn. The summary is for the screen. The ciphertext is what the next turn restores. A summary cannot stand in for the ciphertext. Either field can be missing when no reasoning was produced, or when encryption failed. Do not invent ciphertext from the summary. Keep the original images and documents. Encryption stores the thinking, not those inputs.

APISwitchSummaryCiphertext
Chatthinking_display = summarizedmessage.reasoning_contentmessage.encrypted_content
Responsesreasoning.summary = autosummary[].text (summary_text)encrypted_content
Anthropicthinking.display = summarizedthinkingsignature
DashScopeparameters.thinking_display = summarizedmessage.reasoning_contentmessage.encrypted_content

preserve_thinking is already true. On the next turn, pass encrypted_content back unchanged when summary mode is on. Pass reasoning_content back when you are storing the full plaintext. Do not fold either field into content. A stored summary may be omitted on replay. Historical reasoning counts as input tokens.

{
  "role": "assistant",
  "content": "The answer text.",
  "encrypted_content": "<ciphertext from this turn, unchanged>"
}

In a Chat stream, summary text arrives as delta.reasoning_content. The ciphertext arrives later as one complete encrypted_content frame, not as a delta. Keep that frame even when its text is empty. Do not append ciphertext across turns, and do not open a second assistant message for it. Responses puts summary_text parts on the reasoning item and the ciphertext on that item when it completes. Anthropic streams thinking_delta, then one signature_delta. The signature may be empty.

Bill the write, then the read

Prices are US dollars per million tokens. Thinking and non-thinking use the same card. There is no input-length tier. Thinking tokens are output tokens. Cache fields are raw counts. They do not include the 5-minute or 1-hour multiplier. A 5-minute write is about 125% of the input price, and a 1-hour write is about 200%. Use the rows below. A prefix that already holds a valid cache bills the old part as a read and the new part as a write. A 5-minute request that hits a 1-hour cache is still a read, and the entry keeps the 1-hour tier. A 1-hour request that hits a 5-minute cache writes that portion again at the 1-hour creation price.

ItemSingaporeBeijing / Global
Input$1.5$1.413
Cache write, 5m$1.875$1.767
Cache write, 1h$3$2.827
Explicit or implicit cache read$0.075$0.071
Output, thinking plus answer$4.5$4.24

The Singapore pay-as-you-go allowance is 1 million tokens, separate from Token Plan credits. After that, this card applies. Batch pricing does not apply: batch inference is not supported on qwen4-max. Structured JSON is a different field, response_format with type json_schema and strict true. See what structured output is.

JSON to verify before launch

  1. The body says qwen4-max. It does not say qwen4-max-preview.
  2. The body has reasoning_effort or thinking_budget, one of them. none or enable_thinking false is present only when thinking should be off.
  3. Summary mode sends thinking_display summarized, or reasoning.summary auto, on every turn. encrypted_content is stored whole.
  4. Cache mode is implicit, or explicit with one breakpoint style. ttl is 5m or 1h. The cached prefix is at least 1,024 tokens.
  5. The bill uses cached_tokens once and one write field. The 5-minute and 1-hour counts come from cache_creation, or from ttl_5m_tokens and ttl_1h_tokens. Chat does not add cache_write_tokens to cache_creation_input_tokens.

Check the JSON locally with the JSON validator, JSONPath ($.usage.prompt_tokens_details.cache_creation.ephemeral_5m_input_tokens), and JSON Diff against the previous request. Nothing is uploaded.

FAQ

Can reasoning_effort and thinking_budget go in one request?

No. qwen4-max rejects the pair. Effort alone keeps thinking_budget at 131072. Budget alone maps 1–4096 to low, 4097–131072 to high, and 131073–262144 to xhigh, and keeps the budget you sent. 0 is rejected. Neither field means high and 131072.

Does prompt_cache_options.mode implicit mean the old implicit cache?

No. mode implicit places an automatic explicit breakpoint at the end of the input and uses the 5m or 1h prices. The implicit cache is what you get when cache fields are omitted, or when mode is explicit and you marked no breakpoint. Those hits are not guaranteed. The cache guide and the Chat parameter text disagree on an empty object, so send mode yourself.

Should the bill add cache_write_tokens and cache_creation_input_tokens?

No. On Chat they are the same count. Store one. Split the price with cache_creation.ephemeral_5m_input_tokens and ephemeral_1h_input_tokens. Responses uses input_tokens_details.cache_write_tokens plus ttl_5m_tokens and ttl_1h_tokens. Anthropic uses cache_creation_input_tokens, and its input_tokens is only the uncached part.

Does a prefix under 1,024 tokens fail the request?

No. The request succeeds, no cache is created, and the TTL write fields are omitted. Each request keeps at most the last 4 breakpoints, and each breakpoint looks back at most 20 content blocks.

Can the summary replace encrypted_content on the next turn?

No. Replay the ciphertext unchanged. Do not trim it, re-encode it, or paste it into content. If the turn returned no ciphertext, the summary cannot restore the full reasoning. Enable thinking_display summarized, or reasoning.summary auto, on every turn.

Does DashScope accept prompt_cache_options?

No. The new Qwen4 explicit cache is on Chat Completions, Responses, and Anthropic Messages. DashScope does not accept it. A text-only DashScope call for this model still uses the multimodal endpoint.

Summary

The 16 November 2026 model changes the effort, the cache line, and what you store for the next turn. Leave the default at high and 131072, or set one of reasoning_effort and thinking_budget. Set prompt_cache_options.mode. For a summary, set thinking_display to summarized and replay encrypted_content unchanged. Bill one write field at the 5-minute or 1-hour price, and cached_tokens at the read price.