Skip to content
Open
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
34 changes: 22 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9761,7 +9761,7 @@ components:
$ref: "#/components/schemas/AiGatewayNullableMaxReasoningLevel"
description: Maximum reasoning level. Null means there is no group-specific limit.
model_ids:
description: All saved model catalog IDs, including selections whose provider metadata is hidden. Preserve these IDs independently of the visible catalog.
description: Saved model catalog IDs whose providers the caller can view. Hidden identities are omitted; models_restricted indicates hidden membership.
example:
- 101
items:
Expand All @@ -9772,16 +9772,21 @@ components:
type: integer
type: array
models:
description: Metadata for saved model selections whose providers the caller can view. Missing metadata does not remove a saved ID.
description: Metadata for saved model selections whose providers the caller can view. Hidden model identities and metadata are omitted.
items:
$ref: "#/components/schemas/AiGatewayModelGroupModel"
type: array
models_restricted:
description: Whether some saved models are hidden from the caller. Hidden identities, names, and counts are omitted. Editing visible selections preserves hidden memberships.
example: true
readOnly: true
type: boolean
name:
description: Human-readable resource name.
example: Coding models
type: string
provider_ids:
description: All explicitly selected provider IDs, including hidden providers. Embedded provider metadata includes only viewable providers.
description: Explicitly selected provider IDs the caller can view. Hidden identities are omitted; providers_restricted indicates hidden membership.
example:
- 42
items:
Expand All @@ -9792,10 +9797,15 @@ components:
type: integer
type: array
providers:
description: Viewable explicitly selected providers, separate from individually selected models. Use provider_ids to retain all selections.
description: Viewable explicitly selected providers, separate from individually selected models. Hidden provider identities and metadata are omitted.
items:
$ref: "#/components/schemas/AiGatewayModelGroupProvider"
type: array
providers_restricted:
description: Whether some saved providers are hidden from the caller. Hidden identities, names, and counts are omitted. Editing visible selections preserves hidden memberships.
example: true
readOnly: true
type: boolean
revision:
description: Revision of the organization-wide policy. Present for the default model group and absent for named policies.
format: int64
Expand Down Expand Up @@ -9892,7 +9902,7 @@ components:
minLength: 1
type: string
provider_ids:
description: Explicit provider selections, including current and future models. Omit to preserve selections on update; an empty array clears them. Null is invalid. New selections require provider View; saved hidden IDs can be retained or removed.
description: Explicit provider selections, including current and future models. Replaces visible selections and preserves saved hidden selections. Omit to preserve the complete selection; an empty array clears only visible selections. Null is invalid. New selections require provider View.
items:
description: Provider ID.
format: int64
Expand Down Expand Up @@ -10072,7 +10082,7 @@ components:
$ref: "#/components/schemas/AiGatewayNullableMaxReasoningLevel"
description: Maximum reasoning level. Null clears the group-specific limit.
model_ids:
description: Individually selected model catalog IDs. Replaces this selection only. Omit to preserve it; an empty array clears it. Null is invalid. Individual selections do not include future models. New selections require provider View; retaining or removing saved hidden selections requires only parent Edit.
description: Individually selected model catalog IDs. Replaces visible selections and preserves saved hidden selections. Omit to preserve the complete selection; an empty array clears only visible selections. Null is invalid. Individual selections do not include future models. New selections require provider View.
items:
description: Model catalog entry ID.
example: 101
Expand All @@ -10087,15 +10097,15 @@ components:
minLength: 1
type: string
provider_ids:
description: Explicit provider selections, including current and future models. Omit to preserve selections on update; an empty array clears them. Null is invalid. New selections require provider View; saved hidden IDs can be retained or removed.
description: Explicit provider selections, including current and future models. Replaces visible selections and preserves saved hidden selections. Omit to preserve the complete selection; an empty array clears only visible selections. Null is invalid. New selections require provider View.
items:
description: Provider ID.
format: int64
minimum: 1
type: integer
type: array
routing_rule_slugs:
description: Organization-unique routing rule slugs. Replaces route selections only. Omit to preserve them; an empty array clears them. Null is invalid.
description: Organization-unique routing rule slugs. Replaces visible route selections and preserves saved hidden selections. Omit to preserve all route selections; an empty array clears only visible selections. Null is invalid. New selections require route View.
items:
description: Routing rule slug.
example: coding-route
Expand Down Expand Up @@ -218334,7 +218344,7 @@ paths:
permissions: []
/api/v2/model-groups:
get:
description: List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission; named policies also require view access.
description: List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission and policy View, including for the default policy. Hidden policies are omitted from lists and return the same not-found response as missing policies.
operationId: ListAiGatewayModelGroups
responses:
"200":
Expand Down Expand Up @@ -218387,7 +218397,7 @@ paths:
**Note**: This endpoint is in Preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: Create an AI Gateway model group from a name and any combination of model catalog entries and routing rules, with optional fast-mode and reasoning limits and initial access bindings.
description: Create an AI Gateway model group from a name and any combination of model catalog entries, providers, and routing rules, with optional fast-mode and reasoning limits. Include initial access bindings when creating a restricted policy. If the bindings cannot be applied, the policy is not created. Existing policies can update sharing through the restriction-policy API. If a creation request fails without confirming whether the policy was created, check the policy list before retrying to avoid duplicates.
operationId: CreateAiGatewayModelGroup
requestBody:
content:
Expand Down Expand Up @@ -218483,7 +218493,7 @@ paths:
**Note**: This endpoint is in Preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
get:
description: Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission; named policies also require view access. Provider selections cover current and future models and are returned separately from individual model selections.
description: Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission and policy View, including for the default policy. Hidden policies are omitted from lists and return the same not-found response as missing policies. Provider selections cover current and future models and are returned separately from individual model selections.
operationId: GetAiGatewayModelGroup
parameters:
- $ref: "#/components/parameters/AiGatewayModelGroupID"
Expand Down Expand Up @@ -218544,7 +218554,7 @@ paths:
**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 model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission; named policies also require edit access.
description: Update a model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission and policy View and Edit, including for the default policy. Management visibility does not change the inference audience or Run access.
operationId: UpdateAiGatewayModelGroup
parameters:
- $ref: "#/components/parameters/AiGatewayModelGroupID"
Expand Down
8 changes: 4 additions & 4 deletions src/datadog_api_client/v2/api/ai_gateway_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ def create_ai_gateway_model_group(
) -> AiGatewayModelGroupResponse:
"""Create an AI Gateway model group.

Create an AI Gateway model group from a name and any combination of model catalog entries and routing rules, with optional fast-mode and reasoning limits and initial access bindings.
Create an AI Gateway model group from a name and any combination of model catalog entries, providers, and routing rules, with optional fast-mode and reasoning limits. Include initial access bindings when creating a restricted policy. If the bindings cannot be applied, the policy is not created. Existing policies can update sharing through the restriction-policy API. If a creation request fails without confirming whether the policy was created, check the policy list before retrying to avoid duplicates.

:type body: AiGatewayModelGroupCreateRequest
:rtype: AiGatewayModelGroupResponse
Expand Down Expand Up @@ -2005,7 +2005,7 @@ def get_ai_gateway_model_group(
) -> AiGatewayModelGroupResponse:
"""Get an AI Gateway model group.

Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission; named policies also require view access. Provider selections cover current and future models and are returned separately from individual model selections.
Get a named policy or the explicit organization-wide policy by id "default". Requires configuration read permission and policy View, including for the default policy. Hidden policies are omitted from lists and return the same not-found response as missing policies. Provider selections cover current and future models and are returned separately from individual model selections.

