[PR #1628] [MERGED] feat(vertex-ai): support Claude region override and configurable globals #1997

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1628
Author: @syalioune
Created: 9/1/2025
Status: Merged
Merged: 9/1/2025
Merged by: @crazywoola

Base: mainHead: feature/configurable-vertex-locations


📝 Commits (1)

  • 8aa3f24 feat(vertex-ai): support Claude region override and configurable global-only models

📊 Changes

3 files changed (+33 additions, -5 deletions)

View changed files

📝 models/vertex_ai/manifest.yaml (+1 -1)
📝 models/vertex_ai/models/llm/llm.py (+18 -4)
📝 models/vertex_ai/provider/vertex_ai.yaml (+14 -0)

📄 Description

Related Issues or Context

Currently the vertex_ai plugin only uses hardcoded US GCP locations for Anthropic models which does not suit organizations having location constraints (e.g. Use only EU regions).
The change provides the following changes :

  • Add provider credential parameter vertex_anthropic_location to decouple Claude location from vertex_location (quota project/Gemini region)
  • Resolution order for Anthropic LLM region: vertex_anthropic_locationvertex_location → model defaults (Claude=us-east5, others=us-central1)
  • Add provider credential parameter vertex_global_models to override the default list of global-only models
  • Rename GLOBAL_ONLY_MODELS to GLOBAL_ONLY_MODELS_DEFAULT and read custom values from credentials
  • Bump plugin version to 0.0.24

Impact: Enables using Anthropic (Claude) on Vertex AI from EU or other non-US locations (e.g., europe-west4) without being blocked by hard-coded US regions.

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.)
image

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: 1.8.0, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration.
image image

SaaS Environment

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

🔄 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/1628 **Author:** [@syalioune](https://github.com/syalioune) **Created:** 9/1/2025 **Status:** ✅ Merged **Merged:** 9/1/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `feature/configurable-vertex-locations` --- ### 📝 Commits (1) - [`8aa3f24`](https://github.com/langgenius/dify-official-plugins/commit/8aa3f2404c1cb9905e21cd88a9eafe760df7cd16) feat(vertex-ai): support Claude region override and configurable global-only models ### 📊 Changes **3 files changed** (+33 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `models/vertex_ai/manifest.yaml` (+1 -1) 📝 `models/vertex_ai/models/llm/llm.py` (+18 -4) 📝 `models/vertex_ai/provider/vertex_ai.yaml` (+14 -0) </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 --> Currently the `vertex_ai` plugin only uses hardcoded **US** GCP locations for Anthropic models which does not suit organizations having location constraints (e.g. Use only `EU` regions). The change provides the following changes : - Add provider credential parameter `vertex_anthropic_location` to decouple Claude location from `vertex_location` (quota project/Gemini region) - Resolution order for Anthropic LLM region: `vertex_anthropic_location` → `vertex_location` → model defaults (Claude=us-east5, others=us-central1) - Add provider credential parameter `vertex_global_models` to override the default list of global-only models - Rename `GLOBAL_ONLY_MODELS` to `GLOBAL_ONLY_MODELS_DEFAULT` and read custom values from credentials - Bump plugin version to 0.0.24 Impact: Enables using Anthropic (Claude) on Vertex AI from EU or other non-US locations (e.g., europe-west4) without being blocked by hard-coded US regions. ## 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* - [ ] 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. --> - [x] Other Changes (Add New Models, Fix Model Parameters etc.) <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> <img width="1226" height="818" alt="image" src="https://github.com/user-attachments/assets/92622532-fcab-48ad-b649-bc2b6e000032" /> ## 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 - [ ] 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 - [x] Dify Version is: 1.8.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 --> <img width="1145" height="805" alt="image" src="https://github.com/user-attachments/assets/11814341-1dca-434c-96cc-dc0dcb572fcd" /> <img width="1904" height="887" alt="image" src="https://github.com/user-attachments/assets/feb48374-98e7-4fb6-9d97-7d3369a6229b" /> ### 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 --> <img width="1120" height="809" alt="image" src="https://github.com/user-attachments/assets/e9a1cafb-e819-4ac4-9d81-9dfcbecc94e3" /> <img width="1904" height="900" alt="image" src="https://github.com/user-attachments/assets/8df36420-94b9-42df-a1b5-d2b2c6741bfb" /> --- <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:49 -05:00
yindo closed this issue 2026-02-16 11:15:49 -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#1997