A web fetch, permission check, or context summary suddenly returns HTTP 400 with enable_thinking in the error text.
Fastest fix: upgrade Qwen Code to v0.20.1 or later, then restart the client and reload the model configuration. Do not force enable_thinking=false; Qwen 3.8-Max Preview requires thinking on the affected DashScope-compatible route.
This guide is for developers using Qwen 3.8-Max Preview as the main or fast model in Qwen Code, AI Agent teams that depend on web fetch, summaries, subagents, or permission classification, and platform engineers who need to reproduce the failure in an isolated macOS environment.
Last updated July 30, 2026. Facts were checked against the official Qwen Code issue tracker, pull request history, release page, and documentation.
Start With The Error Category
The most recognizable failure is:
400 The value of the enable_thinking parameter is restricted to True
A related structured-request failure may mention forced tool selection, such as tool_choice: required. These errors do not automatically indicate an exhausted quota, a broken network, an invalid API key, or unavailable open weights. They identify a request-compatibility problem that can occur inside a secondary Qwen Code operation rather than the visible conversation.
The affected background operations can include:
- Web fetch summarization.
- Permission classification.
- Context compression.
- Goal judging.
- Subagent generation.
- Suggestions and other internal summaries.
- Structured responses that try to force a tool choice.
An official issue records the problem with Qwen Code 0.20.0 and qwen3.8-max-preview, including a request that failed when internal processing attempted to send enable_thinking: false. The same report describes the failure near context compaction, while other internal operations can trigger it independently. Read the original compatibility issue.
What the symptom usually means
The visible chat can work while a background feature fails because Qwen Code does not necessarily build every request through the same path. A normal prompt, a side query, a schema-based request, and a subagent call may use different generation settings.
That distinction matters. If ordinary text replies work but web fetch fails, the model endpoint is not necessarily offline. If the main model works but the fast model fails, the API key is not necessarily invalid. If a short session works but context compression fails later, the error is not necessarily related to context size itself.
The safer first action is to save the complete error text, the actual model ID, the main and fast model settings, the client version, the provider route, and the feature that failed.
Use This Decision Table Before Changing Settings
The following table separates the most common branches. It prevents repeated edits to API parameters without evidence.
| Observed result | Most likely branch | Evidence to collect | First action |
|---|---|---|---|
| Main chat works, web fetch fails | Side-query compatibility | Feature name and exact 400 text | Check Qwen Code version |
Main and fast model are both qwen3.8-max-preview |
Mandatory-thinking model used for internal calls | Main model and fast model IDs | Upgrade to v0.20.1 or later |
| Text side query works, structured call fails | Forced tool selection conflict | Error mentions tool_choice |
Upgrade and retest schema-based calls |
| Only one model alias fails | Alias or preset mismatch | Resolved model ID in logs | Replace the alias with the real model ID |
| All requests fail immediately | Route, credentials, or endpoint issue | Base URL, auth type, API response | Test a minimal direct text request |
| Error remains after upgrade | Stale process or configuration cache | Process path and loaded settings | Stop every Qwen process and reload settings |
The key decision is simple: an enable_thinking=false rejection on Qwen 3.8-Max Preview should be treated as a client compatibility event first, not as a reason to wait for model weights or rewrite the whole project configuration.
Why Qwen 3.8-Max Cannot Disable Thinking In This Path
The model is not failing because Qwen Code forgot a random parameter. The older internal request path intentionally disabled thinking for some background operations, but that behavior conflicts with a model endpoint that rejects the opt-out.
The official issue describes a model preset marked with thinking enabled and a pipeline that sent enable_thinking: false when an internal operation set reasoning output to disabled. The reported scope includes context compaction, goal judging, and permission classification. That is enough to explain why the main conversation may remain usable while a background action fails. (github.com)
A second failure mode affects structured calls. The official repair pull request states that Qwen 3.8-Max Preview on the relevant DashScope-compatible route must retain thinking and must not receive forced tool_choice: required in the affected structured path. The repair allows the model to select the response tool automatically instead. Review the official side-query repair.
Why does Qwen 3.8-Max reject enable_thinking=false?
Because the affected endpoint treats thinking as mandatory. Qwen Code may use a generic optimization that disables thinking for side queries on models where that is supported, but that optimization is not valid for a model route that restricts the parameter to True. The repair therefore adds model-level compatibility handling instead of asking users to override the request manually.
This is also why manually adding the following is the wrong workaround:
{
"enable_thinking": false
}
It can make the conflict more deterministic. It also hides whether the client has actually loaded the repaired model capability.
First Step: Confirm The Installed Client
Do not assume that a merged pull request is already present in the local binary. The official repair was merged on July 21, 2026, while the v0.20.1 release was published on July 21, 2026. A source branch, nightly build, global npm package, standalone installation, and stale terminal session can all point to different code. Check the v0.20.1 release record.
Run:
qwen --version
If the command is unavailable, check how Qwen Code was installed instead of installing a second copy immediately.
| Installation method | Correct update path | Verification |
|---|---|---|
| Global npm package | npm install -g @qwen-code/qwen-code@latest |
qwen --version |
| Standalone installer | Rerun the official standalone installer | Open a new terminal, then run qwen --version |
| Source checkout | Pull the intended branch and rebuild | Confirm the executable points to the rebuilt checkout |
| Temporary npx execution | Pin the release in the npx command | Print the version from that exact invocation |
| Homebrew installation | Use the package manager’s update flow | Confirm the binary path and version |
The official troubleshooting documentation distinguishes these installation methods and recommends updating according to the original channel. It also identifies ~/.qwen/settings.json and the project-level .qwen/settings.json as separate configuration locations. Check the official update and configuration guidance.
Second Step: Upgrade Without Overwriting The Evidence
Before upgrading, save the diagnostic state:
qwen --version
which qwen
Also record:
- The model ID shown in the Qwen Code configuration.
- The fast model or side-query model.
- The provider type.
- The base URL or route family.
- The exact failed feature.
- The complete HTTP 400 response.
- Whether the session was already running before the upgrade.
Then upgrade through the same channel used for installation. For a global npm installation:
npm install -g @qwen-code/qwen-code@latest
qwen --version
If the project must remain reproducible, install or invoke a version that is explicitly v0.20.1 or newer rather than relying on an unpinned moving tag.
The official documentation lists npm, standalone, Homebrew, and source-based paths separately. It also recommends restarting the terminal after installation so that the active executable and environment variables are refreshed.
Upgrade order that avoids false positives
- Save the current version and configuration paths.
- Close every active Qwen Code process.
- Upgrade through the original installation channel.
- Open a new terminal session.
- Confirm
qwen --version. - Start a new Qwen Code session.
- Reload or reselect the provider configuration.
- Run the smallest text request before testing tools.
- Test side queries and structured calls separately.
Restarting matters because an already running process can retain an old provider object or model generator. The official repair specifically addresses provider refresh, model-specific generator resolution, and cache invalidation, but an old process should not be treated as proof that the new release is absent.
Third Step: Check The Three Model Identities
A common post-upgrade mistake is checking only the primary model. Qwen Code may use separate identities for the main model, fast model, and an explicit model override used by a hook or internal operation.
| Identity to inspect | What to verify | Typical failure |
|---|---|---|
| Main model | Exact resolved model ID | Alias points to an old preset |
| Fast or side-query model | Exact model and provider route | Fast model inherits incompatible settings |
| Hook or subagent override | Whether it selects another model | Override reuses stale generator settings |
| Provider route | DashScope-compatible URL family | Model ID is valid but route is mismatched |
| Generation settings | Thinking capability and tool behavior | Manual false setting survives the upgrade |
The repair pull request explains that model overrides must resolve their own generator and generation settings. It also states that a same-provider side or fast model should not inherit the mandatory-thinking capability from another model. This is why changing only the visible main model can leave the failure intact.
Qwen Code still returns an enable_thinking=false 400 after upgrading. What should be checked next?
Check whether the running process is using the upgraded binary, whether the actual model ID is still qwen3.8-max-preview, and whether the fast model points to a different preset or route. Then remove any manually added enable_thinking=false override and reload both the user-level and project-level settings.
Do not change several variables at once. If the route, model alias, provider, and thinking flag all change together, the next successful request will not reveal which condition fixed the problem.
Fourth Step: Separate Route Problems From Client Problems
A compatible model ID can still fail when paired with the wrong interface route. The issue report records a DashScope-compatible endpoint and a Token Plan environment, while the repair explicitly scopes its behavior to DashScope-compatible routes. The official pull request also says that non-DashScope providers and other models retain their existing behavior.
Use this branch test:
- If a minimal text request fails with an authentication or route error, investigate credentials and endpoint selection.
- If the minimal text request succeeds but web fetch fails with the thinking restriction, investigate the Qwen Code version and side-query path.
- If text side queries succeed but structured requests fail with forced tool selection, confirm that the repaired client is handling automatic tool selection.
- If only an alias fails, replace it temporarily with the exact model ID and compare.
- If the error appears only in an existing session, create a new session after reloading the provider.
A direct API test can be useful, but it must not become a substitute for testing Qwen Code’s internal operations. A direct text request proves that the endpoint accepts one request shape. It does not prove that web fetch, subagents, permission classification, or schema-based tools use the same shape.
Fifth Step: Validate Tools One By One
How can a developer confirm that side queries are working after upgrading Qwen Code?
Use a staged acceptance test rather than one long agent task. Record the request type and result after every step.
| Test stage | Minimal action | Pass condition | Failure interpretation |
|---|---|---|---|
| Text request | Ask for a short plain-text answer | HTTP 200 and normal response | Route, auth, or model issue |
| Web fetch | Fetch one small public page | Content is returned | Side-query or fetch integration issue |
| Summary | Summarize the fetched content | Summary completes | Text side query still failing |
| Structured response | Request a small schema result | Valid structured output | Tool-choice or schema path issue |
| Subagent | Start one simple subagent task | Subagent returns a result | Internal generation path still failing |
| Permission classification | Trigger a controlled permission prompt | Classification completes | Internal classifier path still failing |
| Compression | Use a session long enough to trigger compaction | Session continues | Context-management path still failing |
The official repair’s reviewer test plan calls for both text-only and schema-based side queries. It also records that the structured path should preserve thinking, omit forced tool selection, and return the requested structured result. The pull request reports macOS validation for this repair, while Windows and Linux were marked not applicable in that test record.
A successful ordinary reply is therefore not enough. Web fetch and subagent failures can persist after the main conversation appears normal because they exercise separate request construction paths.
Why Web Fetch And Subagents Can Fail Together
Why can web fetch and subagents fail at the same time?
They may share the same internal side-query generation path. The external operation is different, but both can ask the model to produce a compact result without exposing the full reasoning trace. If that shared path sends enable_thinking=false to a thinking-mandatory model, both features can fail with the same HTTP 400 even though the fetch transport itself is healthy.
An official web-fetch issue describes repeated failures across different URLs and prompts while using Qwen Code 0.20.0 with qwen3.8-max-preview. The report identifies the internal side query as the failing stage rather than the page retrieval itself. Read the web-fetch failure report.
This explains an important diagnostic boundary:
- The URL may be reachable.
- The page conversion may complete.
- The internal summarization request may still return HTTP 400.
- Retrying the same URL will not repair an invalid request parameter.
- Changing the prompt will not repair a client-side request-shaping bug.
- Falling back to raw downloads may avoid the side query but changes token usage and output handling.
Build A Before-and-After Record
For a team environment, keep a small record for every upgrade attempt.
| Field | Before upgrade | After upgrade |
|---|---|---|
| Qwen Code version | Exact output of qwen --version |
Exact output after restart |
| Executable path | Output of which qwen |
Output after update |
| Main model | Resolved model ID | Resolved model ID |
| Fast model | Resolved model ID | Resolved model ID |
| Provider route | Actual configured route | Actual configured route |
| Failed feature | Web fetch, summary, subagent, or other | Same test |
| Error text | Complete HTTP 400 response | Success or new error |
| Session state | Existing or new session | New session after reload |
| Rollback result | Previous version behavior | Only if rollback is required |
Continue using the current environment when the upgraded version is confirmed, the model identities are correct, and each required tool passes its own test. Move to a clean temporary macOS environment when the binary path is ambiguous, several project-level configuration files overlap, stale processes cannot be ruled out, or the current project contains extensions and hooks that may override model settings.
A clean environment is not a performance benchmark. It is a control condition. If the same model and route pass in a clean session, the project configuration is the stronger suspect. If the failure reproduces there, the client, route, or model compatibility boundary deserves further investigation.
For teams that need to isolate the operating system, CLI version, and project state without disturbing a production laptop, a short-lived remote Mac can be easier to reset than a local installation. ZilCloud’s remote Mac environment options can be considered when the test requires a separate macOS workspace rather than another round of edits to the main machine.
What Not To Conclude From This Fix
This repair confirms a Qwen Code compatibility event. It does not establish:
- When Qwen 3.8-Max Preview weights will be released.
- Whether the model will become open-weight.
- Which license will apply.
- What hardware will be required for local deployment.
- Whether the Preview behavior represents a future stable release.
- Whether every HTTP 400 involving Qwen models has the same cause.
Those are separate questions. The evidence here concerns request construction, thinking constraints, side queries, and structured tool behavior in the affected client and route.
A Better Environment For Repeatable Testing
A local development machine is convenient, but it can also contain several hidden variables: stale global binaries, multiple Node installations, project-level settings, shell overrides, cached sessions, extensions, and long-running processes. Those conditions make a before-and-after comparison difficult.
A remote Mac is not automatically better for every workload. Buying a dedicated machine is more appropriate for long-term heavy use, persistent local data, physical peripherals, or workloads that need stable hardware access. A rental environment is more suitable when the goal is short-term isolation, version comparison, agent-tool acceptance testing, or reproducing a macOS-only issue without changing the main workstation.
Compared with testing on the current laptop, a temporary Mac environment can remove three practical weaknesses: configuration pollution from unrelated projects, uncertainty about which executable is active, and the cost of rebuilding the same clean state after each failed experiment. If the test involves only a brief upgrade and rollback cycle, renting can also avoid committing to hardware before the compatibility result is known.
If the project depends on many local extensions, has a complicated shell setup, or needs repeated macOS validation, ZilCloud’s support and environment guidance can help the team define the clean-room test before starting. For longer evaluation windows, review the available rental plans only after the required tests and access constraints are clear.
The operational recommendation remains narrow: upgrade first, remove the forced enable_thinking=false setting, verify the actual main and side-query models, and validate each tool separately. If the local project still cannot distinguish a client problem from configuration contamination, a short-lived isolated Mac is usually a more reliable next experiment than repeated parameter changes on the same session.
Run Your AI Workflows on a Dedicated ZilCloud Mac
Deploy a dedicated Apple M4 Mac mini and run development, testing, and automation tasks without sharing compute resources.
Connect through SSH or browser VNC to inspect configurations, apply fixes, and manage your remote macOS environment from anywhere.