From 6561b445f856c6d375e26ff9cb5d574ee2fcb88b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 10 Nov 2026 10:03:08 +0000 Subject: [PATCH] Regenerate client from commit 6b61c2a of spec repo --- .generator/schemas/v2/openapi.yaml | 26 +++++++++++++ .../ai_guard_evaluate_attributes_response.py | 12 ++++++ .../v2/model/ai_guard_extra_tag.py | 39 +++++++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 2 + 4 files changed, 79 insertions(+) create mode 100644 src/datadog_api_client/v2/model/ai_guard_extra_tag.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 45e5d2741b..5ac7f85ddc 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3086,6 +3086,14 @@ components: properties: action: $ref: "#/components/schemas/AIGuardAction" + extra_tags: + description: |- + The span tags that tracers should add to the `ai_guard` span. Each item contains a + backend-defined key and value, and clients should not assume a fixed set of keys. + Example keys include `ai_guard.evaluate_id` and `ai_guard.evaluation_context`. + items: + $ref: "#/components/schemas/AIGuardExtraTag" + type: array global_prob: description: The global threat probability, between `0` and `1`. Included only when computed. example: 0.005218505859375 @@ -3212,6 +3220,21 @@ components: type: string x-enum-varnames: - EVALUATIONS + AIGuardExtraTag: + description: A span tag for tracers to add to the `ai_guard` span. + properties: + key: + description: The span tag key. + example: ai_guard.evaluate_id + type: string + value: + description: The span tag value. + example: a76a703c-324f-42ed-af33-9b17d65e28af + type: string + required: + - key + - value + type: object AIGuardGlobalConfidenceThreshold: description: The global confidence threshold applied to every threat category. example: 0.8 @@ -157058,6 +157081,9 @@ paths: data: attributes: action: ALLOW + extra_tags: + - key: ai_guard.evaluate_id + value: a76a703c-324f-42ed-af33-9b17d65e28af global_prob: 0.005218505859375 is_blocking_enabled: false reason: No rule match. diff --git a/src/datadog_api_client/v2/model/ai_guard_evaluate_attributes_response.py b/src/datadog_api_client/v2/model/ai_guard_evaluate_attributes_response.py index 106e6075f6..10b4aaddc6 100644 --- a/src/datadog_api_client/v2/model/ai_guard_evaluate_attributes_response.py +++ b/src/datadog_api_client/v2/model/ai_guard_evaluate_attributes_response.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.ai_guard_action import AIGuardAction + from datadog_api_client.v2.model.ai_guard_extra_tag import AIGuardExtraTag from datadog_api_client.v2.model.ai_guard_redaction_replacement import AIGuardRedactionReplacement from datadog_api_client.v2.model.ai_guard_scfw_findings import AIGuardScfwFindings from datadog_api_client.v2.model.ai_guard_sds_finding import AIGuardSdsFinding @@ -25,12 +26,14 @@ class AIGuardEvaluateAttributesResponse(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.ai_guard_action import AIGuardAction + from datadog_api_client.v2.model.ai_guard_extra_tag import AIGuardExtraTag from datadog_api_client.v2.model.ai_guard_redaction_replacement import AIGuardRedactionReplacement from datadog_api_client.v2.model.ai_guard_scfw_findings import AIGuardScfwFindings from datadog_api_client.v2.model.ai_guard_sds_finding import AIGuardSdsFinding return { "action": (AIGuardAction,), + "extra_tags": ([AIGuardExtraTag],), "global_prob": (float,), "is_blocking_enabled": (bool,), "reason": (str,), @@ -43,6 +46,7 @@ def openapi_types(_): attribute_map = { "action": "action", + "extra_tags": "extra_tags", "global_prob": "global_prob", "is_blocking_enabled": "is_blocking_enabled", "reason": "reason", @@ -60,6 +64,7 @@ def __init__( reason: str, tag_probs: Union[Dict[str, float], none_type], tags: List[str], + extra_tags: Union[List[AIGuardExtraTag], UnsetType] = unset, global_prob: Union[float, UnsetType] = unset, redaction_replacements: Union[List[AIGuardRedactionReplacement], UnsetType] = unset, scfw_findings: Union[AIGuardScfwFindings, UnsetType] = unset, @@ -72,6 +77,11 @@ def __init__( :param action: The recommended action for the evaluated conversation. :type action: AIGuardAction + :param extra_tags: The span tags that tracers should add to the ``ai_guard`` span. Each item contains a + backend-defined key and value, and clients should not assume a fixed set of keys. + Example keys include ``ai_guard.evaluate_id`` and ``ai_guard.evaluation_context``. + :type extra_tags: [AIGuardExtraTag], optional + :param global_prob: The global threat probability, between ``0`` and ``1``. Included only when computed. :type global_prob: float, optional @@ -110,6 +120,8 @@ def __init__( :param tags: The threat tags detected in the conversation. :type tags: [str] """ + if extra_tags is not unset: + kwargs["extra_tags"] = extra_tags if global_prob is not unset: kwargs["global_prob"] = global_prob if redaction_replacements is not unset: diff --git a/src/datadog_api_client/v2/model/ai_guard_extra_tag.py b/src/datadog_api_client/v2/model/ai_guard_extra_tag.py new file mode 100644 index 0000000000..42547bc39e --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_guard_extra_tag.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AIGuardExtraTag(ModelNormal): + @cached_property + def openapi_types(_): + return { + "key": (str,), + "value": (str,), + } + + attribute_map = { + "key": "key", + "value": "value", + } + + def __init__(self_, key: str, value: str, **kwargs): + """ + A span tag for tracers to add to the ``ai_guard`` span. + + :param key: The span tag key. + :type key: str + + :param value: The span tag value. + :type value: str + """ + super().__init__(kwargs) + + self_.key = key + self_.value = value diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index d6918ba32e..265f85566b 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -10,6 +10,7 @@ from datadog_api_client.v2.model.ai_guard_evaluate_request_data_attributes import AIGuardEvaluateRequestDataAttributes from datadog_api_client.v2.model.ai_guard_evaluate_response import AIGuardEvaluateResponse from datadog_api_client.v2.model.ai_guard_evaluation_type import AIGuardEvaluationType +from datadog_api_client.v2.model.ai_guard_extra_tag import AIGuardExtraTag from datadog_api_client.v2.model.ai_guard_image_url import AIGuardImageURL from datadog_api_client.v2.model.ai_guard_message import AIGuardMessage from datadog_api_client.v2.model.ai_guard_message_content import AIGuardMessageContent @@ -13880,6 +13881,7 @@ "AIGuardEvaluateRequestDataAttributes", "AIGuardEvaluateResponse", "AIGuardEvaluationType", + "AIGuardExtraTag", "AIGuardImageURL", "AIGuardMessage", "AIGuardMessageContent",