Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 96 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
24 changes: 24 additions & 0 deletions examples/v2/ai-gateway/DeleteAIGatewayModelByCanonical.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
46 changes: 46 additions & 0 deletions examples/v2/ai-gateway/UpdateAIGatewayModelByCanonical.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
2 changes: 2 additions & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Loading
Loading