Skip to content

Commit a25f99d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e0b76d3 of spec repo
1 parent 26e564a commit a25f99d

21 files changed

Lines changed: 539 additions & 113 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 192 additions & 30 deletions
Large diffs are not rendered by default.

‎examples/v2/ai-gateway/CreateAiGatewayRoutingRule.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from datadog_api_client.v2.model.ai_gateway_nullable_routing_rule_tier_ordering import (
99
AiGatewayNullableRoutingRuleTierOrdering,
1010
)
11+
from datadog_api_client.v2.model.ai_gateway_routing_classifier_request import AiGatewayRoutingClassifierRequest
1112
from datadog_api_client.v2.model.ai_gateway_routing_reasoning_level import AiGatewayRoutingReasoningLevel
1213
from datadog_api_client.v2.model.ai_gateway_routing_rule_create_attributes import AiGatewayRoutingRuleCreateAttributes
1314
from datadog_api_client.v2.model.ai_gateway_routing_rule_create_data import AiGatewayRoutingRuleCreateData
@@ -23,14 +24,22 @@
2324
slug="coding",
2425
tiers=[
2526
AiGatewayRoutingRuleTierRequest(
27+
classifier=AiGatewayRoutingClassifierRequest(
28+
confidence_threshold=0.5,
29+
context="Requests come from engineers.",
30+
model="gpt-6-luna",
31+
provider="openai",
32+
),
2633
ordering=AiGatewayNullableRoutingRuleTierOrdering.CONFIGURED,
2734
targets=[
2835
AiGatewayRoutingRuleTargetRequest(
36+
default=False,
2937
id=901,
3038
model="gpt-5.2-codex",
3139
model_id=101,
3240
provider="prod-us",
3341
reasoning_level=AiGatewayRoutingReasoningLevel.MEDIUM,
42+
rubric="Short factual questions.",
3443
slug="coding-fallback",
3544
type=AiGatewayRoutingRuleTargetType.MODEL,
3645
weight=70,

‎examples/v2/ai-gateway/UpdateAiGatewayRoutingRule.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Replace an AI Gateway routing rule returns "OK" response
2+
Update an AI Gateway routing rule returns "OK" response
33
"""
44

55
from os import environ
@@ -8,6 +8,7 @@
88
from datadog_api_client.v2.model.ai_gateway_nullable_routing_rule_tier_ordering import (
99
AiGatewayNullableRoutingRuleTierOrdering,
1010
)
11+
from datadog_api_client.v2.model.ai_gateway_routing_classifier_request import AiGatewayRoutingClassifierRequest
1112
from datadog_api_client.v2.model.ai_gateway_routing_reasoning_level import AiGatewayRoutingReasoningLevel
1213
from datadog_api_client.v2.model.ai_gateway_routing_rule_replace_attributes import AiGatewayRoutingRuleReplaceAttributes
1314
from datadog_api_client.v2.model.ai_gateway_routing_rule_replace_data import AiGatewayRoutingRuleReplaceData
@@ -16,20 +17,34 @@
1617
from datadog_api_client.v2.model.ai_gateway_routing_rule_target_type import AiGatewayRoutingRuleTargetType
1718
from datadog_api_client.v2.model.ai_gateway_routing_rule_tier_request import AiGatewayRoutingRuleTierRequest
1819
from datadog_api_client.v2.model.ai_gateway_routing_rule_type import AiGatewayRoutingRuleType
20+
from datetime import datetime
21+
from dateutil.tz import tzutc
1922

2023
body = AiGatewayRoutingRuleReplaceRequest(
2124
data=AiGatewayRoutingRuleReplaceData(
2225
attributes=AiGatewayRoutingRuleReplaceAttributes(
26+
expected_updated_at=datetime(2026, 8, 24, 12, 0, tzinfo=tzutc()),
27+
removed_target_ids=[
28+
901,
29+
],
2330
tiers=[
2431
AiGatewayRoutingRuleTierRequest(
32+
classifier=AiGatewayRoutingClassifierRequest(
33+
confidence_threshold=0.5,
34+
context="Requests come from engineers.",
35+
model="gpt-6-luna",
36+
provider="openai",
37+
),
2538
ordering=AiGatewayNullableRoutingRuleTierOrdering.CONFIGURED,
2639
targets=[
2740
AiGatewayRoutingRuleTargetRequest(
41+
default=False,
2842
id=901,
2943
model="gpt-5.2-codex",
3044
model_id=101,
3145
provider="prod-us",
3246
reasoning_level=AiGatewayRoutingReasoningLevel.MEDIUM,
47+
rubric="Short factual questions.",
3348
slug="coding-fallback",
3449
type=AiGatewayRoutingRuleTargetType.MODEL,
3550
weight=70,

‎src/datadog_api_client/v2/api/ai_gateway_api.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ def create_ai_gateway_routing_rule(
16061606
) -> AiGatewayRoutingRuleResponse:
16071607
"""Create an AI Gateway routing rule.
16081608
1609-
Create an organization-owned routing rule. Data capture overrides are managed independently. Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only distinct model targets with an explicit provider. Weights need not total 100. Configured tiers must omit weights or set them to null.
1609+
Create an organization-owned route with ``ai_gateway_config_write``. New provider/model and route references require View. New routes use standard unrestricted defaults. To restrict configuration access, create the route and then apply a restriction policy using its numeric route_id. Sharing follows standard restriction-policy propagation and does not grant or revoke policy-authorized inference. Data capture overrides are managed independently. Each tier has an ordering, which defaults to configured. A weighted_affinity tier distributes first-choice assignments by relative target weights (1 to 10000, default 1) and accepts only distinct model targets with an explicit provider. Weights need not total 100. Configured tiers must omit weights or set them to null.
16101610
16111611
:type body: AiGatewayRoutingRuleCreateRequest
16121612
:rtype: AiGatewayRoutingRuleResponse
@@ -1748,7 +1748,7 @@ def delete_ai_gateway_provider(
17481748
) -> None:
17491749
"""Delete an AI Gateway provider.
17501750
1751-
Requires ``ai_gateway_config_write`` and provider Edit. Models and pricing inherit provider access. This also applies when force=true. Existing cascades remain and can affect policies the caller cannot edit. Delete a provider by ID. Providers used by routing rules return provider_in_use with HTTP 409 and the affected rules in error metadata. Retry with force=true to remove provider targets and delete rules left without targets. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted.
1751+
Requires ``ai_gateway_config_write`` and provider View/Edit. Models and pricing inherit provider access. Every affected route and policy membership requires the corresponding Edit permission; force=true never bypasses authorization. Providers used by routing rules return provider_in_use with HTTP 409. Each JSON:API error item's ``meta`` contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable; visible route entries contain id, slug, and editable. Hidden dependencies are omitted from every collection and reported only by restricted_dependencies. A blocked response changes no configuration; an authorized editor must first remove the blocking references. Retry with force=true to confirm an authorized cascade that removes provider targets and deletes rules left without targets. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted.
17521752
17531753
:param id: Provider ID.
17541754
:type id: int
@@ -1789,7 +1789,7 @@ def delete_ai_gateway_routing_rule(
17891789
) -> None:
17901790
"""Delete an AI Gateway routing rule.
17911791
1792-
Delete a routing rule. Referenced rules require force=true. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted.
1792+
Delete a route with ``ai_gateway_config_write`` and route View/Edit. Every affected route and policy membership requires the corresponding Edit permission. The force=true parameter confirms impact and never bypasses authorization. A denied or unavailable check changes no configuration. Visible dependencies include editable; hidden dependencies are omitted and reported only by restricted_dependencies. A blocked response means an authorized editor must first remove blocking references. Each JSON:API error item's ``meta`` contains blocked, restricted_dependencies, policies, rules_to_delete, and rules_to_update. Visible policy entries contain id, name, and editable. Route deletion entries contain rule, reason, and editable; update entries contain rule, removed_tiers, and editable. Each rule contains route_id, slug, tiers, created_at, and updated_at with hidden nested selections redacted. The removed_tiers array identifies original tier numbers removed entirely by the cascade. Already-authorized in-flight operations may finish. Referenced rules require force=true. Surviving tiers keep their ordering and weights. A deletion that would rewrite a surviving tier with an unknown ordering_issue fails with HTTP 409 and code routing_rule_unknown_ordering until that rule is replaced or deleted. Restriction cleanup occurs only after confirmed deletion. Cleanup failure returns 500 with configuration_deleted=true and permissions_cleanup_failed=true; refresh instead of assuming the route still exists.
17931793
17941794
:param slug: Organization-unique routing rule slug.
17951795
:type slug: str
@@ -2008,7 +2008,7 @@ def get_ai_gateway_routing_rule(
20082008
) -> AiGatewayRoutingRuleResponse:
20092009
"""Get an AI Gateway routing rule.
20102010
2011-
Get a routing rule by its organization-unique slug.
2011+
Get a routing rule by slug with ``ai_gateway_config_read`` and route View. Hidden and missing routes both return 404. Hidden target identities are omitted; parent-local target IDs remain available for retention.
20122012
20132013
:param slug: Organization-unique routing rule slug.
20142014
:type slug: str
@@ -2269,7 +2269,7 @@ def list_ai_gateway_routing_rules(
22692269
) -> AiGatewayRoutingRuleListResponse:
22702270
"""List AI Gateway routing rules.
22712271
2272-
List all routing rules for the organization.
2272+
List the organization's routing rules that the caller has View access to. Requires ``ai_gateway_config_read``. Hidden route references are omitted from nested targets.
22732273
22742274
:rtype: AiGatewayRoutingRuleListResponse
22752275
"""
@@ -2497,9 +2497,9 @@ def update_ai_gateway_routing_rule(
24972497
slug: str,
24982498
body: AiGatewayRoutingRuleReplaceRequest,
24992499
) -> AiGatewayRoutingRuleResponse:
2500-
"""Replace an AI Gateway routing rule.
2500+
"""Update an AI Gateway routing rule.
25012501
2502-
Replace a routing rule's tiers. The slug is immutable; data capture is managed independently. This is a full replacement: omitted or null ordering resets the tier to configured, and omitted or null weights in a weighted_affinity tier reset to 1. Omitted or null reasoning_level clears a model destination's reasoning override. Replacing a rule repairs tiers reported with an ordering_issue.
2502+
Update a route with ``ai_gateway_config_write`` and route View/Edit. The slug is immutable; data capture is managed independently. Omitting tiers preserves the entire graph. When tiers are supplied, saved parent-local target IDs retain omitted destination and reasoning, weight, rubric, and default settings. Omitted ordering/classifier settings preserve the saved same-position tier. Explicit null resets nullable settings. New references require View on their resources. A hidden target omitted from tiers must be explicitly listed in removed_target_ids, otherwise the update fails without changes. expected_updated_at rejects stale updates with 409. Sharing-only saves do not replace target rows. Hidden and missing routes return the same 404; visible non-editors receive 403. Inference authorization is unchanged.
25032503
25042504
:param slug: Organization-unique routing rule slug.
25052505
:type slug: str

‎src/datadog_api_client/v2/api/restriction_policies_api.py‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ def delete_restriction_policy(
111111
"""Delete a restriction policy.
112112
113113
Deletes the restriction policy associated with a specified resource.
114-
For AI Gateway provider policies, requires ``ai_gateway_config_write`` and standard restriction-policy authorization.
115-
Deleting a provider policy restores normal unrestricted defaults.
114+
For AI Gateway provider and route policies, requires ``ai_gateway_config_write`` and standard restriction-policy authorization.
115+
Deleting a provider or route policy restores normal unrestricted defaults.
116116
117-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
117+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``ai-gateway-route`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
118118
:type resource_id: str
119119
:rtype: None
120120
"""
@@ -130,9 +130,9 @@ def get_restriction_policy(
130130
"""Get a restriction policy.
131131
132132
Retrieves the restriction policy associated with a specified resource.
133-
For AI Gateway provider policies, requires ``ai_gateway_config_read``.
133+
For AI Gateway provider and route policies, requires ``ai_gateway_config_read``.
134134
135-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
135+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``ai-gateway-route`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
136136
:type resource_id: str
137137
:rtype: RestrictionPolicyResponse
138138
"""
@@ -157,6 +157,7 @@ def update_restriction_policy(
157157
Restriction policies can be applied to the following resources:
158158
159159
* AI Gateway Providers: ``ai-gateway-provider``
160+
* AI Gateway Routes: ``ai-gateway-route``
160161
* Dashboards: ``dashboard``
161162
* Integration Services: ``integration-service``
162163
* Integration Webhooks: ``integration-webhook``
@@ -186,12 +187,12 @@ def update_restriction_policy(
186187
* Feature Flags: ``feature-flag``
187188
* Network Path Configs: ``network-path-config``
188189
189-
AI Gateway provider policies control configuration and inherited model/catalog/pricing visibility.
190-
The editor relation includes View. Providers have no Run relation; restriction policies don't affect inference.
191-
Reading provider policies requires ``ai_gateway_config_read``. Updating or deleting them requires
190+
AI Gateway provider policies control configuration and inherited model/catalog/pricing visibility. Route policies control route configuration and identifying nested references.
191+
The editor relation includes View. Providers and routes have no Run relation; restriction policies don't affect inference.
192+
Reading provider or route policies requires ``ai_gateway_config_read``. Updating or deleting them requires
192193
``ai_gateway_config_write`` and follows standard restriction-policy authorization, including
193194
administrator recovery and self-lockout checks.
194-
Providers without a restriction policy retain the normal unrestricted defaults.
195+
Providers and routes without a restriction policy retain the normal unrestricted defaults.
195196
196197
**Supported relations for resources**
197198
@@ -202,6 +203,8 @@ def update_restriction_policy(
202203
- Supported Relations
203204
* - AI Gateway Providers
204205
- ``viewer`` , ``editor``
206+
* - AI Gateway Routes
207+
- ``viewer`` , ``editor``
205208
* - Dashboards
206209
- ``viewer`` , ``editor``
207210
* - Integration Services
@@ -260,7 +263,7 @@ def update_restriction_policy(
260263
- ``viewer`` , ``editor``
261264
262265
263-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
266+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``ai-gateway-provider`` , ``ai-gateway-route`` , ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
264267
:type resource_id: str
265268
:param body: Restriction policy payload
266269
:type body: RestrictionPolicyUpdateRequest

0 commit comments

Comments
 (0)