dify
dify copied to clipboard
Chat with DeepSeek-R1 API through Azure AI Studio get unexpected end alert
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
0.15.3
Cloud or Self Hosted
Cloud
Steps to reproduce
When chat with DeepSeek-R1 through Azure AI Studio model, will get following alert and stop response streaming. Alert message: [azure_ai_studio] Error: 'utf-8' codec can't decode byte 0xe4 in position 5: unexpected end of data"
Possible solution: Fix bug in api/core/model_runtime/model_providers/azure_ai_studio/llm/llm.py , adding decode handling method.
✔️ Expected Behavior
Process respond until end successful.
❌ Actual Behavior
data: {"event": "agent_message", "conversation_id": "32ff1015-7cbf-4557-92be-33a147a461f1", "message_id": "c7734cb8-5ead-41c5-92d0-9474b8308a24", "created_at": 1739456925, "task_id": "13027371-7921-48fc-a8c2-749db4330487", "id": "c7734cb8-5ead-41c5-92d0-9474b8308a24", "answer": "\u4ef7"}
data: {"event": "error", "conversation_id": "32ff1015-7cbf-4557-92be-33a147a461f1", "message_id": "c7734cb8-5ead-41c5-92d0-9474b8308a24", "created_at": 1739456925, "code": "completion_request_error", "status": 400, "message": "[azure_ai_studio] Error: 'utf-8' codec can't decode byte 0xe4 in position 5: unexpected end of data"}