Skip to content

fix: add qwen, deepseek, claude to TOOL_USE_ENFORCEMENT_MODELS#28081

Closed
wzgrx wants to merge 1 commit into
NousResearch:mainfrom
wzgrx:fix/tool-enforcement-for-qwen-deepseek
Closed

fix: add qwen, deepseek, claude to TOOL_USE_ENFORCEMENT_MODELS#28081
wzgrx wants to merge 1 commit into
NousResearch:mainfrom
wzgrx:fix/tool-enforcement-for-qwen-deepseek

Conversation

@wzgrx

@wzgrx wzgrx commented May 18, 2026

Copy link
Copy Markdown

Problem\nModels like Qwen (qwen3.6-plus), DeepSeek, and Anthropic Claude were not triggering tool-use enforcement instructions in auto mode. This caused agents to hallucinate actions ("saying but not doing") instead of actually executing tools.\n\n## Solution\nAdded "qwen", "deepseek", "claude", and "anthropic" to the TOOL_USE_ENFORCEMENT_MODELS tuple in agent/prompt_builder.py.\n\n## Impact\nThis ensures that when users use Qwen, DeepSeek, or Claude with tool_use_enforcement: auto, the agent receives the strict instructions to actually call tools instead of just describing them.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder provider/qwen Qwen / Alibaba Cloud (OAuth) provider/deepseek DeepSeek API labels May 18, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing in favor of #28195 by @briandevans, which is a strict superset: same fix for qwen + deepseek PLUS adds claude/anthropic PLUS ships unit-test coverage for the new entries. Both PRs add the same model substrings to TOOL_USE_ENFORCEMENT_MODELS in agent/prompt_builder.py, so the work itself is duplicative. We're going with the version that includes the tests. Thanks for spotting the bug — credit to both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists provider/deepseek DeepSeek API provider/qwen Qwen / Alibaba Cloud (OAuth) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants