mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #2114] [MERGED] fix(vertex_ai): Prevent client from being closed during streaming #2267
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?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2114
Author: @kaixintang95
Created: 11/21/2025
Status: ✅ Merged
Merged: 11/21/2025
Merged by: @crazywoola
Base:
main← Head:fix/vertex-ai-streaming-client📝 Commits (1)
c242e2dfix(vertex_ai): Prevent client from being closed during streaming📊 Changes
2 files changed (+8 additions, -3 deletions)
View changed files
📝
models/vertex_ai/manifest.yaml(+1 -1)📝
models/vertex_ai/models/llm/llm.py(+7 -2)📄 Description
Keep genai.Client reference alive in generator closure to prevent garbage collection during streaming operations.
This fixes RuntimeError: "Cannot send a request, as the client has been closed" that occurs with google-genai SDK 1.51.0 when streaming responses.
Changes:
Same fix as applied to Gemini plugin in v0.5.11 (commit
9b383eba).Fixes: RuntimeError in streaming operations
Related: #2111
🤖 Generated with Claude Code
Related Issues or Context
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.