Vertex AI with PluginInvokeError in the agent node. #723

Closed
opened 2026-02-16 10:20:18 -05:00 by yindo · 5 comments
Owner

Originally created by @Egoistsoul on GitHub (Oct 16, 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.8.1

Plugin version

0.0.24

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Using Gemini models from Vertex AI in the agent node, and the prompt error:

Image

✔️ Error log

Failed to transform agent message: req_id: 876229a7a4 PluginInvokeError: {"args":{},"error_type":"Exception","message":"read llm model failed: request failed: [vertex_ai] Error: req_id: 421f7a24d7 PluginInvokeError: {"args":{},"error_type":"ParseError","message":"Failed to parse candidates field: Failed to parse content field: Failed to parse parts field: Message type \"google.cloud.aiplatform.v1.Part\" should not have multiple \"data\" oneof fields at \"GenerateContentResponse.candidates[0].content.parts[0]\"...."}"}

Originally created by @Egoistsoul on GitHub (Oct 16, 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.8.1 ### Plugin version 0.0.24 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Using Gemini models from Vertex AI in the agent node, and the prompt error: <img width="957" height="721" alt="Image" src="https://github.com/user-attachments/assets/acf80514-f8cc-44a6-b6d4-73bf94d504a6" /> ### ✔️ Error log Failed to transform agent message: req_id: 876229a7a4 PluginInvokeError: {"args":{},"error_type":"Exception","message":"read llm model failed: request failed: [vertex_ai] Error: req_id: 421f7a24d7 PluginInvokeError: {\"args\":{},\"error_type\":\"ParseError\",\"message\":\"Failed to parse candidates field: Failed to parse content field: Failed to parse parts field: Message type \\\"google.cloud.aiplatform.v1.Part\\\" should not have multiple \\\"data\\\" oneof fields at \\\"GenerateContentResponse.candidates[0].content.parts[0]\\\"....\"}"}
yindo added the bug label 2026-02-16 10:20:18 -05:00
yindo closed this issue 2026-02-16 10:20:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 16, 2025):

This error is a known issue when using Gemini models from Vertex AI in Dify agent nodes. The root cause is a mismatch between the expected protobuf response schema and what the Gemini models actually return—specifically, the plugin encounters multiple "data" fields in a protobuf "Part", which violates the oneof constraint and triggers a parse error. This typically happens because Gemini models require the :streamGenerateContent endpoint, but Dify currently only supports the :predict endpoint, leading to unsupported or malformed responses reference.

Recent threads confirm this is model-specific and often affects Gemini 2.5 pro and flash, but not flash-lite. The maintainers have discussed migrating to the new GenAI SDK to resolve these parsing issues, but no fix has been merged yet reference.

Workarounds reported by users include: using supported regions (like us-central1), switching to non-preview Gemini models, or retrying requests several times if errors are intermittent reference. If you need immediate stability, you might try using Gemini 2.5 flash-lite or downgrading the plugin, but full compatibility will likely require a future update to the plugin to support the correct endpoint and response format.

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 (Oct 16, 2025): <!-- Answer --> This error is a known issue when using Gemini models from Vertex AI in Dify agent nodes. The root cause is a mismatch between the expected protobuf response schema and what the Gemini models actually return—specifically, the plugin encounters multiple "data" fields in a protobuf "Part", which violates the oneof constraint and triggers a parse error. This typically happens because Gemini models require the :streamGenerateContent endpoint, but Dify currently only supports the :predict endpoint, leading to unsupported or malformed responses [reference](https://github.com/langgenius/dify/issues/17574). Recent threads confirm this is model-specific and often affects Gemini 2.5 pro and flash, but not flash-lite. The maintainers have discussed migrating to the new GenAI SDK to resolve these parsing issues, but no fix has been merged yet [reference](https://github.com/langgenius/dify-official-plugins/issues/1476#issuecomment-3232301884). Workarounds reported by users include: using supported regions (like us-central1), switching to non-preview Gemini models, or retrying requests several times if errors are intermittent [reference](https://github.com/langgenius/dify-official-plugins/issues/1134#issuecomment-3076555008). If you need immediate stability, you might try using Gemini 2.5 flash-lite or downgrading the plugin, but full compatibility will likely require a future update to the plugin to support the correct endpoint and response format. <!-- 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/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/859cc137-48c0-40a5-b11e-18803552888f?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/1874)
Author
Owner

@Egoistsoul commented on GitHub (Oct 17, 2025):

This issue only appears in the agent node, and Vertex AI Gemini works fine in LLM node.

@Egoistsoul commented on GitHub (Oct 17, 2025): This issue only appears in the agent node, and Vertex AI Gemini works fine in LLM node.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 2, 2025):

Hi, @Egoistsoul. 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 a PluginInvokeError in Dify 1.8.1 with plugin 0.0.24 when using Vertex AI Gemini models in the agent node.
  • The error is due to protobuf parsing failures caused by multiple "data" fields violating oneof constraints.
  • This stems from Dify using the :predict endpoint instead of the required :streamGenerateContent endpoint for Gemini models.
  • The issue affects Gemini 2.5 pro and flash models but not flash-lite, and Gemini works fine in the LLM node.
  • Workarounds include using supported regions or model variants.

Next Steps

  • Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 2, 2025): Hi, @Egoistsoul. 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 a PluginInvokeError in Dify 1.8.1 with plugin 0.0.24 when using Vertex AI Gemini models in the agent node. - The error is due to protobuf parsing failures caused by multiple "data" fields violating oneof constraints. - This stems from Dify using the :predict endpoint instead of the required :streamGenerateContent endpoint for Gemini models. - The issue affects Gemini 2.5 pro and flash models but not flash-lite, and Gemini works fine in the LLM node. - Workarounds include using supported regions or model variants. **Next Steps** - Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Author
Owner

@Egoistsoul commented on GitHub (Nov 2, 2025):

Yes, this issue still exist in Dify 1.9.2 and Vertex Plugin 0.0.24, both are the latest version.

@Egoistsoul commented on GitHub (Nov 2, 2025): Yes, this issue still exist in Dify 1.9.2 and Vertex Plugin 0.0.24, both are the latest version.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 19, 2025):

Hi, @Egoistsoul. 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 a PluginInvokeError in Dify v1.8.1 and v1.9.2 with plugin v0.0.24 when using Vertex AI Gemini models in the agent node.
  • The error is caused by protobuf parsing failures due to multiple "data" fields violating oneof constraints.
  • The root cause is that Dify uses the :predict endpoint instead of the required :streamGenerateContent endpoint for Gemini models.
  • This issue affects Gemini 2.5 pro and flash models but not flash-lite, and Gemini works fine in the LLM node.
  • No fix has been merged yet; workarounds include using supported regions or model variants.

What's Next:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • Otherwise, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 19, 2025): Hi, @Egoistsoul. 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 a PluginInvokeError in Dify v1.8.1 and v1.9.2 with plugin v0.0.24 when using Vertex AI Gemini models in the agent node. - The error is caused by protobuf parsing failures due to multiple "data" fields violating oneof constraints. - The root cause is that Dify uses the :predict endpoint instead of the required :streamGenerateContent endpoint for Gemini models. - This issue affects Gemini 2.5 pro and flash models but not flash-lite, and Gemini works fine in the LLM node. - No fix has been merged yet; workarounds include using supported regions or model variants. **What's Next:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - Otherwise, I will automatically close this issue 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#723