From 874e9b67b05f8a7d9f8c49b6fe85f70c3de8e469 Mon Sep 17 00:00:00 2001 From: Aloys Jehwin Date: Thu, 27 Aug 2026 22:43:18 +0530 Subject: [PATCH] fix(gem4gov): stop update-compliance stripping the Model Armor binding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The FedRAMP High assistant PATCH named customerPolicy in the updateMask while sending a body whose customerPolicy held only an empty bannedPhrases list. A masked field is replaced wholesale, so this silently discarded the modelArmorConfig deploy.sh had bound, leaving the template in place but referenced by nothing. Dropped customerPolicy from both the mask and the body. The empty bannedPhrases list was inert anyway — the API drops it — so nothing is lost and the binding survives. Fixes #184 Signed-off-by: Aloys Jehwin --- .../fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/blueprints/fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.py b/blueprints/fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.py index 88b0226fc..baff3880e 100644 --- a/blueprints/fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.py +++ b/blueprints/fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.py @@ -1574,15 +1574,12 @@ def configure_gemini_enterprise_for_fedramp_high(credentials, project_id, engine access_token = "" if access_token: - url = f"https://us-discoveryengine.googleapis.com/v1alpha/{assistant_name}?updateMask=customerPolicy,agentConfigs,generationConfig,disableLocationContext,webGroundingType,defaultWebGroundingToggleOff" + url = f"https://us-discoveryengine.googleapis.com/v1alpha/{assistant_name}?updateMask=agentConfigs,generationConfig,disableLocationContext,webGroundingType,defaultWebGroundingToggleOff" assistant_patch_body = { "displayName":"Default Assistant", "googleSearchGroundingEnabled": False, "webGroundingType":"WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH", - "customerPolicy":{ - "bannedPhrases":[] - }, "generationConfig":{ "systemInstruction":{ "additionalSystemInstruction":""