chore: prevent triggering of _load_from_yaml_config in AgentLoader

PiperOrigin-RevId: 789502695
This commit is contained in:
Liang Wu
2025-07-31 15:59:07 -07:00
committed by Copybara-Service
parent 0ccbf6f2f8
commit db975dfe2a
+3 -1
View File
@@ -178,7 +178,9 @@ class AgentLoader(BaseAgentLoader):
if root_agent := self._load_from_submodule(agent_name):
return root_agent
if root_agent := self._load_from_yaml_config(agent_name):
if os.getenv("ADK_ALLOW_WIP_FEATURES") and (
root_agent := self._load_from_yaml_config(agent_name)
):
return root_agent
# If no root_agent was found by any pattern