mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Support for Azure OpenAI Plugin's Responses API #861
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 @tomy-kyu on GitHub (Dec 9, 2025).
Self Checks
Dify version
1.10.1-fix.1
Plugin version
0.0.31
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Regarding the Azure OpenAI plugin, the current version appears to prevent the gpt-5.x Codex model from being used. While this functionality was available until last Friday (December 5th), Microsoft appears to have recently completely restricted access to the ChatCompletion API for Codex.
Currently, only the gpt-5-codex model supports processing using the Responses API.
However, the inclusion of gpt-5.1-codex and gpt-5.1-codex-mini in base_model_name suggests that this support will need to be added.
models/llm/llm.py
line:73-
Furthermore, the Credential Validation process is also configured to assume ChatCompletion, so even if Responses API processing were to be integrated, it would likely result in validation failure...
models/llm/llm.py
line 152-182:
Therefore, validation processing tailored to the Responses API appears to be necessary.
Similar to other Completion API processing, the max_tokens setting must be set to 16 or higher - ensuring that this parameter is properly configured should suffice.
We would appreciate it if you could reconsider the processing configuration to accommodate the Responses API.
Thank you for your consideration.
✔️ Error log
We have captured the error message displayed during issue occurrence as an image for your reference.
@dosubot[bot] commented on GitHub (Dec 9, 2025):
To support the Responses API for gpt-5.1-codex and gpt-5.1-codex-mini, you’ll need to update the AzureOpenAILargeLanguageModel implementation so these models are routed to the _chat_generate_with_responses method, not just gpt-5-codex. This means changing the check in _invoke to include all three models: gpt-5-codex, gpt-5.1-codex, and gpt-5.1-codex-mini. The _chat_generate_with_responses method already handles prompt conversion, parameter mapping (including max_tokens → max_output_tokens), and other necessary logic for the Responses API, so no further changes are needed there for basic support source.
You’ll also need to update credential validation: currently, validate_credentials only checks ChatCompletion or Completion endpoints, which will fail for these models. Add a path for these Codex models to perform a credential check using the Responses API (client.responses.create) and ensure max_output_tokens is set to at least 16 source.
Finally, check for any other places in the codebase that reference model routing or validation for these models to ensure comprehensive support. Testing with all affected models and confirming error-free credential validation and API calls will help verify the fix.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@nadazero commented on GitHub (Dec 10, 2025):
same issue, and I raise issue on https://github.com/langgenius/dify-plugin-sdks/issues/264
@nadazero commented on GitHub (Dec 10, 2025):
looking at the source code of the dify_plugin, in the validate_credentials method of https://github.com/langgenius/dify-plugin-sdks/blob/main/python/dify_plugin/interfaces/model/openai_compatible/llm.py, it seems that only the chat/completions calls are not yet adapted for the /responses handling.
Therefore, I hope someone can do the adaptation in this regard.
@nadazero commented on GitHub (Dec 10, 2025):
@tomy-kyu commented on GitHub (Dec 10, 2025):
While I can't guarantee whether this will be helpful, I've generated sample code using the Responses API to enable chat functionality with gpt-5.1-codex-max and Gemini3. Since our primary goal was to test GPT-5.1 and GPT-5.1-codex series functionality, we've confirmed that both models can operate reasonably well. However, image processing response times are extremely slow, which remains a significant challenge.
https://gist.github.com/tomy-kyu/43057dd58302ab95c0f99d4b3dca9d51
There are likely various other issues lurking beneath the surface as well, so this should primarily serve as reference material.
Thank you for your consideration.
@dosubot[bot] commented on GitHub (Dec 26, 2025):
Hi, @tomy-kyu. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!