reasoning-deployment-service 0.4.7__py3-none-any.whl → 0.4.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of reasoning-deployment-service might be problematic. Click here for more details.

@@ -776,67 +776,39 @@ class ReasoningEngineDeploymentService:
776
776
  new_authorizations: Optional[list[str]] = None,
777
777
  ) -> dict:
778
778
  """
779
- Patch only metadata (displayName, description) and linkage fields
779
+ Safely patch metadata (displayName, description) and linkage fields
780
780
  (reasoningEngine, authorizations) for an existing Agent Space agent.
781
+ Preserves all other required adkAgentDefinition fields.
781
782
  """
782
783
  url = (
783
784
  f"{DISCOVERY_ENGINE_URL}/projects/{self._project_id}/locations/global/"
784
785
  f"collections/default_collection/engines/{self._agent_space_engine}/"
785
786
  f"assistants/default_assistant/agents/{agent_id}"
786
787
  )
788
+
789
+ agent_updates_body = {
790
+ "displayName": new_display_name,
791
+ "description": "edit test",
792
+ "adk_agent_definition": {
793
+ "tool_settings": {
794
+ "tool_description": new_description
795
+ },
796
+ "provisioned_reasoning_engine":{
797
+ "reasoning_engine": new_reasoning_engine
798
+ },
799
+ "authorizations": new_authorizations
800
+ }
801
+ }
802
+
787
803
  headers = self._get_headers()
788
804
 
789
- # GET current agent
790
- resp = self._http.get(url, headers=headers, timeout=60)
791
- resp.raise_for_status()
792
- agent_data = resp.json()
793
-
794
- # Prepare PATCH payload
795
- patch_payload = {}
796
-
797
- if new_display_name:
798
- patch_payload["displayName"] = new_display_name
799
- if new_description:
800
- patch_payload["description"] = new_description
801
-
802
- adk_def = agent_data.get("adkAgentDefinition", {})
803
- patch_adk_def = {}
804
-
805
- if new_reasoning_engine:
806
- patch_adk_def.setdefault("provisionedReasoningEngine", {})[
807
- "reasoningEngine"
808
- ] = new_reasoning_engine
809
-
810
- if new_authorizations is not None:
811
- patch_adk_def["authorizations"] = new_authorizations
812
-
813
- if patch_adk_def:
814
- patch_payload["adkAgentDefinition"] = patch_adk_def
815
-
816
- # Build updateMask
817
- update_mask = []
818
- if "displayName" in patch_payload:
819
- update_mask.append("display_name")
820
- if "description" in patch_payload:
821
- update_mask.append("description")
822
- if "adkAgentDefinition" in patch_payload:
823
- if "provisionedReasoningEngine" in patch_payload["adkAgentDefinition"]:
824
- update_mask.append("adk_agent_definition.provisioned_reasoning_engine")
825
- if "authorizations" in patch_payload["adkAgentDefinition"]:
826
- update_mask.append("adk_agent_definition.authorizations")
827
-
828
- if not update_mask:
829
- self.info("[AGENT PATCH] Nothing to update.")
830
- return agent_data
831
-
832
- patch_url = f"{url}"
833
- self.info(f"[AGENT PATCH] PATCH {patch_url} with payload={json.dumps(patch_payload, indent=2)}")
834
-
835
- patch_resp = self._http.patch(patch_url, headers=headers, json=patch_payload, timeout=60)
836
- print(patch_resp.text)
837
- patch_resp.raise_for_status()
838
-
839
- return patch_resp.json()
805
+ update_mask = ["displayName", "description", "adk_agent_definition.tool_settings.tool_description",
806
+ "adk_agent_definition.provisioned_reasoning_engine.reasoning_engine"]
807
+ params = {"update_mask": ",".join(update_mask)}
808
+ resp = self._http.patch(url, headers=headers, params=params, json=agent_updates_body, timeout=60)
809
+
810
+ return resp.json()
811
+
840
812
 
841
813
  def one_githhub_deployment_to_go_with_skip(self):
842
814
  return self.one_github_deployment_to_go(skip_engine=True)
