Skip to content

Commit 91cd280

Browse files
committed
docs: update GOOGLE_GENAI_USE_VERTEXAI in tutorials and examples
1 parent e76d236 commit 91cd280

8 files changed

Lines changed: 20 additions & 20 deletions

File tree

docs/tutorials/agent-team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ print(f"OpenAI API Key set: {'Yes' if os.environ.get('OPENAI_API_KEY') and os.en
117117
print(f"Anthropic API Key set: {'Yes' if os.environ.get('ANTHROPIC_API_KEY') and os.environ['ANTHROPIC_API_KEY'] != 'YOUR_ANTHROPIC_API_KEY' else 'No (REPLACE PLACEHOLDER!)'}")
118118

119119
# Configure ADK to use API keys directly (not Agent Platform for this multi-model setup)
120-
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "False"
120+
os.environ["GOOGLE_GENAI_USE_ENTERPRISE"] = "False"
121121

122122

123123
# @markdown **Security Note:** It's best practice to manage API keys securely (e.g., using Colab Secrets or environment variables) rather than hardcoding them directly in the notebook. Replace the placeholder strings above.

docs/tutorials/multi-tool-agent.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,28 +339,28 @@ agent will be unable to function.
339339
and copy-paste the following code.
340340

341341
```env title="multi_tool_agent/.env"
342-
GOOGLE_GENAI_USE_VERTEXAI=FALSE
342+
GOOGLE_GENAI_USE_ENTERPRISE=FALSE
343343
GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_API_KEY_HERE
344344
```
345345

346346
When using Java, define environment variables:
347347

348348
```console title="terminal"
349-
export GOOGLE_GENAI_USE_VERTEXAI=FALSE
349+
export GOOGLE_GENAI_USE_ENTERPRISE=FALSE
350350
export GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_API_KEY_HERE
351351
```
352352

353353
When using TypeScript, the `.env` file is automatically loaded by the `import 'dotenv/config';` line at the top of your `agent.ts` file.
354354

355355
```env title="multi_tool_agent/.env"
356-
GOOGLE_GENAI_USE_VERTEXAI=FALSE
356+
GOOGLE_GENAI_USE_ENTERPRISE=FALSE
357357
GOOGLE_GENAI_API_KEY=PASTE_YOUR_ACTUAL_API_KEY_HERE
358358
```
359359

360360
When using Go, define environment variables in your terminal or use a `.env` file:
361361

362362
```bash title="terminal"
363-
export GOOGLE_GENAI_USE_VERTEXAI=FALSE
363+
export GOOGLE_GENAI_USE_ENTERPRISE=FALSE
364364
export GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_API_KEY_HERE
365365
```
366366

@@ -374,31 +374,31 @@ agent will be unable to function.
374374
the following code and update the project ID and location.
375375

376376
```env title="multi_tool_agent/.env"
377-
GOOGLE_GENAI_USE_VERTEXAI=TRUE
377+
GOOGLE_GENAI_USE_ENTERPRISE=TRUE
378378
GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID
379379
GOOGLE_CLOUD_LOCATION=LOCATION
380380
```
381381

382382
When using Java, define environment variables:
383383

384384
```console title="terminal"
385-
export GOOGLE_GENAI_USE_VERTEXAI=TRUE
385+
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
386386
export GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID
387387
export GOOGLE_CLOUD_LOCATION=LOCATION
388388
```
389389

390390
When using TypeScript, the `.env` file is automatically loaded by the `import 'dotenv/config';` line at the top of your `agent.ts` file.
391391

392392
```env title=".env"
393-
GOOGLE_GENAI_USE_VERTEXAI=TRUE
393+
GOOGLE_GENAI_USE_ENTERPRISE=TRUE
394394
GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID
395395
GOOGLE_CLOUD_LOCATION=LOCATION
396396
```
397397

398398
When using Go, define environment variables in your terminal or use a `.env` file:
399399

400400
```bash title="terminal"
401-
export GOOGLE_GENAI_USE_VERTEXAI=TRUE
401+
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
402402
export GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID
403403
export GOOGLE_CLOUD_LOCATION=LOCATION
404404
```
@@ -412,28 +412,28 @@ agent will be unable to function.
412412
the following code and update the project ID and location.
413413

414414
```env title="multi_tool_agent/.env"
415-
GOOGLE_GENAI_USE_VERTEXAI=TRUE
415+
GOOGLE_GENAI_USE_ENTERPRISE=TRUE
416416
GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_EXPRESS_MODE_API_KEY_HERE
417417
```
418418

419419
When using Java, define environment variables:
420420

421421
```console title="terminal"
422-
export GOOGLE_GENAI_USE_VERTEXAI=TRUE
422+
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
423423
export GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_EXPRESS_MODE_API_KEY_HERE
424424
```
425425

426426
When using TypeScript, the `.env` file is automatically loaded by the `import 'dotenv/config';` line at the top of your `agent.ts` file.
427427

428428
```env title=".env"
429-
GOOGLE_GENAI_USE_VERTEXAI=TRUE
429+
GOOGLE_GENAI_USE_ENTERPRISE=TRUE
430430
GOOGLE_GENAI_API_KEY=PASTE_YOUR_ACTUAL_EXPRESS_MODE_API_KEY_HERE
431431
```
432432

433433
When using Go, define environment variables in your terminal or use a `.env` file:
434434

435435
```bash title="terminal"
436-
export GOOGLE_GENAI_USE_VERTEXAI=TRUE
436+
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
437437
export GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_EXPRESS_MODE_API_KEY_HERE
438438
```
439439

examples/java/demos/patent-search-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Using ADK Java SDK to perform the popular Patent Search (Contextual Search) use
66

77
2. Set env variables:
88
```
9-
export GOOGLE_GENAI_USE_VERTEXAI=FALSE
9+
export GOOGLE_GENAI_USE_ENTERPRISE=FALSE
1010
export GOOGLE_API_KEY="<your-api-key>"
1111
```
1212
3. Update the placeholders in the code with values from your project (like PROJECT_ID etc.)

examples/python/notebooks/express-mode-weather-agent.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"express_mode_api_key = \"YOUR-EXPRESS-MODE-API-KEY\" # @param {type:\"string\"}\n",
103103
"os.environ[\"GOOGLE_API_KEY\"] = express_mode_api_key\n",
104104
"# Set vertex to true\n",
105-
"os.environ[\"GOOGLE_GENAI_USE_VERTEXAI\"] = \"True\"\n",
105+
"os.environ[\"GOOGLE_GENAI_USE_ENTERPRISE\"] = \"True\"\n",
106106
"\n",
107107
"# --- Verify Keys (Optional Check) ---\n",
108108
"print(\"API Keys Set:\")\n",

examples/python/notebooks/shop_agent.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@
147147
"from getpass import getpass\n",
148148
"\n",
149149
"# Set environment variables required for running ADK (with Gemini API Key)\n",
150-
"os.environ[\"GOOGLE_GENAI_USE_VERTEXAI\"] = \"False\"\n",
150+
"os.environ[\"GOOGLE_GENAI_USE_ENTERPRISE\"] = \"False\"\n",
151151
"os.environ[\"GOOGLE_API_KEY\"] = getpass(\"Enter your Gemini API Key: \")\n",
152152
"\n",
153153
"# To use Agent Platform instead of Gemini API Key in Colab Enterprise or Cloud Workbench, use the following:\n",
154154
"# [PROJECT_ID] = !gcloud config list --format \"value(core.project)\"\n",
155155
"# os.environ[\"GOOGLE_CLOUD_PROJECT\"] = PROJECT_ID\n",
156156
"# os.environ[\"GOOGLE_CLOUD_LOCATION\"] = \"us-central1\"\n",
157-
"# os.environ[\"GOOGLE_GENAI_USE_VERTEXAI\"] = \"True\""
157+
"# os.environ[\"GOOGLE_GENAI_USE_ENTERPRISE\"] = \"True\""
158158
]
159159
},
160160
{

examples/python/snippets/streaming/adk-streaming-ws/tests/test_log_20251029_151045.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## Configuration
1414

1515
```env
16-
GOOGLE_GENAI_USE_VERTEXAI=TRUE
16+
GOOGLE_GENAI_USE_ENTERPRISE=TRUE
1717
GOOGLE_CLOUD_PROJECT=gcp-samples-ic0
1818
GOOGLE_CLOUD_LOCATION=us-central1
1919
DEMO_AGENT_MODEL=gemini-live-2.5-flash-preview-native-audio-09-2025

examples/python/tutorial/agent_team/adk-tutorial/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Before running any agent step, you **must** configure your API keys.
6363
**Example `.env` content:**
6464
```dotenv
6565
# Set to False to use API keys directly (required for multi-model)
66-
GOOGLE_GENAI_USE_VERTEXAI=FALSE
66+
GOOGLE_GENAI_USE_ENTERPRISE=FALSE
6767
6868
# --- Replace with your actual keys ---
6969
GOOGLE_API_KEY=PASTE_YOUR_ACTUAL_GOOGLE_API_KEY_HERE

examples/python/tutorial/agent_team/adk_tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
")\n",
149149
"\n",
150150
"# Configure ADK to use API keys directly (not Agent Platform for this multi-model setup)\n",
151-
"os.environ[\"GOOGLE_GENAI_USE_VERTEXAI\"] = \"False\"\n",
151+
"os.environ[\"GOOGLE_GENAI_USE_ENTERPRISE\"] = \"False\"\n",
152152
"\n",
153153
"\n",
154154
"# @markdown **Security Note:** It's best practice to manage API keys securely (e.g., using Colab Secrets or environment variables) rather than hardcoding them directly in the notebook. Replace the placeholder strings above."

0 commit comments

Comments
 (0)