From 0a81259d39967545310da9edc3639e775270f8ad Mon Sep 17 00:00:00 2001 From: A Vertex SDK engineer Date: Fri, 13 Mar 2026 05:28:07 -0700 Subject: [PATCH] feat: allow overwriting agent card url PiperOrigin-RevId: 883111105 --- vertexai/preview/reasoning_engines/templates/a2a.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.