GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Bug]: [Update Required] SDK Location Inconsistency and Preview Model ID in intro_rag_engine.ipynb

Open Beginner friendly
#2,778 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

### File Name

gemini/rag-engine/intro_rag_engine.ipynb

### What happened?

Inconsistency in SDK initialization and outdated Model ID.
Current Behavior:
The notebook initializes Vertex AI with location="us-east1" but sets the genai.Client to location="global". This mismatch causes authentication and resource discovery errors in the latest RAG Engine SDK updates.
The MODEL_ID is still using the gemini-3-flash-preview tag.

Expected Behavior:
Locations should be synchronized ( all set to us-central1) to ensure the RAG corpus and client can communicate properly.
The MODEL_ID should be updated to the stable gemini-3.1-flash since the stable version has been released (April 2026).

Steps to Reproduce:
Run the first two cells of the notebook.
Observe the mismatch in location parameters between vertexai.init and genai.Client.

vertexai.init(project=PROJECT_ID, location="us-east1")
client = genai.Client(vertexai=True, project=PROJECT_ID, location="global")

As a Data Science Researcher (MSc Informatics), I have already implemented these fixes in my fork and verified the stability. I am happy to open a Pull Request if access is granted.

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Open gemini/rag-engine/intro_rag_engine.ipynb and inspect the first two cells, where vertexai.init and genai.Client are configured. Verify that the location values are consistent and that MODEL_ID uses the requested stable model identifier, then rerun those cells to confirm initialization and resource discovery succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
ai, cloud
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.