[PR #1587] [MERGED] feat(gemini): add gemini-2.5-flash-preview-image #1972

Closed
opened 2026-02-16 11:15:45 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1587
Author: @QIN2DIM
Created: 8/26/2025
Status: Merged
Merged: 8/27/2025
Merged by: @crazywoola

Base: mainHead: add-nano-banana


📝 Commits (6)

  • 61c6429 Update _position.yaml
  • 42b4e0d feat(models): add gemini-2.5-flash-image-preview model and update related configurations
  • 35d07ba feat(gemini): add support for nano banana image generation models
  • c1d920c refactor(llm): remove unused logger and simplify response handling
  • c101859 chore(version): update version to 0.5.2
  • 6216320 Update llm.py

📊 Changes

6 files changed (+47 additions, -6 deletions)

View changed files

📝 models/gemini/manifest.yaml (+1 -1)
📝 models/gemini/models/llm/_position.yaml (+1 -0)
models/gemini/models/llm/gemini-2.5-flash-image-preview.yaml (+31 -0)
📝 models/gemini/models/llm/llm.py (+12 -3)
📝 models/gemini/pyproject.toml (+1 -1)
📝 models/gemini/requirements.txt (+1 -1)

📄 Description

Related Issues or Context

⚠️ TODO:

  • multi-turns conversation
  • pytest cases
image

This PR contains Changes to Non-Plugin

  • Documentation
  • Other

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

This PR contains Changes to LLM Models Plugin

  • My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking)
  • My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node)
  • My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.)
  • My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.)
  • My Changes Affect Structured Output Format (JSON, XML, etc.)
  • My Changes Affect Token Consumption Metrics
  • My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.)
  • Other Changes (Add New Models, Fix Model Parameters etc.)

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in Manifest.yaml (Top-Level Version Field, Not in Meta Section)

Dify Plugin SDK Version

  • I have Ensured dify_plugin>=0.3.0,<0.5.0 is in requirements.txt (SDK docs)

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is: , I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration.

SaaS Environment

  • I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration

🔄 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/1587 **Author:** [@QIN2DIM](https://github.com/QIN2DIM) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/27/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `add-nano-banana` --- ### 📝 Commits (6) - [`61c6429`](https://github.com/langgenius/dify-official-plugins/commit/61c642912a39f48d9e686a049e4fd331bd826515) Update _position.yaml - [`42b4e0d`](https://github.com/langgenius/dify-official-plugins/commit/42b4e0d663c66615299590b73145e932d9f5c5cd) feat(models): add gemini-2.5-flash-image-preview model and update related configurations - [`35d07ba`](https://github.com/langgenius/dify-official-plugins/commit/35d07bad706988ba01cc81b9dae0947fdba66302) feat(gemini): add support for nano banana image generation models - [`c1d920c`](https://github.com/langgenius/dify-official-plugins/commit/c1d920cf6a69b37ac1ae5899f54c867b898c7167) refactor(llm): remove unused logger and simplify response handling - [`c101859`](https://github.com/langgenius/dify-official-plugins/commit/c1018597c333c314aec5ca52b4cc340c9d455065) chore(version): update version to 0.5.2 - [`6216320`](https://github.com/langgenius/dify-official-plugins/commit/6216320be1adc2bcd0ebfb12d2942921f0093451) Update llm.py ### 📊 Changes **6 files changed** (+47 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `models/gemini/manifest.yaml` (+1 -1) 📝 `models/gemini/models/llm/_position.yaml` (+1 -0) ➕ `models/gemini/models/llm/gemini-2.5-flash-image-preview.yaml` (+31 -0) 📝 `models/gemini/models/llm/llm.py` (+12 -3) 📝 `models/gemini/pyproject.toml` (+1 -1) 📝 `models/gemini/requirements.txt` (+1 -1) </details> ### 📄 Description ## Related Issues or Context <!-- ⚠️ NOTE: This repository is for Dify Official Plugins only. For community contributions, please submit to https://github.com/langgenius/dify-plugins instead. - Link Related Issues if Applicable: #issue_number - Or Provide Context about Why this Change is Needed --> ⚠️ TODO: - [ ] multi-turns conversation - [ ] pytest cases <img width="861" height="691" alt="image" src="https://github.com/user-attachments/assets/828825ae-d8ea-4bbc-b73a-417e3d2ff72c" /> ## This PR contains Changes to *Non-Plugin* <!-- Put an `x` in all the boxes that apply by replacing [ ] with [x] For example: - [x] Documentation --> - [ ] Documentation - [ ] Other ## This PR contains Changes to *Non-LLM Models Plugin* - [x] I have Run Comprehensive Tests Relevant to My Changes <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> ## This PR contains Changes to *LLM Models Plugin* <!-- LLM Models Test Example: --> <!-- https://github.com/langgenius/dify-official-plugins/blob/main/.assets/test-examples/llm-plugin-tests/llm_test_example.md --> - [ ] My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Structured Output Format (JSON, XML, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Token Consumption Metrics <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> - [ ] Other Changes (Add New Models, Fix Model Parameters etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in Manifest.yaml (Top-Level `Version` Field, Not in Meta Section) <!-- ⚠️ NOTE: Version Format: MAJOR.MINOR.PATCH - MAJOR (0.x.x): Reserved for Significant architectural changes or incompatible API modifications - MINOR (x.0.x): For New feature additions while maintaining backward compatibility - PATCH (x.x.0): For Backward-compatible bug fixes and minor improvements - Note: Each Version Component (MAJOR, MINOR, PATCH) Can Be 2 Digits, e.g., 10.11.22 --> ## Dify Plugin SDK Version - [x] I have Ensured `dify_plugin>=0.3.0,<0.5.0` is in requirements.txt ([SDK docs](https://github.com/langgenius/dify-plugin-sdks/blob/main/python/README.md)) ## Environment Verification (If Any Code Changes) <!-- ⚠️ NOTE: At Least One Environment Must Be Tested. --> ### Local Deployment Environment - [ ] Dify Version is: <!-- Specify Your Version (e.g., 1.2.0) -->, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration. <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt - No Breaking Changes in Dify That May Affect the Testing Result --> ### SaaS Environment - [x] I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt --> --- <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 11:15:45 -05:00
yindo closed this issue 2026-02-16 11:15:45 -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#1972