From e6155923dd88a2d9316492912ee60504233266ae Mon Sep 17 00:00:00 2001 From: Nikunj Bansal Date: Tue, 29 Sep 2026 16:24:46 -0700 Subject: [PATCH] feat(aiguard): add optional headers to resolve_and_execute_policy Lets callers send a tenant's custom request headers, including the one AI Guard reads the conversation ID from. Bumps to 1.10.1; backfills 1.10.0 changelog. --- CHANGELOG.md | 25 +++++++++++++++++++++++++ pyproject.toml | 2 +- zscaler/aiguard/policy_detection.py | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd1138e5..c5ea9d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Zscaler Python SDK Changelog +## 1.10.1 (September 29 2026) + +### Notes + +- Python Versions: **v3.9, v3.10, v3.11, v3.12** + +### Enhancements + +* Added an optional `headers` argument to AI Guard `resolve_and_execute_policy`. Extra headers are + merged into the request, which lets a caller send the tenant's configured custom request headers + — including the one AI Guard reads the conversation ID from, so multi-turn interactions can be + correlated on the dashboard. + +## 1.10.0 (September 18 2026) + +### Notes + +- Python Versions: **v3.9, v3.10, v3.11, v3.12** + +### Enhancements + +* [PR #587](https://github.com/zscaler/zscaler-sdk-python/pull/587) - Added an optional `user` + argument to AI Guard `resolve_and_execute_policy`. The end-user identity is recorded on the + detection event so the user surfaces on the dashboard. + ## 1.9.44 (September 1 2026) ### Notes diff --git a/pyproject.toml b/pyproject.toml index fd510fb8..cf10600d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "zscaler-sdk-python" -version = "1.10.0" +version = "1.10.1" description = "Official Python SDK for the Zscaler Products" authors = ["Zscaler, Inc. "] license = "MIT" diff --git a/zscaler/aiguard/policy_detection.py b/zscaler/aiguard/policy_detection.py index b8cfbad9..27d903bd 100644 --- a/zscaler/aiguard/policy_detection.py +++ b/zscaler/aiguard/policy_detection.py @@ -141,6 +141,7 @@ def resolve_and_execute_policy( direction: str, transaction_id: Optional[str] = None, user: Optional[str] = None, + headers: Optional[dict] = None, ) -> APIResult[ResolveAndExecuteDetectionsPolicyResponse]: """ Resolves and executes a policy detection (automatic policy selection). @@ -151,6 +152,9 @@ def resolve_and_execute_policy( transaction_id (str, optional): Optional transaction ID for tracking user (str, optional): Optional end-user identity associated with the request, recorded on the detection event so the user surfaces on the dashboard + headers (dict, optional): Extra HTTP headers to send with this request. Used for + the tenant's configured custom request headers, such as the one carrying the + conversation ID; the header names are set per tenant, so the caller supplies them Returns: APIResult[ResolveAndExecuteDetectionsPolicyResponse]: Tuple of (result, response, error) @@ -190,6 +194,7 @@ def resolve_and_execute_policy( method=http_method, endpoint=api_url, body=body, + headers=headers, ) if error: