mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
enable_thinking of llm of openai_api_compatible is not work for some model #945
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yimlin on GitHub (Jan 22, 2026).
Self Checks
Dify version
1.8.1
Plugin version
0.0.28
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
enable_thinking for llm is not work for some model.
we add the cdoe as below
now, it works
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Jan 22, 2026):
Hi @yimlin! I'm Dosu and I’m helping the dify-official-plugins team.
Your findings are correct: the
enable_thinkingparameter in the OpenAI API compatible plugin doesn't work for all models because different providers and models expect different parameter names or formats for "thinking mode". For example, some models (like DeepSeek v3.1 on Volcengine) only recognize athinkingparameter, notenable_thinkingref. Others (like Qwen3 on vLLM) may requirethinking_modeor have strict requirements for whenenable_thinkingcan be set ref.The official plugin code tries to handle this by checking the model's
agent_thought_supportcapability and, if supported, sets bothenable_thinkingandthinkinginchat_template_kwargs, and sometimes a top-levelthinkingparameter for Zhipu-style APIs ref. However, not all models or providers support all of these parameters, and sending unsupported ones can cause errors (e.g., vLLM via LiteLLM will reject unknown parameters) ref.Your workaround—adding
thinkingandthinking_modein addition toenable_thinking—works for some models because it covers more of the possible parameter names that different backends might expect. There is no universal standard, so the best practice is to check the documentation or YAML config for your specific model/provider to see which parameter(s) it expects for thinking mode. Avoid sending parameters that the backend doesn't support.If you want robust compatibility, consider adding logic to only include the parameters required by the target model/provider, and use the latest plugin/model YAMLs, as recent updates have improved support for these options ref.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@yimlin commented on GitHub (Jan 22, 2026):
I totally agree.
and i pull a new feature.
https://github.com/langgenius/dify-official-plugins/issues/2472