[PR #588] [MERGED] Gemini Model: fix bug & introduce new setting #1451

Closed
opened 2026-02-16 10:22:58 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/588
Author: @chekun
Created: 3/28/2025
Status: Merged
Merged: 4/3/2025
Merged by: @crazywoola

Base: mainHead: main


📝 Commits (7)

  • 0c8751c fix files.get calling bug & support local_files_url override for better performance
  • dd4f570 update readme to introduce Local Files URL setting
  • 116134e bump 0.1.1
  • 18606a4 fix: files.get for cache existed case
  • b2bc0ae resolve confilicts
  • 8e518a3 change local_files_url to file_url
  • 324a4dd change readme to macth file_url setting

📊 Changes

5 files changed (+22 additions, -7 deletions)

View changed files

📝 models/gemini/README.md (+2 -0)
📝 models/gemini/_assets/gemini-01.png (+0 -0)
📝 models/gemini/manifest.yaml (+1 -1)
📝 models/gemini/models/llm/llm.py (+11 -6)
📝 models/gemini/provider/google.yaml (+8 -0)

📄 Description

Related Issue or Context

Type of Change

  • Bug Fix (non-breaking change which fixes an Issue)
  • New Feature (non-breaking change which adds Functionality)
  • Breaking Change (fix or feature that may cause existing Functionality to not work as expected)
  • Documentation Update
  • Code Refactoring
  • Other

Version Control (if applicable)

  • Version bumped in Manifest.yaml (top-level Version field, not in Meta section)

Test Screenshots or Video/GIF:

In the video:

  1. at the gemini official node, you can see we wait a very long time for the video to be uploaded, then there is an error raised.
    TypeError: Files.get() takes 1 positional argument but 2 were given, it shows 2 things:
    • the new genai sdk caused the error
    • the tunnel is slow and took long time for plugin to download
  2. at the gemini chekun node, you can see it's very fast, and no error raised.

Environment Verification

Tested with v1.1.3

Local Deployment Environment

Local Deployment Dify Version: 1.1.3
  • Changes tested in an Isolated Environment that matches Production Configuration
  • No Cached Data influenced the Test Results

SaaS Environment

  • Testing performed on cloud.dify.ai

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/588 **Author:** [@chekun](https://github.com/chekun) **Created:** 3/28/2025 **Status:** ✅ Merged **Merged:** 4/3/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`0c8751c`](https://github.com/langgenius/dify-official-plugins/commit/0c8751c435925d8a3fbef7f8d18b69d380c3fcf5) fix files.get calling bug & support local_files_url override for better performance - [`dd4f570`](https://github.com/langgenius/dify-official-plugins/commit/dd4f57099d54a0b8b60863bacbb6bd5d7e3bf37f) update readme to introduce `Local Files URL` setting - [`116134e`](https://github.com/langgenius/dify-official-plugins/commit/116134e39269c339c942d18f75929242703c4a5c) bump 0.1.1 - [`18606a4`](https://github.com/langgenius/dify-official-plugins/commit/18606a4d8d50e1f07d01e9786c6be183086de055) fix: files.get for cache existed case - [`b2bc0ae`](https://github.com/langgenius/dify-official-plugins/commit/b2bc0aeeb27a0f679e3995992169454e47ed6ee1) resolve confilicts - [`8e518a3`](https://github.com/langgenius/dify-official-plugins/commit/8e518a35c5e8b085873499b8183de5cf0ac44ae4) change local_files_url to file_url - [`324a4dd`](https://github.com/langgenius/dify-official-plugins/commit/324a4dd003fbeebe9ace1adb78781c06191e7c3e) change readme to macth file_url setting ### 📊 Changes **5 files changed** (+22 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `models/gemini/README.md` (+2 -0) 📝 `models/gemini/_assets/gemini-01.png` (+0 -0) 📝 `models/gemini/manifest.yaml` (+1 -1) 📝 `models/gemini/models/llm/llm.py` (+11 -6) 📝 `models/gemini/provider/google.yaml` (+8 -0) </details> ### 📄 Description ## Related Issue or Context <!-- - Link related Issues if applicable: #issue_number - Or provide Context about why this Change is needed --> ## Type of Change <!-- Put an `x` in all the boxes that apply --> - [ ] Bug Fix (non-breaking change which fixes an Issue) - [x] New Feature (non-breaking change which adds Functionality) - [ ] Breaking Change (fix or feature that may cause existing Functionality to not work as expected) - [x] Documentation Update - [ ] Code Refactoring - [ ] Other ## Version Control (if applicable) - [x] Version bumped in Manifest.yaml (top-level `Version` field, not in Meta section) ### Test Screenshots or Video/GIF: <video src="https://github.com/user-attachments/assets/98dc0705-8895-449f-ba91-1999fb4f9707"></video> In the video: 1. at the gemini official node, you can see we wait a very long time for the video to be uploaded, then there is an error raised. `TypeError: Files.get() takes 1 positional argument but 2 were given`, it shows 2 things: - the new genai sdk caused the error - the tunnel is slow and took long time for plugin to download 2. at the gemini chekun node, you can see it's very fast, and no error raised. ### Environment Verification Tested with v1.1.3 #### Local Deployment Environment ##### Local Deployment Dify Version: 1.1.3 - [x] Changes tested in an Isolated Environment that matches Production Configuration <!-- - Python virtual env matching Manifest.yaml & requirements.txt - No breaking changes in Dify that may affect the testing result --> - [x] No Cached Data influenced the Test Results #### SaaS Environment - [ ] Testing performed on cloud.dify.ai --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:22:58 -05:00
yindo closed this issue 2026-02-16 10:22:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1451