When I use LLM generation, I always encounter the problem that the output stops halfway or Gemini only outputs think but no data content. I am very sure that the connection time What is the reason? #575

Closed
opened 2026-02-16 10:19:47 -05:00 by yindo · 4 comments
Owner

Originally created by @Vampxgg on GitHub (Aug 21, 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.7.2

Plugin version

OpenRouter0.0.17

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I use LLM generation, I always encounter the problem that the output stops halfway or Gemini only outputs think but no data content. I am very sure that the connection time and communication return time given by my background service are configured correctly. What is the reason?
Image

✔️ Error log

No response

Originally created by @Vampxgg on GitHub (Aug 21, 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.7.2 ### Plugin version OpenRouter0.0.17 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I use LLM generation, I always encounter the problem that the output stops halfway or Gemini only outputs think but no data content. I am very sure that the connection time and communication return time given by my background service are configured correctly. What is the reason? <img width="690" height="1434" alt="Image" src="https://github.com/user-attachments/assets/897d0842-bbd7-476b-a7bc-969aca943752" /> ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:19:47 -05:00
yindo closed this issue 2026-02-16 10:19:47 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 21, 2025):

The most common reasons for Gemini output stopping halfway or only returning "think" are:

  • Using a Gemini model that does not support text generation (for example, image-only models like gemini-2.0-flash-preview-image-generation will not return text output; you need to use a text-capable model such as gemini-pro or gemini-2.5-pro-exp-03-25) (source).
  • Prompt misconfiguration, especially missing either the system or user prompt in the LLM node—Gemini requires both to generate a complete response (source).
  • Exceeding the model's token or prompt length limits, which can cause truncation or incomplete output (source).
  • Plugin compatibility issues—some OpenRouter plugin versions have known bugs that can cause incomplete output. Trying a previously stable version (like 0.5 or 0.1.5) may help (source).
  • In Dify 1.7.2 self-hosted with OpenRouter, there are also known issues with file variable handling. If your workflow involves file uploads, use a custom variable instead of sys.file (source).

Double-check your Gemini model selection, prompt configuration, and token limits. If you’re using a supported model and still see issues, try downgrading the plugin or adjusting your prompt structure.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 21, 2025): <!-- Answer --> The most common reasons for Gemini output stopping halfway or only returning "think" are: - Using a Gemini model that does not support text generation (for example, image-only models like `gemini-2.0-flash-preview-image-generation` will not return text output; you need to use a text-capable model such as `gemini-pro` or `gemini-2.5-pro-exp-03-25`) [(source)](https://github.com/langgenius/dify/issues/23870). - Prompt misconfiguration, especially missing either the system or user prompt in the LLM node—Gemini requires both to generate a complete response [(source)](https://github.com/langgenius/dify/issues/24248). - Exceeding the model's token or prompt length limits, which can cause truncation or incomplete output [(source)](https://github.com/langgenius/dify/issues/24248). - Plugin compatibility issues—some OpenRouter plugin versions have known bugs that can cause incomplete output. Trying a previously stable version (like 0.5 or 0.1.5) may help [(source)](https://github.com/langgenius/dify/issues/24248). - In Dify 1.7.2 self-hosted with OpenRouter, there are also known issues with file variable handling. If your workflow involves file uploads, use a custom variable instead of `sys.file` [(source)](https://github.com/langgenius/dify/issues/23886). Double-check your Gemini model selection, prompt configuration, and token limits. If you’re using a supported model and still see issues, try downgrading the plugin or adjusting your prompt structure. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/eed8dec7-ec25-49de-b672-70e8a1eb25ce?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1543)
Author
Owner

@QIN2DIM commented on GitHub (Aug 21, 2025):

This is the problem with the upstream Gemini Provider, which has been around for a week

https://www.reddit.com/r/Bard/comments/1mukzvs/50_of_gemini_answers_today_are_truncated_or_empty/

@QIN2DIM commented on GitHub (Aug 21, 2025): This is the problem with the upstream Gemini Provider, which has been around for a week https://www.reddit.com/r/Bard/comments/1mukzvs/50_of_gemini_answers_today_are_truncated_or_empty/
Author
Owner

@Vampxgg commented on GitHub (Aug 22, 2025):

This is the problem with the upstream Gemini Provider, which has been around for a week这是上游 Gemini Provider 的问题,已经存在一周了

https://www.reddit.com/r/Bard/comments/1mukzvs/50_of_gemini_answers_today_are_truncated_or_empty/

Thank you for sharing. I really hope that the official can solve it quickly so that our application can run normally.

@Vampxgg commented on GitHub (Aug 22, 2025): > This is the problem with the upstream Gemini Provider, which has been around for a week这是上游 Gemini Provider 的问题,已经存在一周了 > > https://www.reddit.com/r/Bard/comments/1mukzvs/50_of_gemini_answers_today_are_truncated_or_empty/ Thank you for sharing. I really hope that the official can solve it quickly so that our application can run normally.
Author
Owner

@dosubot[bot] commented on GitHub (Sep 7, 2025):

Hi, @Vampxgg. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that using LLM generation with Dify 1.7.2 and OpenRouter plugin 0.0.17 on a self-hosted Docker setup causes Gemini outputs to stop halfway or return only "think" without data.
  • Common causes I suggested include non-text Gemini models, prompt misconfiguration, token limits, plugin bugs, and file variable issues.
  • You and QIN2DIM noted this is a known issue with the upstream Gemini Provider affecting many users recently.
  • There is hope for an official fix from the upstream provider, but no resolution yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Sep 7, 2025): Hi, @Vampxgg. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that using LLM generation with Dify 1.7.2 and OpenRouter plugin 0.0.17 on a self-hosted Docker setup causes Gemini outputs to stop halfway or return only "think" without data. - Common causes I suggested include non-text Gemini models, prompt misconfiguration, token limits, plugin bugs, and file variable issues. - You and QIN2DIM noted this is a known issue with the upstream Gemini Provider affecting many users recently. - There is hope for an official fix from the upstream provider, but no resolution yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#575