mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Custom OpenAI-Compatible Model Returns Empty Output in Dify Workflow #468
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 @Tom2576 on GitHub (Jul 22, 2025).
Self Checks
Dify version
1.6.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Deploy Dify using docker-compose.
Configure a custom OpenAI-compatible model provider
Test the model connection in Dify
Create a workflow or chat using this model in Dify
Run the workflow or send a message in chat
Observe the result in the frontend
✔️ Expected Behavior
Dify workflow/chat should display the model's response output in the frontend.
❌ Actual Behavior
@dosubot[bot] commented on GitHub (Jul 22, 2025):
Hi @Tom2576! I'm Dosu and I’m helping the dify team.
This issue usually happens when the custom model's response isn't mapped correctly to Dify's internal schema. Dify doesn't parse raw OpenAI-compatible responses directly—it expects the adapter or plugin to transform the response into its own structure, specifically an
LLMResultorLLMResultChunk, where themessage.contentfield (fromAssistantPromptMessage) must contain the actual output text. If this field is empty or not set, the frontend will show no output, but the workflow will still report "success" and you won't see errors in the logs [docs reference].To troubleshoot:
choicesarray, and each choice should have atextormessage.contentfield).contentin theAssistantPromptMessagewhen building theLLMResultorLLMResultChunk[code reference].contentfield is populated.If you can share a sample of the raw response payload your model returns, I can help spot any mapping issues. This should help you pinpoint where the output is being dropped.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@Tom2576 commented on GitHub (Jul 22, 2025):
Thank you for your detailed reply!
Here is a sample of the JSON payload my custom model returns to Dify:
{
"id": "chatcmpl-openai-001",
"object": "chat.completion",
"created": 1721443033,
"model": "my-model-name",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is the answer from my model."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
@Tom2576 commented on GitHub (Jul 22, 2025):
@dosu.
@dosubot[bot] commented on GitHub (Aug 20, 2025):
Hi, @Tom2576. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
contentfield.message.contentinLLMResult.Next Steps:
Thanks for your understanding and contribution!