:param id: Model group ID, or "default" for the explicit organization-wide access policy.
:type id: str
Expand Down Expand Up @@ -2268,7 +2268,7 @@ def list_ai_gateway_model_groups(
) -> AiGatewayModelGroupListResponse:
"""List AI Gateway model groups.

List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission; named policies also require view access.
List model groups the user can view. The organization-wide policy has id "default" and explicit model, provider, and route selections. Missing or empty selections grant no organization-wide access. Its audience is fixed to the organization; it cannot be renamed or deleted. Named policies retain their access bindings. Requires configuration read permission and policy View, including for the default policy. Hidden policies are omitted from lists and return the same not-found response as missing policies.

:rtype: AiGatewayModelGroupListResponse
"""
Expand Down Expand Up @@ -2594,7 +2594,7 @@ def update_ai_gateway_model_group(
) -> AiGatewayModelGroupResponse:
"""Update an AI Gateway model group.

Update a model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission; named policies also require edit access.
Update a model group. For id "default", save membership and request options atomically with expected_revision. Empty selections grant no organization-wide access. Applicable authorized named policies override organization-wide request options; a rejected named-policy request cannot fall back to organization-wide options. The organization-wide audience is fixed and grants resource use only. Requires configuration write permission and policy View and Edit, including for the default policy. Management visibility does not change the inference audience or Run access.

:param id: Model group ID, or "default" for the explicit organization-wide access policy.
:type id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def openapi_types(_):
"max_reasoning_level": (AiGatewayNullableMaxReasoningLevel,),
"model_ids": ([int],),
"models": ([AiGatewayModelGroupModel],),
"models_restricted": (bool,),
"name": (str,),
"provider_ids": ([int],),
"providers": ([AiGatewayModelGroupProvider],),
"providers_restricted": (bool,),
"revision": (int,),
"routing_rules": ([AiGatewayModelGroupRoutingRule],),
"routing_rules_restricted": (bool,),
Expand All @@ -59,15 +61,19 @@ def openapi_types(_):
"max_reasoning_level": "max_reasoning_level",
"model_ids": "model_ids",
"models": "models",
"models_restricted": "models_restricted",
"name": "name",
"provider_ids": "provider_ids",
"providers": "providers",
"providers_restricted": "providers_restricted",
"revision": "revision",
"routing_rules": "routing_rules",
"routing_rules_restricted": "routing_rules_restricted",
"updated_at": "updated_at",
}
read_only_vars = {
"models_restricted",
"providers_restricted",
"routing_rules_restricted",
}

Expand All @@ -83,6 +89,8 @@ def __init__(
providers: List[AiGatewayModelGroupProvider],
routing_rules: List[AiGatewayModelGroupRoutingRule],
updated_at: datetime,
models_restricted: Union[bool, UnsetType] = unset,
providers_restricted: Union[bool, UnsetType] = unset,
revision: Union[int, UnsetType] = unset,
routing_rules_restricted: Union[bool, UnsetType] = unset,
**kwargs,
Expand All @@ -99,21 +107,27 @@ def __init__(
:param max_reasoning_level: Maximum reasoning level permitted by a model group.
:type max_reasoning_level: AiGatewayNullableMaxReasoningLevel, none_type

:param model_ids: All saved model catalog IDs, including selections whose provider metadata is hidden. Preserve these IDs independently of the visible catalog.
:param model_ids: Saved model catalog IDs whose providers the caller can view. Hidden identities are omitted; models_restricted indicates hidden membership.
:type model_ids: [int]

:param models: Metadata for saved model selections whose providers the caller can view. Missing metadata does not remove a saved ID.
:param models: Metadata for saved model selections whose providers the caller can view. Hidden model identities and metadata are omitted.
:type models: [AiGatewayModelGroupModel]

:param models_restricted: Whether some saved models are hidden from the caller. Hidden identities, names, and counts are omitted. Editing visible selections preserves hidden memberships.
:type models_restricted: bool, optional

:param name: Human-readable resource name.
:type name: str

:param provider_ids: All explicitly selected provider IDs, including hidden providers. Embedded provider metadata includes only viewable providers.
:param provider_ids: Explicitly selected provider IDs the caller can view. Hidden identities are omitted; providers_restricted indicates hidden membership.
:type provider_ids: [int]

:param providers: Viewable explicitly selected providers, separate from individually selected models. Use provider_ids to retain all selections.
:param providers: Viewable explicitly selected providers, separate from individually selected models. Hidden provider identities and metadata are omitted.
:type providers: [AiGatewayModelGroupProvider]

:param providers_restricted: Whether some saved providers are hidden from the caller. Hidden identities, names, and counts are omitted. Editing visible selections preserves hidden memberships.
:type providers_restricted: bool, optional

:param revision: Revision of the organization-wide policy. Present for the default model group and absent for named policies.
:type revision: int, optional

Expand All @@ -126,6 +140,10 @@ def __init__(
:param updated_at: Time when the resource was last updated.
:type updated_at: datetime
"""
if models_restricted is not unset:
kwargs["models_restricted"] = models_restricted
if providers_restricted is not unset:
kwargs["providers_restricted"] = providers_restricted
if revision is not unset:
kwargs["revision"] = revision
if routing_rules_restricted is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(
:param name: Human-readable resource name.
:type name: str

:param provider_ids: Explicit provider selections, including current and future models. Omit to preserve selections on update; an empty array clears them. Null is invalid. New selections require provider View; saved hidden IDs can be retained or removed.
:param provider_ids: Explicit provider selections, including current and future models. Replaces visible selections and preserves saved hidden selections. Omit to preserve the complete selection; an empty array clears only visible selections. Null is invalid. New selections require provider View.
:type provider_ids: [int], optional

:param routing_rule_slugs: Organization-unique routing rule slugs, such as coding-route.
Expand Down
Loading
Loading