Open nguyenphan opened 1 week ago
The issue you're experiencing with the Gemini model in Dify, where the workflow step returns a status of 'succeeded' but lacks a finish_reason
and has zero usage data, might be related to changes introduced in the v0.10 update. This update replaced the "Image Upload" feature with a more comprehensive "File Upload" feature, marking the image upload option as LEGACY
and planning for its future deprecation [1].
To address this, consider the following steps:
Check File Upload Configuration: Ensure that your workflow is using the new "File Upload" feature correctly, as the legacy image upload might not be fully supported anymore.
Review Workflow Logic: Double-check the logic and configuration of your workflow step to ensure it aligns with the new update's requirements.
Debugging and Logging: Since the issue seems specific to the Gemini model, review any available logs or debugging information that might provide more insight into why the finish_reason
and usage data are not being populated.
If these steps do not resolve the issue, it might be necessary to look into the specific configurations or error handling mechanisms for the Gemini model, although specific details on these were not found in the available documentation.
To continue talking to Dosu, mention @dosu.
I don't think it has anything to do with the image upload though. I used the GUI to test and did not provide any image in testing the step. Just by sending those input, the response is broken half way like it was prematurely ended somehow.
Self Checks
Dify version
0.10.1
Cloud or Self Hosted
Cloud
Steps to reproduce
✔️ Expected Behavior
The workflow step should complete with a proper finish_reason and accurate usage data, similar to the behavior seen with other models like gpt4o-mini. The usage object should reflect the tokens used and provide correct pricing information.
❌ Actual Behavior
• The workflow step runs and returns a status of succeeded, but: • The finish_reason is null. • All values in the usage object (e.g., prompt_tokens, completion_tokens, total_tokens, total_price) are zero. • The response contains incomplete output, cutting off mid-sentence. • This issue occurs only when using the Gemini model (gemini-1.5-pro-latest). The same workflow runs correctly when using the gpt4o-mini model.
Example of the node output:
This issue started occurring after the v0.10 update and only affects workflows using the Gemini model.