mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 10:05:23 -04:00
[openai_api_compatible] Top-level "thinking" breaks compatibility with providers/models that don't support it #918
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 @utsumi-fj on GitHub (Jan 6, 2026).
Self Checks
Dify version
1.11.1
Plugin version
0.0.29
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When using OpenAI-API-compatible plugin, requests fail on providers/models that do not support the top-level
thinkingparameter.Error (screenshot):

This regression was introduced by commit
04dcfdc4d2(#2363), which adds the top-levelthinkingparameter to requests. Reverting that commit makes the issue disappear.In my case, this happens with the model hosted on vLLM accessed via LiteLLM using the
hosted_vllm/prefix.LiteLLM's drop_params can work around this in my setup, but other providers/models may not have an equivalent option, so this breaks compatibility more broadly.
✔️ Error log
@dosubot[bot] commented on GitHub (Jan 6, 2026):
The unconditional addition of the top-level
thinkingparameter in OpenAI-compatible plugin requests breaks compatibility with providers/models that don't support it, like vLLM via LiteLLM, resulting in 400 errors. This regression was introduced by a plugin SDK upgrade and related commits that added support for "thinking mode" in some models, but the parameter is sent to all providers regardless of compatibility (PR #191, PR #1851, PR #2129).LiteLLM's
drop_params=Truecan filter out unsupported parameters, but not all providers offer this, so the issue affects more than just LiteLLM setups. There is no conditional logic in the Dify core plugin client to add or remove thethinkingparameter based on provider compatibility—it is emitted unconditionally if present in the plugin or model config. No official fix or patch is available yet; the only workarounds are to revert the change or filter the parameter at the proxy/provider level if possible.This is a known pattern with OpenAI-compatible plugins: sending unsupported parameters (like
response_format.json_schema,json_schema, orthinking) to providers that don't recognize them causes failures (example issue). The best long-term solution would be for maintainers to add conditional logic sothinkingis only sent to providers/models that support it, or to provide a configuration option to disable it. For now, using a proxy that can drop unsupported parameters is the most reliable workaround if reverting is not possible.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other