microsoft / microsoft/foundry-local
[Bug] API Silently Ignores "Reasoning Mode" Disable Flags (Qwen3)
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 369
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 39
Description
### Describe the issue
The Qwen3 model natively supports disabling its internal block generation via API parameters like "reasoning": false or "chat_template_kwargs": {"enable_thinking": false}. While these parameters work on Ollama and Azure deployments, Foundry Local's /v1/chat/completions API completely strips or ignores them. Passing reasoning disable flags, tuning sampler parameters (e.g., Temperature 0.7, Presence Penalty 1.5), or injecting prompt workarounds (/no_think or empty blocks) all fail. The API passes the request to the runtime in its default state, causing the model to generate massive (2,000+ token) blocks that severely delay response times (up to 4.5 minutes for simple queries).
_(Impact: Developers cannot programmatically disable reasoning mode for fast agentic execution on Foundry Local.)_
### To reproduce
**1.** Load a Qwen3 chat model (we tested qwen3.5-4b) on Foundry Local.
**2.** Send a /v1/chat/completions request with either "reasoning": false or "chat_template_kwargs": {"enable_thinking": false} set.
**3.** Compare against the same model/parameters on Ollama or Azure; reasoning is suppressed there.
**4.** On Foundry Local, observe the model still emitting a large ... block (2,000+ tokens observed) regardless of the flag.
**5.** Additional things we tried that also failed: tuning sampler parameters (Temperature 0.7, Presence Penalty 1.5) to discourage long reasoning, and prompt-level workarounds (/no_think suffix, injecting an empty block into the prompt). None suppressed the behavior.
_(Impact measured: simple queries that should return in a few seconds instead took up to 4.5 minutes due to the unsuppressable reasoning pass.)_
### Urgency
Medium, not a crash, but blocks fast agentic use cases; I had to add a 20s hard timeout wrapper as a workaround.
### Platform and architecture
Windows X64
### OS Version
Windows 11
### Installation type
Released package/binary
### Foundry Local version
0.10.2
### API or surface area
REST API
### Hardware acceleration/backend
CPU
### Backend/runtime version
_No response_
Contributor guide
Research direction
Start by reproducing the request against the /v1/chat/completions REST endpoint with the two Qwen3 disable-flag forms described in the issue. Trace how those parameters are handled before reaching the runtime, then verify that reasoning is suppressed and that the sampler and prompt-workaround cases remain understood. Done means the flags affect the released-package behavior without causing the observed long blocks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- ai, api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100