Skip to content

feat(vertex_ai): add Gemini 3.5 Flash model support#3167

Open
fuyundev wants to merge 1 commit into
langgenius:mainfrom
fuyundev:main
Open

feat(vertex_ai): add Gemini 3.5 Flash model support#3167
fuyundev wants to merge 1 commit into
langgenius:mainfrom
fuyundev:main

Conversation

@fuyundev
Copy link
Copy Markdown
Contributor

Adds the gemini-3.5-flash model definition under vertex_ai, mirroring the parameter style of the existing Gemini 3 family (thinking_level, include_thoughts, media_resolution, grounding, url_context, code_execution, json_schema). Registers the model in GLOBAL_ONLY_MODELS_DEFAULT and bumps the plugin manifest to 0.0.54.

Summary

Change Type

  • Documentation / non-plugin change
  • Non-LLM plugin (tools, extensions, datasource, etc.)
  • LLM plugin

Screenshots / Videos

Before After

LLM Plugin Checklist

Areas affected by this change (check all that apply)
  • Message flow (system messages, user ↔ assistant turn-taking)
  • Tool interaction flow (multi-round usage, Agent App and Agent Node)
  • Multimodal input (images, PDFs, audio, video, etc.)
  • Multimodal output (images, audio, video, etc.)
  • Structured output (JSON, XML, etc.)
  • Token consumption metrics
  • Other LLM functionality (reasoning, grounding, prompt caching, etc.)
  • New models / model parameter fixes

Version

  • Bumped top-level version in manifest.yaml (not the one under meta)
  • dify_plugin>=0.3.0,<0.6.0 is declared in pyproject.toml and locked in uv.lock (or kept in requirements.txt for legacy plugins without uv.lock) — SDK docs

Testing

  • Local deployment — Dify version:
  • SaaS (cloud.dify.ai)

Adds the `gemini-3.5-flash` model definition under vertex_ai, mirroring the
parameter style of the existing Gemini 3 family (thinking_level,
include_thoughts, media_resolution, grounding, url_context, code_execution,
json_schema). Registers the model in `GLOBAL_ONLY_MODELS_DEFAULT` and bumps
the plugin manifest to 0.0.54.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels May 20, 2026
@fuyundev fuyundev temporarily deployed to models/vertex_ai May 20, 2026 05:38 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the gemini-3.5-flash model to the Vertex AI provider. The changes include a new configuration file defining the model's features, parameters—such as temperature, thinking level, and media resolution—and pricing details. The model has also been added to the supported models list in llm.py, and the manifest version was incremented. I have no feedback to provide as there were no review comments to evaluate.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the Gemini 3.5 Flash model by adding a new configuration file and updating the model list. Feedback suggests that pricing values should be numeric rather than strings for better system integration. Additionally, the reviewer recommended reducing the maximum output tokens and reviewing the pricing figures, which seem high compared to typical Flash model specifications.

Comment thread models/vertex_ai/models/llm/gemini-3.5-flash.yaml
Comment thread models/vertex_ai/models/llm/gemini-3.5-flash.yaml
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the gemini-3.5-flash model to the Vertex AI provider, updates the manifest version, and registers the new model. The reviewer suggested verifying the pricing rates due to their high values, adjusting the max_output_tokens to 8,192 to prevent API errors, and using numeric types for pricing fields in the YAML configuration.

Comment thread models/vertex_ai/models/llm/gemini-3.5-flash.yaml
Comment thread models/vertex_ai/models/llm/gemini-3.5-flash.yaml
Comment thread models/vertex_ai/models/llm/gemini-3.5-flash.yaml
@wahajahmed010
Copy link
Copy Markdown
Contributor

Nice addition! A few observations from the automated review:

  1. Pricing values should be numeric (float), not stringsinput: "1.5", output: "9.00", and unit: "0.000001" should be input: 1.5, output: 9.0, unit: 0.000001 for consistency with other model YAML files.

  2. max_output_tokens seems high for a Flash model — 65536 is much higher than typical Flash models (usually 8192-16384). Worth double-checking against the Gemini docs.

  3. Pricing rates — $1.5/$9.0 per 1M tokens seems high for a Flash model. The current Gemini 2.0 Flash is $0.10/$0.40. Is this intentional for Vertex AI pricing?

@fuyundev
Copy link
Copy Markdown
Contributor Author

Nice addition! A few observations from the automated review:

  1. Pricing values should be numeric (float), not stringsinput: "1.5", output: "9.00", and unit: "0.000001" should be input: 1.5, output: 9.0, unit: 0.000001 for consistency with other model YAML files.
  2. max_output_tokens seems high for a Flash model — 65536 is much higher than typical Flash models (usually 8192-16384). Worth double-checking against the Gemini docs.
  3. Pricing rates — $1.5/$9.0 per 1M tokens seems high for a Flash model. The current Gemini 2.0 Flash is $0.10/$0.40. Is this intentional for Vertex AI pricing?

Thanks for the review. I checked all three against the docs and the existing vertex_ai files:

Pricing format — all current vertex_ai Gemini YAMLs use quoted strings (input: '0.50', etc.). I matched that convention; bare floats would make this file the inconsistent one.
max_output_tokens — Google's spec lists 65,536 as the output limit for Gemini 3.5 Flash, consistent with the rest of the Gemini 3 family.
Pricing rates — $1.50/$9.00 per 1M is the official Gemini 3.5 Flash pricing (vs. 2.0 Flash, which is a different generation/tier).
Happy to switch the pricing to numeric if the project is standardizing on that across all model files — just let me know and I'll update consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants