mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #1546] [MERGED] feat(gemini): tool calling #1946
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/1546
Author: @QIN2DIM
Created: 8/21/2025
Status: ✅ Merged
Merged: 8/21/2025
Merged by: @crazywoola
Base:
main← Head:gemini-tool-calling📝 Commits (4)
3389345feat(gemini): add support for url_context, code_execution, and enhanced feature compatibility validation11e58cafeat(gemini): add code execution feature and improve streaming response handlinge75d1cafeat(gemini): enable tool calling functionality32749d8Update manifest.yaml📊 Changes
8 files changed (+632 additions, -73 deletions)
View changed files
➕
models/gemini/.claude/settings.local.json(+26 -0)📝
models/gemini/manifest.yaml(+1 -1)📝
models/gemini/models/llm/gemini-2.0-flash.yaml(+36 -8)📝
models/gemini/models/llm/gemini-2.5-flash-lite.yaml(+27 -3)📝
models/gemini/models/llm/gemini-2.5-flash.yaml(+27 -3)📝
models/gemini/models/llm/gemini-2.5-pro.yaml(+26 -2)📝
models/gemini/models/llm/llm.py(+140 -56)➕
models/gemini/models/llm/test_feature_compatibility.py(+349 -0)📄 Description
Related Issues or Context
Key Changes
This update introduces significant new capabilities for the Gemini model, focusing on tool use, code execution, and robust feature validation.
Enabled Core Gemini Features:
tool.enabledtotruein the manifest.code_executionfeature, allowing the LLM to execute code for complex tasks. This includes refactored streaming logic to parseexecutable_codeandcode_execution_resultfrom the response.url_contextparameter, allowing URLs to be provided as context to the model.Implemented Strict Feature Compatibility Validation:
json_schemais mutually exclusive with other features,url_contextandcode_executioncannot be used simultaneously, and built-in tool-use features are disabled when custom tools are provided.test_feature_compatibility.py) has been added to cover these validation rules.Version Bump:
0.4.2to0.5.0to reflect the addition of these major new features.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.5.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.