From b9ab0d24588c0505256557b200fa1b2dda2e443e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 20 Aug 2026 04:37:47 +0000 Subject: [PATCH] Regenerate client from commit bf15a79 of spec repo --- .generator/schemas/v2/openapi.yaml | 142 +++++++++++++++++- .../CreateLLMObsAnnotationQueue.rb | 5 + .../UpdateLLMObsAnnotationQueue.rb | 5 + .../UpsertLLMObsAnnotations.rb | 4 +- features/v2/llm_observability.feature | 14 +- lib/datadog_api_client/inflector.rb | 1 + .../v2/api/llm_observability_api.rb | 4 +- ...obs_annotated_interaction_by_trace_item.rb | 23 ++- .../v2/models/llm_obs_annotation_error.rb | 12 +- .../models/llm_obs_annotation_error_code.rb | 26 ++++ ...nnotation_queue_data_attributes_request.rb | 38 ++++- ...notation_queue_data_attributes_response.rb | 81 +++++++++- ...on_queue_update_data_attributes_request.rb | 38 ++++- ...isplay_block_annotated_interaction_item.rb | 23 ++- ...lm_obs_trace_annotated_interaction_item.rb | 23 ++- 15 files changed, 413 insertions(+), 26 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_error_code.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 982af4188097..7be9692f62b0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -55263,6 +55263,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Upstream entity identifier (trace ID, session ID, or deterministic display_block ID). example: "trace-abc-123" @@ -55301,6 +55305,7 @@ components: - modified_at - queue_id - queue_name + - can_annotate - annotations type: object LLMObsAnnotatedInteractionItem: @@ -55365,6 +55370,7 @@ components: description: List of interactions with their annotations. example: - annotations: [] + can_annotate: true content_id: trace-abc-123 id: "interaction-456" type: trace @@ -55423,6 +55429,8 @@ components: description: ID of the annotation that failed, if applicable. example: "00000000-0000-0000-0000-000000000000" type: string + code: + $ref: "#/components/schemas/LLMObsAnnotationErrorCode" error: description: Error message. example: "interaction not found" @@ -55435,6 +55443,14 @@ components: - interaction_id - error type: object + LLMObsAnnotationErrorCode: + description: Stable error code. `permission_denied` indicates the item was rejected by queue access rules. + enum: + - permission_denied + example: permission_denied + type: string + x-enum-varnames: + - PERMISSION_DENIED LLMObsAnnotationItem: description: A single annotation on an interaction. properties: @@ -55613,6 +55629,21 @@ components: description: Identifier of the project this queue belongs to. example: "00000000-0000-0000-0000-000000000002" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Email addresses of reviewers who can access the annotation queue. + example: + - "reviewer@example.com" + items: + type: string + type: array required: - name - project_id @@ -55622,6 +55653,11 @@ components: properties: annotation_schema: $ref: "#/components/schemas/LLMObsAnnotationSchema" + can_manage_access: + description: Whether the current caller can manage access for the annotation queue. + example: true + readOnly: true + type: boolean created_at: description: Timestamp when the queue was created. example: "2024-01-15T10:30:00Z" @@ -55656,6 +55692,21 @@ components: description: Identifier of the project this queue belongs to. example: "00000000-0000-0000-0000-000000000002" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Email addresses of reviewers for the annotation queue. Returned only when the caller can manage queue access. + example: + - "reviewer@example.com" + items: + type: string + type: array required: - name - project_id @@ -55665,6 +55716,9 @@ components: - modified_by - modified_at - owned_by + - restrict_to_reviewers + - restrict_to_assignees + - can_manage_access type: object LLMObsAnnotationQueueDataRequest: description: Data object for creating an LLM Observability annotation queue. @@ -55881,6 +55935,21 @@ components: description: Updated name of the annotation queue. example: "Updated queue name" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Updated email addresses of reviewers who can access the annotation queue. + example: + - "reviewer@example.com" + items: + type: string + type: array type: object LLMObsAnnotationQueueUpdateDataRequest: description: Data object for updating an LLM Observability annotation queue. @@ -57765,6 +57834,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Server-generated deterministic identifier derived from the block list. example: "9a87f3e2b1d4c5a6f8b3e2d1c4a7b5f6e3d2a1c4b7e5f8a3d6c2e1b4a7d5f8c2" @@ -57781,6 +57854,7 @@ components: - id - type - content_id + - can_annotate - annotations - display_block type: object @@ -61771,6 +61845,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Upstream entity identifier supplied by the caller. example: "trace-abc-123" @@ -61797,6 +61875,7 @@ components: - content_id - created_at - modified_at + - can_annotate - annotations type: object LLMObsTraceInteractionItem: @@ -159315,6 +159394,7 @@ paths: value: good modified_at: "0001-01-01T00:00:00Z" modified_by: "00000000-0000-0000-0000-000000000002" + can_annotate: true content_id: trace-abc-123 created_at: "2025-06-01T12:00:00Z" id: interaction-456 @@ -159392,6 +159472,7 @@ paths: value: data: - attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159400,6 +159481,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159438,6 +159523,7 @@ paths: description: |- Create an annotation queue. The `name` and `project_id` fields are required. An optional `annotation_schema` can be provided to define the labels for the queue. + Optional access-control fields can restrict annotation access to reviewers or assignees. Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. operationId: CreateLLMObsAnnotationQueue @@ -159453,6 +159539,19 @@ paths: name: My annotation queue project_id: 00000000-0000-0000-0000-000000000002 type: queues + with_access_controls: + summary: Create queue with access controls + value: + data: + attributes: + description: Queue for annotating customer support traces + name: Restricted annotation queue + project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com + type: queues with_schema: summary: Create queue with annotation schema value: @@ -159488,6 +159587,7 @@ paths: value: data: attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159496,6 +159596,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159570,7 +159674,7 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: |- - Partially update an annotation queue. The `name`, `description`, and `annotation_schema` fields can be updated. + Partially update an annotation queue. The `name`, `description`, `annotation_schema`, `reviewer_emails`, `restrict_to_reviewers`, and `restrict_to_assignees` fields can be updated. operationId: UpdateLLMObsAnnotationQueue parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -159584,6 +159688,10 @@ paths: attributes: description: Updated description name: Updated queue name + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com type: queues schema: $ref: "#/components/schemas/LLMObsAnnotationQueueUpdateRequest" @@ -159598,6 +159706,7 @@ paths: value: data: attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159606,6 +159715,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159663,6 +159776,7 @@ paths: attributes: annotated_interactions: - annotations: [] + can_annotate: true content_id: trace-abc-123 id: interaction-456 type: trace @@ -159713,6 +159827,7 @@ paths: by `interaction_id` and the requesting user's identity. Results and errors in the response are linked to request items by `interaction_id`. Errors for individual items are returned in the `errors` field without blocking the rest of the batch. + Requests where every item is denied by queue access rules return `403`. operationId: UpsertLLMObsAnnotations parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -159757,9 +159872,30 @@ paths: modified_by: 00000000-0000-0000-0000-000000000002 id: 00000000-0000-0000-0000-000000000001 type: annotations + mixed_access_denied: + summary: Some annotations were denied by queue access rules + value: + data: + attributes: + annotations: + - created_at: "2024-01-15T10:30:00Z" + created_by: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000000 + interaction_id: 00000000-0000-0000-0000-000000000001 + label_values: + - label_schema_id: abc-123 + value: good + modified_at: "2024-01-15T10:30:00Z" + modified_by: 00000000-0000-0000-0000-000000000002 + errors: + - code: permission_denied + error: permission denied + interaction_id: 00000000-0000-0000-0000-000000000003 + id: 00000000-0000-0000-0000-000000000001 + type: annotations schema: $ref: "#/components/schemas/LLMObsAnnotationsResponse" - description: OK — annotations created or updated. Per-item errors are listed in `errors`. + description: OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors` "400": content: application/json: @@ -159777,7 +159913,7 @@ paths: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + description: Forbidden — all request items were denied by queue access rules "404": content: application/json: diff --git a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb index 4b1e26855d85..6467a79526e7 100644 --- a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb +++ b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb @@ -34,6 +34,11 @@ description: "Queue for annotating customer support traces", name: "My annotation queue", project_id: "00000000-0000-0000-0000-000000000002", + restrict_to_assignees: false, + restrict_to_reviewers: true, + reviewer_emails: [ + "reviewer@example.com", + ], }), type: DatadogAPIClient::V2::LLMObsAnnotationQueueType::QUEUES, }), diff --git a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb index a10defef52e1..b53145cfe867 100644 --- a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb +++ b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb @@ -33,6 +33,11 @@ }), description: "Updated description", name: "Updated queue name", + restrict_to_assignees: false, + restrict_to_reviewers: true, + reviewer_emails: [ + "reviewer@example.com", + ], }), type: DatadogAPIClient::V2::LLMObsAnnotationQueueType::QUEUES, }), diff --git a/examples/v2/llm-observability/UpsertLLMObsAnnotations.rb b/examples/v2/llm-observability/UpsertLLMObsAnnotations.rb index 464c9e65a666..59ac779bab60 100644 --- a/examples/v2/llm-observability/UpsertLLMObsAnnotations.rb +++ b/examples/v2/llm-observability/UpsertLLMObsAnnotations.rb @@ -1,5 +1,5 @@ -# Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`." -# response +# Create or update annotations returns "OK — annotations created or updated. Mixed batches list denied items and other +# per-item errors in `errors`" response require "datadog_api_client" DatadogAPIClient.configure do |config| diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index 8cb53cdc5a9d..0ad39189a692 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -212,7 +212,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability annotation queue returns "Bad Request" response Given operation "CreateLLMObsAnnotationQueue" enabled And new "CreateLLMObsAnnotationQueue" request - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 400 Bad Request @@ -220,7 +220,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability annotation queue returns "Created" response Given operation "CreateLLMObsAnnotationQueue" enabled And new "CreateLLMObsAnnotationQueue" request - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 201 Created @@ -412,13 +412,13 @@ Feature: LLM Observability Then the response status is 404 Not Found — the queue does not exist. @generated @skip @team:DataDog/ml-observability - Scenario: Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`." response + Scenario: Create or update annotations returns "OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors`" response Given operation "UpsertLLMObsAnnotations" enabled And new "UpsertLLMObsAnnotations" request And request contains "queue_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}} When the request is sent - Then the response status is 200 OK — annotations created or updated. Per-item errors are listed in `errors`. + Then the response status is 200 OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors` @generated @skip @team:DataDog/ml-observability Scenario: Delete LLM Observability dataset records returns "Bad Request" response @@ -1522,7 +1522,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 400 Bad Request @@ -1531,7 +1531,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 404 Not Found @@ -1540,7 +1540,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index b223bd9951b3..133167a5c7cc 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4528,6 +4528,7 @@ def overrides "v2.llm_obs_annotated_interactions_type" => "LLMObsAnnotatedInteractionsType", "v2.llm_obs_annotation_assessment" => "LLMObsAnnotationAssessment", "v2.llm_obs_annotation_error" => "LLMObsAnnotationError", + "v2.llm_obs_annotation_error_code" => "LLMObsAnnotationErrorCode", "v2.llm_obs_annotation_item" => "LLMObsAnnotationItem", "v2.llm_obs_annotation_item_response" => "LLMObsAnnotationItemResponse", "v2.llm_obs_annotation_label_value" => "LLMObsAnnotationLabelValue", diff --git a/lib/datadog_api_client/v2/api/llm_observability_api.rb b/lib/datadog_api_client/v2/api/llm_observability_api.rb index a1c60ad5c1b3..70fb031cfac6 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -277,6 +277,7 @@ def create_llm_obs_annotation_queue(body, opts = {}) # # Create an annotation queue. The `name` and `project_id` fields are required. # An optional `annotation_schema` can be provided to define the labels for the queue. + # Optional access-control fields can restrict annotation access to reviewers or assignees. # Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, # and `modified_at` are inferred by the backend. # @@ -4619,7 +4620,7 @@ def update_llm_obs_annotation_queue(queue_id, body, opts = {}) # Update an LLM Observability annotation queue. # - # Partially update an annotation queue. The `name`, `description`, and `annotation_schema` fields can be updated. + # Partially update an annotation queue. The `name`, `description`, `annotation_schema`, `reviewer_emails`, `restrict_to_reviewers`, and `restrict_to_assignees` fields can be updated. # # @param queue_id [String] The ID of the LLM Observability annotation queue. # @param body [LLMObsAnnotationQueueUpdateRequest] Update annotation queue payload. @@ -5441,6 +5442,7 @@ def upsert_llm_obs_annotations(queue_id, body, opts = {}) # by `interaction_id` and the requesting user's identity. # Results and errors in the response are linked to request items by `interaction_id`. # Errors for individual items are returned in the `errors` field without blocking the rest of the batch. + # Requests where every item is denied by queue access rules return `403`. # # @param queue_id [String] The ID of the LLM Observability annotation queue. # @param body [LLMObsAnnotationsRequest] Payload for creating or updating annotations. diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb index 58f26b01123a..a6a9dbc1cc09 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb @@ -24,6 +24,9 @@ class LLMObsAnnotatedInteractionByTraceItem # List of annotations for this interaction. attr_reader :annotations + # Whether the current caller can annotate this interaction. + attr_reader :can_annotate + # Upstream entity identifier (trace ID, session ID, or deterministic display_block ID). attr_reader :content_id @@ -56,6 +59,7 @@ class LLMObsAnnotatedInteractionByTraceItem def self.attribute_map { :'annotations' => :'annotations', + :'can_annotate' => :'can_annotate', :'content_id' => :'content_id', :'created_at' => :'created_at', :'display_block' => :'display_block', @@ -72,6 +76,7 @@ def self.attribute_map def self.openapi_types { :'annotations' => :'Array', + :'can_annotate' => :'Boolean', :'content_id' => :'String', :'created_at' => :'Time', :'display_block' => :'Array', @@ -107,6 +112,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'can_annotate') + self.can_annotate = attributes[:'can_annotate'] + end + if attributes.key?(:'content_id') self.content_id = attributes[:'content_id'] end @@ -147,6 +156,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @annotations.nil? + return false if @can_annotate.nil? return false if @content_id.nil? return false if @created_at.nil? return false if !@display_block.nil? && @display_block.length < 1 @@ -168,6 +178,16 @@ def annotations=(annotations) @annotations = annotations end + # Custom attribute writer method with validation + # @param can_annotate [Object] Object to be assigned + # @!visibility private + def can_annotate=(can_annotate) + if can_annotate.nil? + fail ArgumentError, 'invalid value for "can_annotate", can_annotate cannot be nil.' + end + @can_annotate = can_annotate + end + # Custom attribute writer method with validation # @param content_id [Object] Object to be assigned # @!visibility private @@ -275,6 +295,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && annotations == o.annotations && + can_annotate == o.can_annotate && content_id == o.content_id && created_at == o.created_at && display_block == o.display_block && @@ -290,7 +311,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotations, content_id, created_at, display_block, id, modified_at, queue_id, queue_name, type, additional_properties].hash + [annotations, can_annotate, content_id, created_at, display_block, id, modified_at, queue_id, queue_name, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_error.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_error.rb index 83ded993cae8..af9e1dc429f4 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_error.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_error.rb @@ -24,6 +24,9 @@ class LLMObsAnnotationError # ID of the annotation that failed, if applicable. attr_accessor :annotation_id + # Stable error code. `permission_denied` indicates the item was rejected by queue access rules. + attr_accessor :code + # Error message. attr_reader :error @@ -37,6 +40,7 @@ class LLMObsAnnotationError def self.attribute_map { :'annotation_id' => :'annotation_id', + :'code' => :'code', :'error' => :'error', :'interaction_id' => :'interaction_id' } @@ -47,6 +51,7 @@ def self.attribute_map def self.openapi_types { :'annotation_id' => :'String', + :'code' => :'LLMObsAnnotationErrorCode', :'error' => :'String', :'interaction_id' => :'String' } @@ -74,6 +79,10 @@ def initialize(attributes = {}) self.annotation_id = attributes[:'annotation_id'] end + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + if attributes.key?(:'error') self.error = attributes[:'error'] end @@ -139,6 +148,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && annotation_id == o.annotation_id && + code == o.code && error == o.error && interaction_id == o.interaction_id && additional_properties == o.additional_properties @@ -148,7 +158,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotation_id, error, interaction_id, additional_properties].hash + [annotation_id, code, error, interaction_id, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_error_code.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_error_code.rb new file mode 100644 index 000000000000..6bcb59ead040 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_error_code.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Stable error code. `permission_denied` indicates the item was rejected by queue access rules. + class LLMObsAnnotationErrorCode + include BaseEnumModel + + PERMISSION_DENIED = "permission_denied".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb index 4a71521ca893..ef37d845eadc 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb @@ -33,6 +33,15 @@ class LLMObsAnnotationQueueDataAttributesRequest # Identifier of the project this queue belongs to. attr_reader :project_id + # Whether annotation access is restricted to assigned users. + attr_accessor :restrict_to_assignees + + # Whether annotation access is restricted to queue reviewers. + attr_accessor :restrict_to_reviewers + + # Email addresses of reviewers who can access the annotation queue. + attr_accessor :reviewer_emails + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -42,7 +51,10 @@ def self.attribute_map :'annotation_schema' => :'annotation_schema', :'description' => :'description', :'name' => :'name', - :'project_id' => :'project_id' + :'project_id' => :'project_id', + :'restrict_to_assignees' => :'restrict_to_assignees', + :'restrict_to_reviewers' => :'restrict_to_reviewers', + :'reviewer_emails' => :'reviewer_emails' } end @@ -53,7 +65,10 @@ def self.openapi_types :'annotation_schema' => :'LLMObsAnnotationSchema', :'description' => :'String', :'name' => :'String', - :'project_id' => :'String' + :'project_id' => :'String', + :'restrict_to_assignees' => :'Boolean', + :'restrict_to_reviewers' => :'Boolean', + :'reviewer_emails' => :'Array' } end @@ -90,6 +105,20 @@ def initialize(attributes = {}) if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end + + if attributes.key?(:'restrict_to_assignees') + self.restrict_to_assignees = attributes[:'restrict_to_assignees'] + end + + if attributes.key?(:'restrict_to_reviewers') + self.restrict_to_reviewers = attributes[:'restrict_to_reviewers'] + end + + if attributes.key?(:'reviewer_emails') + if (value = attributes[:'reviewer_emails']).is_a?(Array) + self.reviewer_emails = value + end + end end # Check to see if the all the properties in the model are valid @@ -151,6 +180,9 @@ def ==(o) description == o.description && name == o.name && project_id == o.project_id && + restrict_to_assignees == o.restrict_to_assignees && + restrict_to_reviewers == o.restrict_to_reviewers && + reviewer_emails == o.reviewer_emails && additional_properties == o.additional_properties end @@ -158,7 +190,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotation_schema, description, name, project_id, additional_properties].hash + [annotation_schema, description, name, project_id, restrict_to_assignees, restrict_to_reviewers, reviewer_emails, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb index e8f86a8d09bd..b5ccfea98216 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb @@ -24,6 +24,9 @@ class LLMObsAnnotationQueueDataAttributesResponse # Schema defining the labels for an annotation queue. attr_accessor :annotation_schema + # Whether the current caller can manage access for the annotation queue. + attr_reader :can_manage_access + # Timestamp when the queue was created. attr_reader :created_at @@ -48,6 +51,15 @@ class LLMObsAnnotationQueueDataAttributesResponse # Identifier of the project this queue belongs to. attr_reader :project_id + # Whether annotation access is restricted to assigned users. + attr_reader :restrict_to_assignees + + # Whether annotation access is restricted to queue reviewers. + attr_reader :restrict_to_reviewers + + # Email addresses of reviewers for the annotation queue. Returned only when the caller can manage queue access. + attr_accessor :reviewer_emails + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -55,6 +67,7 @@ class LLMObsAnnotationQueueDataAttributesResponse def self.attribute_map { :'annotation_schema' => :'annotation_schema', + :'can_manage_access' => :'can_manage_access', :'created_at' => :'created_at', :'created_by' => :'created_by', :'description' => :'description', @@ -62,7 +75,10 @@ def self.attribute_map :'modified_by' => :'modified_by', :'name' => :'name', :'owned_by' => :'owned_by', - :'project_id' => :'project_id' + :'project_id' => :'project_id', + :'restrict_to_assignees' => :'restrict_to_assignees', + :'restrict_to_reviewers' => :'restrict_to_reviewers', + :'reviewer_emails' => :'reviewer_emails' } end @@ -71,6 +87,7 @@ def self.attribute_map def self.openapi_types { :'annotation_schema' => :'LLMObsAnnotationSchema', + :'can_manage_access' => :'Boolean', :'created_at' => :'Time', :'created_by' => :'String', :'description' => :'String', @@ -78,7 +95,10 @@ def self.openapi_types :'modified_by' => :'String', :'name' => :'String', :'owned_by' => :'String', - :'project_id' => :'String' + :'project_id' => :'String', + :'restrict_to_assignees' => :'Boolean', + :'restrict_to_reviewers' => :'Boolean', + :'reviewer_emails' => :'Array' } end @@ -104,6 +124,10 @@ def initialize(attributes = {}) self.annotation_schema = attributes[:'annotation_schema'] end + if attributes.key?(:'can_manage_access') + self.can_manage_access = attributes[:'can_manage_access'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -135,12 +159,27 @@ def initialize(attributes = {}) if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end + + if attributes.key?(:'restrict_to_assignees') + self.restrict_to_assignees = attributes[:'restrict_to_assignees'] + end + + if attributes.key?(:'restrict_to_reviewers') + self.restrict_to_reviewers = attributes[:'restrict_to_reviewers'] + end + + if attributes.key?(:'reviewer_emails') + if (value = attributes[:'reviewer_emails']).is_a?(Array) + self.reviewer_emails = value + end + end end # Check to see if the all the properties in the model are valid # @return true if the model is valid # @!visibility private def valid? + return false if @can_manage_access.nil? return false if @created_at.nil? return false if @created_by.nil? return false if @description.nil? @@ -149,9 +188,21 @@ def valid? return false if @name.nil? return false if @owned_by.nil? return false if @project_id.nil? + return false if @restrict_to_assignees.nil? + return false if @restrict_to_reviewers.nil? true end + # Custom attribute writer method with validation + # @param can_manage_access [Object] Object to be assigned + # @!visibility private + def can_manage_access=(can_manage_access) + if can_manage_access.nil? + fail ArgumentError, 'invalid value for "can_manage_access", can_manage_access cannot be nil.' + end + @can_manage_access = can_manage_access + end + # Custom attribute writer method with validation # @param created_at [Object] Object to be assigned # @!visibility private @@ -232,6 +283,26 @@ def project_id=(project_id) @project_id = project_id end + # Custom attribute writer method with validation + # @param restrict_to_assignees [Object] Object to be assigned + # @!visibility private + def restrict_to_assignees=(restrict_to_assignees) + if restrict_to_assignees.nil? + fail ArgumentError, 'invalid value for "restrict_to_assignees", restrict_to_assignees cannot be nil.' + end + @restrict_to_assignees = restrict_to_assignees + end + + # Custom attribute writer method with validation + # @param restrict_to_reviewers [Object] Object to be assigned + # @!visibility private + def restrict_to_reviewers=(restrict_to_reviewers) + if restrict_to_reviewers.nil? + fail ArgumentError, 'invalid value for "restrict_to_reviewers", restrict_to_reviewers cannot be nil.' + end + @restrict_to_reviewers = restrict_to_reviewers + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -259,6 +330,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && annotation_schema == o.annotation_schema && + can_manage_access == o.can_manage_access && created_at == o.created_at && created_by == o.created_by && description == o.description && @@ -267,6 +339,9 @@ def ==(o) name == o.name && owned_by == o.owned_by && project_id == o.project_id && + restrict_to_assignees == o.restrict_to_assignees && + restrict_to_reviewers == o.restrict_to_reviewers && + reviewer_emails == o.reviewer_emails && additional_properties == o.additional_properties end @@ -274,7 +349,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotation_schema, created_at, created_by, description, modified_at, modified_by, name, owned_by, project_id, additional_properties].hash + [annotation_schema, can_manage_access, created_at, created_by, description, modified_at, modified_by, name, owned_by, project_id, restrict_to_assignees, restrict_to_reviewers, reviewer_emails, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb index 3b008c079661..0a18978f4b47 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb @@ -30,6 +30,15 @@ class LLMObsAnnotationQueueUpdateDataAttributesRequest # Updated name of the annotation queue. attr_accessor :name + # Whether annotation access is restricted to assigned users. + attr_accessor :restrict_to_assignees + + # Whether annotation access is restricted to queue reviewers. + attr_accessor :restrict_to_reviewers + + # Updated email addresses of reviewers who can access the annotation queue. + attr_accessor :reviewer_emails + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -38,7 +47,10 @@ def self.attribute_map { :'annotation_schema' => :'annotation_schema', :'description' => :'description', - :'name' => :'name' + :'name' => :'name', + :'restrict_to_assignees' => :'restrict_to_assignees', + :'restrict_to_reviewers' => :'restrict_to_reviewers', + :'reviewer_emails' => :'reviewer_emails' } end @@ -48,7 +60,10 @@ def self.openapi_types { :'annotation_schema' => :'LLMObsAnnotationSchema', :'description' => :'String', - :'name' => :'String' + :'name' => :'String', + :'restrict_to_assignees' => :'Boolean', + :'restrict_to_reviewers' => :'Boolean', + :'reviewer_emails' => :'Array' } end @@ -81,6 +96,20 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'restrict_to_assignees') + self.restrict_to_assignees = attributes[:'restrict_to_assignees'] + end + + if attributes.key?(:'restrict_to_reviewers') + self.restrict_to_reviewers = attributes[:'restrict_to_reviewers'] + end + + if attributes.key?(:'reviewer_emails') + if (value = attributes[:'reviewer_emails']).is_a?(Array) + self.reviewer_emails = value + end + end end # Returns the object in the form of hash, with additionalProperties support. @@ -112,6 +141,9 @@ def ==(o) annotation_schema == o.annotation_schema && description == o.description && name == o.name && + restrict_to_assignees == o.restrict_to_assignees && + restrict_to_reviewers == o.restrict_to_reviewers && + reviewer_emails == o.reviewer_emails && additional_properties == o.additional_properties end @@ -119,7 +151,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotation_schema, description, name, additional_properties].hash + [annotation_schema, description, name, restrict_to_assignees, restrict_to_reviewers, reviewer_emails, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_display_block_annotated_interaction_item.rb b/lib/datadog_api_client/v2/models/llm_obs_display_block_annotated_interaction_item.rb index ba264b0c8d73..17adaa94593f 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_display_block_annotated_interaction_item.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_display_block_annotated_interaction_item.rb @@ -24,6 +24,9 @@ class LLMObsDisplayBlockAnnotatedInteractionItem # List of annotations for this interaction. attr_reader :annotations + # Whether the current caller can annotate this interaction. + attr_reader :can_annotate + # Server-generated deterministic identifier derived from the block list. attr_reader :content_id @@ -44,6 +47,7 @@ class LLMObsDisplayBlockAnnotatedInteractionItem def self.attribute_map { :'annotations' => :'annotations', + :'can_annotate' => :'can_annotate', :'content_id' => :'content_id', :'display_block' => :'display_block', :'id' => :'id', @@ -56,6 +60,7 @@ def self.attribute_map def self.openapi_types { :'annotations' => :'Array', + :'can_annotate' => :'Boolean', :'content_id' => :'String', :'display_block' => :'Array', :'id' => :'String', @@ -87,6 +92,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'can_annotate') + self.can_annotate = attributes[:'can_annotate'] + end + if attributes.key?(:'content_id') self.content_id = attributes[:'content_id'] end @@ -111,6 +120,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @annotations.nil? + return false if @can_annotate.nil? return false if @content_id.nil? return false if @display_block.nil? return false if @display_block.length < 1 @@ -129,6 +139,16 @@ def annotations=(annotations) @annotations = annotations end + # Custom attribute writer method with validation + # @param can_annotate [Object] Object to be assigned + # @!visibility private + def can_annotate=(can_annotate) + if can_annotate.nil? + fail ArgumentError, 'invalid value for "can_annotate", can_annotate cannot be nil.' + end + @can_annotate = can_annotate + end + # Custom attribute writer method with validation # @param content_id [Object] Object to be assigned # @!visibility private @@ -199,6 +219,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && annotations == o.annotations && + can_annotate == o.can_annotate && content_id == o.content_id && display_block == o.display_block && id == o.id && @@ -210,7 +231,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotations, content_id, display_block, id, type, additional_properties].hash + [annotations, can_annotate, content_id, display_block, id, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_trace_annotated_interaction_item.rb b/lib/datadog_api_client/v2/models/llm_obs_trace_annotated_interaction_item.rb index e29312d84f8f..accac28ca746 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_trace_annotated_interaction_item.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_trace_annotated_interaction_item.rb @@ -24,6 +24,9 @@ class LLMObsTraceAnnotatedInteractionItem # List of annotations for this interaction. attr_reader :annotations + # Whether the current caller can annotate this interaction. + attr_reader :can_annotate + # Upstream entity identifier supplied by the caller. attr_reader :content_id @@ -46,6 +49,7 @@ class LLMObsTraceAnnotatedInteractionItem def self.attribute_map { :'annotations' => :'annotations', + :'can_annotate' => :'can_annotate', :'content_id' => :'content_id', :'created_at' => :'created_at', :'id' => :'id', @@ -59,6 +63,7 @@ def self.attribute_map def self.openapi_types { :'annotations' => :'Array', + :'can_annotate' => :'Boolean', :'content_id' => :'String', :'created_at' => :'Time', :'id' => :'String', @@ -91,6 +96,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'can_annotate') + self.can_annotate = attributes[:'can_annotate'] + end + if attributes.key?(:'content_id') self.content_id = attributes[:'content_id'] end @@ -117,6 +126,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @annotations.nil? + return false if @can_annotate.nil? return false if @content_id.nil? return false if @created_at.nil? return false if @id.nil? @@ -135,6 +145,16 @@ def annotations=(annotations) @annotations = annotations end + # Custom attribute writer method with validation + # @param can_annotate [Object] Object to be assigned + # @!visibility private + def can_annotate=(can_annotate) + if can_annotate.nil? + fail ArgumentError, 'invalid value for "can_annotate", can_annotate cannot be nil.' + end + @can_annotate = can_annotate + end + # Custom attribute writer method with validation # @param content_id [Object] Object to be assigned # @!visibility private @@ -212,6 +232,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && annotations == o.annotations && + can_annotate == o.can_annotate && content_id == o.content_id && created_at == o.created_at && id == o.id && @@ -224,7 +245,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [annotations, content_id, created_at, id, modified_at, type, additional_properties].hash + [annotations, can_annotate, content_id, created_at, id, modified_at, type, additional_properties].hash end end end