mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Vertex AI with PluginInvokeError in the agent node. #723
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 @Egoistsoul on GitHub (Oct 16, 2025).
Self Checks
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:
✔️ 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]\"...."}"}
@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

@Egoistsoul commented on GitHub (Oct 17, 2025):
This issue only appears in the agent node, and Vertex AI Gemini works fine in LLM node.
@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
Next Steps
Thank you for your understanding and contribution!
@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.
@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:
What's Next:
Thank you for your understanding and contribution!