-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Cannot disable thinking for Qwen3.5-plus via Anthropic API compatibility #2022
Description
What happened?
When integrating the latest Qwen3.5-plus model from Aliyun into Pi Coding Agent via the Anthropic API-compatible endpoint, the thinking function cannot be disabled.
Even when the user explicitly sets “reasoning: false” in the custom models configuration or uses thinking=off in the UI, the model continues to run in thinking mode. This is because the request sent to the Aliyun endpoint does not include 'thinking' field, causing the model to fall back to its default state (thinking enabled by default).
Steps to reproduce
- Configure the provider in Pi Coding Agent with the Aliyun endpoint:
{
"providers": {
"anthropic_aliyun": {
"baseUrl": "https://dashscope.aliyuncs.com/apps/anthropic",
"api": "anthropic-messages",
"apiKey": "sk-sp-tester-001",
"models": [
{
"id": "qwen3.5-plus",
"reasoning": false,
"input": ["text", "image"],
"contextWindow": 960000,
"maxTokens": 65000
}
]
}
}
}
-
Set thinking to off in the Pi coding agent interface.
-
Say 'hi' with Qwen3.5-plus model.
-
Observe the response: The model still outputs detailed reasoning steps, indicating thinking is active.
Expected behavior
When the user sets “reasoning=true && thinking=off”, the Pi Coding Agent should explicitly send the following field in the Anthropic messages request to override the provider's default:
"thinking": { "type": "disabled" }
Version
No response