diff --git a/vertexai/preview/reasoning_engines/templates/a2a.py b/vertexai/preview/reasoning_engines/templates/a2a.py index fb02b94ccc..5f86ebd151 100644 --- a/vertexai/preview/reasoning_engines/templates/a2a.py +++ b/vertexai/preview/reasoning_engines/templates/a2a.py @@ -239,9 +239,10 @@ def set_up(self): location = self._tmpl_attrs.get("location") os.environ["GOOGLE_CLOUD_LOCATION"] = location agent_engine_id = os.getenv("GOOGLE_CLOUD_AGENT_ENGINE_ID", "test-agent-engine") + vae_base_url = os.getenv("VAE_BASE_URL", F"{location}-autopush-aiplatform.sandbox.googleapis.com") version = "v1beta1" - self.agent_card.url = f"https://{location}-aiplatform.googleapis.com/{version}/projects/{project}/locations/{location}/reasoningEngines/{agent_engine_id}/a2a" + self.agent_card.url = f"https://{vae_base_url}/{version}/projects/{project}/locations/{location}/reasoningEngines/{agent_engine_id}/a2a" self._tmpl_attrs["agent_card"] = self.agent_card # Create the agent executor if a builder is provided.