mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[OpenAI-API-compatible] GPT series models added from the Azure channel have error messages indicating unsupported parameters #878
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 @liukewia on GitHub (Dec 15, 2025).
Self Checks
Dify version
1.11.1
Plugin version
OpenAI-API-compatible 0.0.27
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Error log
No response
@dosubot[bot] commented on GitHub (Dec 15, 2025):
Hi @liukewia! I'm Dosu and I’m helping the dify-official-plugins team.
This error happens because the OpenAI-API-compatible plugin sends the chat_template_kwargs parameter to Azure GPT endpoints, but Azure's API does not recognize it and returns a 400 error. The plugin currently does not filter out unsupported parameters for Azure models—chat_template_kwargs is always included when "Agent Thought" is set to "Not Support" or similar modes, regardless of endpoint type. There is no user-facing configuration or workaround to prevent this; a code change is required.
To fix this, the plugin should detect if the target model is an Azure endpoint and remove chat_template_kwargs from the payload before making the API call. This logic should be added where the request is constructed, for example in the _invoke method of the OpenAI-compatible endpoint, by checking the app metadata or endpoint URL and conditionally excluding chat_template_kwargs when targeting Azure models. See the relevant code and explanation here.
Until this is patched in the plugin, Azure GPT models added via the OpenAI-compatible channel will continue to return this error if chat_template_kwargs is present. If you're comfortable editing code, you can implement this filtering yourself as a temporary fix. Otherwise, keep an eye out for plugin updates that address Azure parameter compatibility.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other