cannot configure self-hosted qwen3 model in openai-api-compatible #469

Closed
opened 2026-02-16 10:19:30 -05:00 by yindo · 1 comment
Owner

Originally created by @AkisAya on GitHub (Jul 23, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.6.0

Plugin version

0.0.17

Cloud or Self Hosted

Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

configure model in openai-api-compatible provider

✔️ Error log

Image

Originally created by @AkisAya on GitHub (Jul 23, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.6.0 ### Plugin version 0.0.17 ### Cloud or Self Hosted Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce configure model in openai-api-compatible provider ### ✔️ Error log ![Image](https://github.com/user-attachments/assets/f1a081f1-215c-41eb-b0db-deeeb9ad8f23)
yindo added the bug label 2026-02-16 10:19:30 -05:00
yindo closed this issue 2026-02-16 10:19:30 -05:00
Author
Owner

@AkisAya commented on GitHub (Jul 23, 2025):

openai-api-compatible provider use a non-stream mode to validate models by default, but it's not working when configure a qwen3 model because qwen3 is a thinking model

  File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/resources/chat/completions/completions.py", line 925, in create
    return self._post(
           ^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/_base_client.py", line 1249, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/_base_client.py", line 1037, in request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - parameter.enable_thinking must be set to false for non-streaming calls. Received Model Group=qwen3-32b\nAvailable Model Group Fallbacks=None', 'type': 'invalid_request_error', 'param': None, 'code': '400'}}

dify-plugin sdk supports validating credentials using a streaming mode according to this commit https://github.com/langgenius/dify-plugin-sdks/commit/a4da30d106fa84df53534cc24419d9a4d39d8680

but openai-api-compatible provider hasn't expose the stream_mode_auth key yet

@AkisAya commented on GitHub (Jul 23, 2025): openai-api-compatible provider use a non-stream mode to validate models by default, but it's not working when configure a qwen3 model because qwen3 is a thinking model ``` File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/resources/chat/completions/completions.py", line 925, in create return self._post( ^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/_base_client.py", line 1249, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniconda/base/envs/llm/lib/python3.12/site-packages/openai/_base_client.py", line 1037, in request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - parameter.enable_thinking must be set to false for non-streaming calls. Received Model Group=qwen3-32b\nAvailable Model Group Fallbacks=None', 'type': 'invalid_request_error', 'param': None, 'code': '400'}} ``` dify-plugin sdk supports validating credentials using a streaming mode according to this commit https://github.com/langgenius/dify-plugin-sdks/commit/a4da30d106fa84df53534cc24419d9a4d39d8680 but openai-api-compatible provider hasn't expose the stream_mode_auth key yet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#469