Location
client_discovery/service.py — build_intake_response() (~line 30-32)
Problem
gemini_api_key = os.environ.get("GEMINI_API_KEY")
if not gemini_api_key:
strategic_analysis = "DIA Agent Error: GEMINI_API_KEY is missing or invalid."
This path only checks GEMINI_API_KEY, but the rest of the codebase (e.g. app.py / agent_runtime.py / character.py) treats either GEMINI_API_KEY or GOOGLE_API_KEY as valid configuration. If GOOGLE_API_KEY is set (and GEMINI_API_KEY is not), this will incorrectly report the agent as misconfigured and return the error string instead of running the agent.
Fix
Check both keys, e.g.:
api_key = os.environ.get("GEMINI_API_KEY") or os.environ.get("GOOGLE_API_KEY")
if not api_key:
strategic_analysis = "DIA Agent Error: GEMINI_API_KEY/GOOGLE_API_KEY is missing or invalid."
Source
Originally raised in review of PR #21 (now docs-only): outdated thread PRRT_kwDOSzLAqc6JYBhz. Confirmed still present on main.
/tracked-issue
Location
client_discovery/service.py—build_intake_response()(~line 30-32)Problem
This path only checks
GEMINI_API_KEY, but the rest of the codebase (e.g.app.py/agent_runtime.py/character.py) treats eitherGEMINI_API_KEYorGOOGLE_API_KEYas valid configuration. IfGOOGLE_API_KEYis set (andGEMINI_API_KEYis not), this will incorrectly report the agent as misconfigured and return the error string instead of running the agent.Fix
Check both keys, e.g.:
Source
Originally raised in review of PR #21 (now docs-only): outdated thread
PRRT_kwDOSzLAqc6JYBhz. Confirmed still present onmain./tracked-issue