Skip to content

Fix: remove hardcoded us-central1 for RAG engine region#1175

Open
oxlipefe wants to merge 1 commit intogoogle:mainfrom
oxlipefe:fix-rag-region-hardcode
Open

Fix: remove hardcoded us-central1 for RAG engine region#1175
oxlipefe wants to merge 1 commit intogoogle:mainfrom
oxlipefe:fix-rag-region-hardcode

Conversation

@oxlipefe
Copy link

Description

This PR removes the hardcoded us-central1 location in the RAG example and instead reads the region from the GOOGLE_CLOUD_LOCATION environment variable.

Motivation

For new Google Cloud projects, RAG Engine is restricted in us-central1, us-east1, and us-east4. The current example fails with an INVALID_ARGUMENT error in those regions.

Using the environment variable improves flexibility and prevents unnecessary errors.

Changes

  • Replaced hardcoded region in - adk-samples/python/agents/data-science/utils/reference_guide_RAG.py - with environment variable fallback
  • Preserved backward compatibility by defaulting to us-central1

@google-cla
Copy link

google-cla bot commented Feb 26, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant