diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e9835c3f78..8fec6180d9f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -241309,6 +241309,100 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/providers/{provider_id}/model: + delete: + description: >- + Delete a manually managed model catalog entry, naming the model in the `canonical` query parameter. Discovered entries are read-only. Unlike the endpoint that takes the canonical ID in the path, this one accepts canonical IDs that contain `/`. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: DeleteAIGatewayModelByCanonical + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalIDQuery" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Delete a provider model by canonical ID + tags: + - AI Gateway + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: >- + Update a manually managed model catalog entry, naming the model in the `canonical` query parameter. Discovered entries are read-only. Unlike the endpoint that takes the canonical ID in the path, this one accepts canonical IDs that contain `/`. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + operationId: UpdateAIGatewayModelByCanonical + parameters: + - $ref: "#/components/parameters/AiGatewayProviderIDForModels" + - $ref: "#/components/parameters/AiGatewayModelCanonicalIDQuery" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AiGatewayModelUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-08-24T12:00:00Z" + enabled: true + model_id_canonical: openai/gpt-4o + model_id_wire: openai/gpt-4o-2024-08-06 + provider_id: 42 + source: manual + supported_operations: + - OPENAI_CHAT_COMPLETIONS + updated_at: "2026-08-24T12:00:00Z" + id: "101" + type: model-catalog-entries + schema: + $ref: "#/components/schemas/AiGatewayModelCatalogEntryResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ai_gateway_config_write + summary: Update a provider model by canonical ID + tags: + - AI Gateway + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - ai_gateway_config_write + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/providers/{provider_id}/model-pricing: delete: description: >- @@ -241640,6 +241734,7 @@ paths: description: |- Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. Delete a manually managed model catalog entry by its canonical model ID. Discovered entries are read-only. + A canonical ID that contains `/` can't be sent in the path; use the `/api/v2/providers/{provider_id}/model` endpoint with the `canonical` query parameter instead. operationId: DeleteAiGatewayModel parameters: - $ref: "#/components/parameters/AiGatewayProviderIDForModels" @@ -241670,7 +241765,7 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: >- - Update a manually managed model catalog entry. Discovered entries are read-only. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. + Update a manually managed model catalog entry. Discovered entries are read-only. A canonical ID that contains `/` can't be sent in the path; use the `/api/v2/providers/{provider_id}/model` endpoint with the `canonical` query parameter instead. Requires `ai_gateway_config_write` and provider Edit. Models and pricing inherit provider access. operationId: UpdateAiGatewayModel parameters: - $ref: "#/components/parameters/AiGatewayProviderIDForModels" diff --git a/examples/v2/ai-gateway/DeleteAIGatewayModelByCanonical.java b/examples/v2/ai-gateway/DeleteAIGatewayModelByCanonical.java new file mode 100644 index 00000000000..48a6f2a8ef5 --- /dev/null +++ b/examples/v2/ai-gateway/DeleteAIGatewayModelByCanonical.java @@ -0,0 +1,24 @@ +// Delete a provider model by canonical ID returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.deleteAIGatewayModelByCanonical", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + try { + apiInstance.deleteAIGatewayModelByCanonical(42L, "openai/gpt-4o"); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#deleteAIGatewayModelByCanonical"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/ai-gateway/UpdateAIGatewayModelByCanonical.java b/examples/v2/ai-gateway/UpdateAIGatewayModelByCanonical.java new file mode 100644 index 00000000000..ea5bbde5356 --- /dev/null +++ b/examples/v2/ai-gateway/UpdateAIGatewayModelByCanonical.java @@ -0,0 +1,46 @@ +// Update a provider model by canonical ID returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AiGatewayApi; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryResponse; +import com.datadog.api.client.v2.model.AiGatewayModelCatalogEntryType; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateAttributes; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateData; +import com.datadog.api.client.v2.model.AiGatewayModelUpdateRequest; +import com.datadog.api.client.v2.model.AiGatewaySupportedOperation; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.updateAIGatewayModelByCanonical", true); + AiGatewayApi apiInstance = new AiGatewayApi(defaultClient); + + AiGatewayModelUpdateRequest body = + new AiGatewayModelUpdateRequest() + .data( + new AiGatewayModelUpdateData() + .attributes( + new AiGatewayModelUpdateAttributes() + .modelIdWire("gpt-5.2-codex-20260801") + .supportedOperations( + Collections.singletonList( + AiGatewaySupportedOperation.OPENAI_CHAT_COMPLETIONS))) + .id("101") + .type(AiGatewayModelCatalogEntryType.MODEL_CATALOG_ENTRIES)); + + try { + AiGatewayModelCatalogEntryResponse result = + apiInstance.updateAIGatewayModelByCanonical(42L, "openai/gpt-4o", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AiGatewayApi#updateAIGatewayModelByCanonical"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index e1726d750e5..755c7e870e6 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1169,6 +1169,7 @@ public class ApiClient { put("v2.deleteAiGatewayBudget", false); put("v2.deleteAiGatewayDataCaptureOverride", false); put("v2.deleteAiGatewayModel", false); + put("v2.deleteAIGatewayModelByCanonical", false); put("v2.deleteAiGatewayModelGroup", false); put("v2.deleteAiGatewayModelPricing", false); put("v2.deleteAIGatewayModelPricingByCanonical", false); @@ -1209,6 +1210,7 @@ public class ApiClient { put("v2.updateAiGatewayDataCaptureOverride", false); put("v2.updateAiGatewayGovernance", false); put("v2.updateAiGatewayModel", false); + put("v2.updateAIGatewayModelByCanonical", false); put("v2.updateAiGatewayModelGroup", false); put("v2.updateAiGatewayModelPricing", false); put("v2.updateAIGatewayModelPricingByCanonical", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java b/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java index 72f83e33d6b..6d6179091a6 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AiGatewayApi.java @@ -1783,7 +1783,9 @@ public CompletableFuture deleteAiGatewayModelAsync(Long providerId, String /** * Requires ai_gateway_config_write and provider Edit. Models and pricing inherit * provider access. Delete a manually managed model catalog entry by its canonical model ID. - * Discovered entries are read-only. + * Discovered entries are read-only. A canonical ID that contains / can't be sent in + * the path; use the /api/v2/providers/{provider_id}/model endpoint with the + * canonical query parameter instead. * * @param providerId Provider ID. (required) * @param canonical Canonical model identifier. (required) @@ -1927,6 +1929,202 @@ public CompletableFuture> deleteAiGatewayModelWithHttpInfoAsyn null); } + /** + * Delete a provider model by canonical ID. + * + *

See {@link #deleteAIGatewayModelByCanonicalWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @throws ApiException if fails to make API call + */ + public void deleteAIGatewayModelByCanonical(Long providerId, String canonical) + throws ApiException { + deleteAIGatewayModelByCanonicalWithHttpInfo(providerId, canonical); + } + + /** + * Delete a provider model by canonical ID. + * + *

See {@link #deleteAIGatewayModelByCanonicalWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteAIGatewayModelByCanonicalAsync( + Long providerId, String canonical) { + return deleteAIGatewayModelByCanonicalWithHttpInfoAsync(providerId, canonical) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a manually managed model catalog entry, naming the model in the canonical + * query parameter. Discovered entries are read-only. Unlike the endpoint that takes the canonical + * ID in the path, this one accepts canonical IDs that contain /. Requires + * ai_gateway_config_write and provider Edit. Models and pricing inherit provider access. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteAIGatewayModelByCanonicalWithHttpInfo( + Long providerId, String canonical) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteAIGatewayModelByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " deleteAIGatewayModelByCanonical"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " deleteAIGatewayModelByCanonical"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/model" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "canonical", canonical)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAIGatewayModelByCanonical", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a provider model by canonical ID. + * + *

See {@link #deleteAIGatewayModelByCanonicalWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteAIGatewayModelByCanonicalWithHttpInfoAsync( + Long providerId, String canonical) { + // Check if unstable operation is enabled + String operationId = "deleteAIGatewayModelByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " deleteAIGatewayModelByCanonical")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " deleteAIGatewayModelByCanonical")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/model" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "canonical", canonical)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.deleteAIGatewayModelByCanonical", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** * Delete an AI Gateway model group. * @@ -9135,9 +9333,11 @@ public CompletableFuture updateAiGatewayMode } /** - * Update a manually managed model catalog entry. Discovered entries are read-only. Requires - * ai_gateway_config_write and provider Edit. Models and pricing inherit provider - * access. + * Update a manually managed model catalog entry. Discovered entries are read-only. A canonical ID + * that contains / can't be sent in the path; use the + * /api/v2/providers/{provider_id}/model endpoint with the canonical query + * parameter instead. Requires ai_gateway_config_write and provider Edit. Models and + * pricing inherit provider access. * * @param providerId Provider ID. (required) * @param canonical Canonical model identifier. (required) @@ -9305,6 +9505,232 @@ public ApiResponse updateAiGatewayModelWithH new GenericType() {}); } + /** + * Update a provider model by canonical ID. + * + *

See {@link #updateAIGatewayModelByCanonicalWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @param body (required) + * @return AiGatewayModelCatalogEntryResponse + * @throws ApiException if fails to make API call + */ + public AiGatewayModelCatalogEntryResponse updateAIGatewayModelByCanonical( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) throws ApiException { + return updateAIGatewayModelByCanonicalWithHttpInfo(providerId, canonical, body).getData(); + } + + /** + * Update a provider model by canonical ID. + * + *

See {@link #updateAIGatewayModelByCanonicalWithHttpInfoAsync}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @param body (required) + * @return CompletableFuture<AiGatewayModelCatalogEntryResponse> + */ + public CompletableFuture updateAIGatewayModelByCanonicalAsync( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) { + return updateAIGatewayModelByCanonicalWithHttpInfoAsync(providerId, canonical, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a manually managed model catalog entry, naming the model in the canonical + * query parameter. Discovered entries are read-only. Unlike the endpoint that takes the canonical + * ID in the path, this one accepts canonical IDs that contain /. Requires + * ai_gateway_config_write and provider Edit. Models and pricing inherit provider access. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @param body (required) + * @return ApiResponse<AiGatewayModelCatalogEntryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + updateAIGatewayModelByCanonicalWithHttpInfo( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateAIGatewayModelByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " updateAIGatewayModelByCanonical"); + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + throw new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " updateAIGatewayModelByCanonical"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling updateAIGatewayModelByCanonical"); + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/model" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "canonical", canonical)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAIGatewayModelByCanonical", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a provider model by canonical ID. + * + *

See {@link #updateAIGatewayModelByCanonicalWithHttpInfo}. + * + * @param providerId Provider ID. (required) + * @param canonical Canonical model identifier. It can contain /, such as + * openai/gpt-4o. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<AiGatewayModelCatalogEntryResponse>> + */ + public CompletableFuture> + updateAIGatewayModelByCanonicalWithHttpInfoAsync( + Long providerId, String canonical, AiGatewayModelUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateAIGatewayModelByCanonical"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'providerId' is set + if (providerId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'providerId' when calling" + + " updateAIGatewayModelByCanonical")); + return result; + } + + // verify the required parameter 'canonical' is set + if (canonical == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'canonical' when calling" + + " updateAIGatewayModelByCanonical")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateAIGatewayModelByCanonical")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/providers/{provider_id}/model" + .replaceAll( + "\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "canonical", canonical)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AiGatewayApi.updateAIGatewayModelByCanonical", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Update an AI Gateway model group. * diff --git a/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature b/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature index 278e9ee79dd..0cbfe1a6289 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/ai_gateway.feature @@ -316,6 +316,33 @@ Feature: AI Gateway When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a provider model by canonical ID returns "Bad Request" response + Given operation "DeleteAIGatewayModelByCanonical" enabled + And new "DeleteAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a provider model by canonical ID returns "No Content" response + Given operation "DeleteAIGatewayModelByCanonical" enabled + And new "DeleteAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Delete a provider model by canonical ID returns "Not Found" response + Given operation "DeleteAIGatewayModelByCanonical" enabled + And new "DeleteAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:ddoghq/frontier-prd-gateway Scenario: Delete an AI Gateway data capture override returns "Bad Request" response Given operation "DeleteAiGatewayDataCaptureOverride" enabled @@ -1048,6 +1075,36 @@ Feature: AI Gateway When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a provider model by canonical ID returns "Bad Request" response + Given operation "UpdateAIGatewayModelByCanonical" enabled + And new "UpdateAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a provider model by canonical ID returns "Not Found" response + Given operation "UpdateAIGatewayModelByCanonical" enabled + And new "UpdateAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/frontier-prd-gateway + Scenario: Update a provider model by canonical ID returns "OK" response + Given operation "UpdateAIGatewayModelByCanonical" enabled + And new "UpdateAIGatewayModelByCanonical" request + And request contains "provider_id" parameter from "REPLACE.ME" + And request contains "canonical" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "id": "101", "type": "model-catalog-entries"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/frontier-prd-gateway Scenario: Update an AI Gateway budget returns "Bad Request" response Given operation "UpdateAiGatewayBudget" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 6371f7ac7e8..d988bd58d5a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -3574,6 +3574,12 @@ "type": "idempotent" } }, + "DeleteAIGatewayModelByCanonical": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "DeleteAIGatewayModelPricingByCanonical": { "tag": "AI Gateway", "undo": { @@ -10903,6 +10909,12 @@ "type": "idempotent" } }, + "UpdateAIGatewayModelByCanonical": { + "tag": "AI Gateway", + "undo": { + "type": "idempotent" + } + }, "UpdateAIGatewayModelPricingByCanonical": { "tag": "AI Gateway", "undo": {