For Model Studio Qwen Chat Completions, thinking mode and forced tool selection are different choices. Alibaba Cloud documents a conflict when enable_thinking: true is combined with tool_choice: "required" or a named function object.
The tool_choice parameter does not support being set to required or object in thinking modeChanging credentials or retrying the same settings does not resolve this parameter conflict. Start with the JSON your client actually sends.
Check the two settings locally
For Alibaba Cloud Model Studio Qwen Chat Completions. Paste JSON only; remove keys and headers.
Choose which behavior your task needs
The following snippets change only parameters. Keep your existing model, messages and tool definitions; these fragments are not complete API requests.
Keep thinking and let the model select tools
{
"enable_thinking": true,
"tool_choice": "auto"
}Automatic selection allows a tool call but does not require one. Use none only when you want to block tool calls. If the workflow needs a particular function every time, automatic selection changes that requirement.
Choose a specific function without thinking
{
"enable_thinking": false,
"tool_choice": {
"type": "function",
"function": {"name": "lookup_item"}
}
}Use this only for a model that supports disabling thinking and calling functions. Replace lookup_item with a function declared in your tools array. A thinking-only model needs a different supported model or workflow.
Do not replace this object with required and assume the problem is solved. Model Studio says Qwen's non-thinking mode does not guarantee a call with required. A generic example for another hosted model is not evidence that the same setting works for Qwen. Model Studio tool-choice reference.
Compare SDK options with the actual HTTP body
In a direct HTTP JSON body, enable_thinking is a top-level field. In Python OpenAI SDK options, the provider extension goes through extra_body. Pasting an SDK options object into an HTTP client leaves the field at the wrong level.
# Options for client.chat.completions.create(...), not wire JSON
extra_body={"enable_thinking": False},
tool_choice={"type": "function", "function": {"name": "lookup_item"}},With LangChain ChatOpenAI, a named bind_tools(..., tool_choice="lookup_item") can become a function object in the outgoing request. Check that final object together with the thinking flag; do not inspect only the original string. A public LangChain report shows this exact conflict. A separate Qwen Code report concerns forced side queries and has a linked client fix; neither report proves every current client is affected.
Check the next turn as well
- Keep the provider, route, model and client version with your redacted report. This guide covers Model Studio's Chat Completions interface; a third-party host or Responses API needs its own rules.
- Check omitted defaults. An absent
enable_thinkingdoes not prove thinking is off. Confirm the exact model's documented behavior. - After your app runs a returned function, return the matching
tool_call_id. When asking for a natural-language summary, remove forced selection so the client does not keep asking for that function. - Judge the final response by its actual fields.
content: nullwith a tool call is an intermediate step; follow the tool-result sequence.
ChinaGenAI's free route does not expose Qwen's enable_thinking setting or promise a named model. Use your provider's supported route for this configuration. The Qwen account and region guide covers endpoint/key setup separately.
Sources and scope
Model Studio function calling documents the conflict and named-function example. Thinking-mode documentation explains model-specific thinking controls. These sources were checked on 24 October 2026.
The local checker identifies a documented parameter relationship. It does not make a model call, validate all tools, check account access or establish provider acceptance. Search volume and traffic impact have not been measured.
Free API access and limits
Check the site free API access and limits before trying to obtain a site key. Read the current status and request limits before using a site key. It is not a source of official provider keys.
ChinaGenAI is not affiliated with the providers named here. This release contains setup guidance and explicitly labeled fictional examples, not claimed live model benchmarks.
Exact symptom wording and source
Use the quoted text to locate the relevant check. Providers and clients can phrase the same failure differently; compare the complete response before applying a fix.
Reported text:
The tool_choice parameter does not support being set to required or object in thinking modeProvider-specific Chat Completions constraint. Keep thinking with automatic selection or choose a supported non-thinking named function; required is not a Qwen guarantee.
The tool_choice parameter does not support being set to required or object in thinking mode