Skip to content

Commit 46c2fc6

Browse files
twcookclaude
andcommitted
fix(sdc-agents-demo): use env vars for base_url and api_key
Addresses Gemini bot review on PR google#106: - base_url is now overridable via SDC_BASE_URL with default https://sdcstudio.axius-sdc.com (the production endpoint). - api_key is now read from SDC_API_KEY via os.environ.get rather than the literal "${SDC_API_KEY}" string, which was not substituted by pydantic and broke the demo as written. - Docstring prerequisites updated to mention SDC_BASE_URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 95fcaa3 commit 46c2fc6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • contributing/samples/sdc_agents_demo

contributing/samples/sdc_agents_demo/agent.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
Prerequisites:
2222
pip install google-adk-community[sdc-agents]
2323
export SDC_API_KEY="your-sdcstudio-api-key"
24+
export SDC_BASE_URL="https://sdcstudio.axius-sdc.com" # optional; this is the default
2425
2526
Usage:
2627
adk run .
2728
"""
2829

30+
import os
31+
2932
from google.adk.agents import LlmAgent
3033

3134
from google.adk_community.sdc_agents import (
@@ -39,8 +42,8 @@
3942

4043
config = SDCAgentsConfig(
4144
sdcstudio={
42-
"base_url": "https://sdcstudio.com",
43-
"api_key": "${SDC_API_KEY}",
45+
"base_url": os.environ.get("SDC_BASE_URL", "https://sdcstudio.axius-sdc.com"),
46+
"api_key": os.environ.get("SDC_API_KEY", ""),
4447
},
4548
datasources={
4649
"sample": {

0 commit comments

Comments
 (0)