@@ -987,6 +959,8 @@ class ReasoningEngineDeploymentService:
987
959
  self.info(f"[AGENT] POST {create_url}")
988
960
  cr = self._http.post(create_url, headers=headers, json=payload, timeout=90)
989
961
  self.info(f"[AGENT] POST status={cr.status_code}")
962
+ self.info(f"[AGENT] POST ct={cr.headers.get('content-type','')}")
963
+ self.info(f"[AGENT] POST body={(cr.text or '')[:4000]}")
990
964
  cr.raise_for_status()
991
965
  agent_name = (cr.json() or {}).get("name")
992
966
  if agent_name:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.4.7
3
+ Version: 0.4.9
4
4
  Summary: Deployment helper for Vertex AI Reasoning Engines & Agent Spaces
5
5
  Author-email: Sergio Estrada <sergio.estrada@accenture.com>
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  reasoning_deployment_service/__init__.py,sha256=xDuKt9gGviQiTV6vXBdkBvygnlAOIrwnUjVaMGZy0L4,670
2
- reasoning_deployment_service/reasoning_deployment_service.py,sha256=bPIVOYScVtyDI2YkgdVgEXZq6onREtGG6yECEPjD9Dw,44118
2
+ reasoning_deployment_service/reasoning_deployment_service.py,sha256=5wNyv_Lzz0jm0vTvPvx3uCYNpl2FpKmGGVMf1SB_NX0,43285
3
3
  reasoning_deployment_service/runner.py,sha256=qWN0t66lQ1G4ht48gIHSF2JvedcheHRu8PmUz5TaKTI,5619
4
4
  reasoning_deployment_service/cli_editor/__init__.py,sha256=bN8NPkw8riB92pj2lAwJZuEMOQIO_RRuge0ehnJTW1I,118
5
5
  reasoning_deployment_service/cli_editor/api_client.py,sha256=Kzx5iYp0MmowggrSmPLE7I2kt1-8xvdGBAgde9a1gCY,33681
@@ -22,8 +22,8 @@ reasoning_deployment_service/gui_editor/src/ui/authorization_view.py,sha256=BoNc
22
22
  reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py,sha256=tCvSPEf4dW0NRdAqfs3yT5Pa873gYeLzCMMIt2r2T4o,14644
23
23
  reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py,sha256=IRjFlBbY98usAZa0roOonjvWQOsF6NBW4bBg_k8KnKI,7860
24
24
  reasoning_deployment_service/gui_editor/src/ui/ui_components.py,sha256=HdQHy-oSZ3GobQ3FNdH7y_w3ANbFiuf2rMoflAmff0A,55366
25
- reasoning_deployment_service-0.4.7.dist-info/METADATA,sha256=C8SaO5R8_FxbZEFQEHVYTB69eneDz0gC_AG1E4PRLGs,5302
26
- reasoning_deployment_service-0.4.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- reasoning_deployment_service-0.4.7.dist-info/entry_points.txt,sha256=onGKjR5ONTtRv3aqEtK863iw9Ty1kLcjfZlsplkRZrA,84
28
- reasoning_deployment_service-0.4.7.dist-info/top_level.txt,sha256=GKuQS1xHUYLZbatw9DmcYdBxxLhWhhGkV4FmFxgKdp0,29
29
- reasoning_deployment_service-0.4.7.dist-info/RECORD,,
25
+ reasoning_deployment_service-0.4.9.dist-info/METADATA,sha256=XioMJW8xodhyKK9NlL_cTWzLQssmAz6dVXK0c5Khl5g,5302
26
+ reasoning_deployment_service-0.4.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ reasoning_deployment_service-0.4.9.dist-info/entry_points.txt,sha256=onGKjR5ONTtRv3aqEtK863iw9Ty1kLcjfZlsplkRZrA,84
28
+ reasoning_deployment_service-0.4.9.dist-info/top_level.txt,sha256=GKuQS1xHUYLZbatw9DmcYdBxxLhWhhGkV4FmFxgKdp0,29
29
+ reasoning_deployment_service-0.4.9.dist-info/RECORD,,