From ddd8190cfb9ebcb9f65c008555d84c6a58f9f18e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 10:09:05 +0000 Subject: [PATCH] Regenerate client from commit 18ec6c4 of spec repo --- .generator/schemas/v2/openapi.yaml | 432 ++++++++++++++++++ .../v2/ai-gateway/CreateAiGatewayProvider.py | 5 + .../ai-gateway/CreateAiGatewayRoutingRule.py | 12 + .../v2/ai-gateway/UpdateAiGatewayProvider.py | 1 + ...way_budget_instances_summary_attributes.py | 11 + .../v2/model/ai_gateway_budget_limit_mode.py | 38 ++ .../ai_gateway_budget_list_attributes.py | 10 + .../ai_gateway_budget_reporting_summary.py | 72 +++ .../ai_gateway_model_automatic_pricing.py | 111 +++++ ...way_model_automatic_pricing_field_match.py | 39 ++ ...gateway_model_automatic_pricing_mapping.py | 51 +++ ...ay_model_automatic_pricing_mode_trigger.py | 66 +++ ...ai_gateway_model_automatic_pricing_rate.py | 110 +++++ ..._gateway_model_automatic_pricing_source.py | 57 +++ ..._gateway_model_catalog_entry_attributes.py | 20 + .../ai_gateway_model_pricing_attributes.py | 68 +++ ..._gateway_model_pricing_effective_source.py | 8 +- .../model/ai_gateway_model_pricing_status.py | 38 ++ .../v2/model/ai_gateway_model_zdr.py | 64 +++ .../v2/model/ai_gateway_model_zdr_coverage.py | 43 ++ .../model/ai_gateway_provider_attributes.py | 32 ++ .../ai_gateway_provider_create_attributes.py | 27 ++ ...teway_provider_create_credential_source.py | 45 ++ .../ai_gateway_provider_credential_source.py | 40 ++ .../model/ai_gateway_provider_model_entry.py | 20 + .../v2/model/ai_gateway_provider_status.py | 113 +++++ .../model/ai_gateway_provider_status_state.py | 41 ++ .../ai_gateway_provider_update_attributes.py | 13 +- ..._gateway_routing_rule_create_attributes.py | 21 +- src/datadog_api_client/v2/models/__init__.py | 36 ++ tests/v2/features/ai_gateway.feature | 20 +- 31 files changed, 1650 insertions(+), 14 deletions(-) create mode 100644 src/datadog_api_client/v2/model/ai_gateway_budget_limit_mode.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_budget_reporting_summary.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_field_match.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mapping.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mode_trigger.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_rate.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_source.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_pricing_status.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_zdr.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_model_zdr_coverage.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_provider_create_credential_source.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_provider_credential_source.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_provider_status.py create mode 100644 src/datadog_api_client/v2/model/ai_gateway_provider_status_state.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 809d974e93..c9fc5869ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -8389,6 +8389,11 @@ components: description: Whether instances were withheld because their provider or model is hidden. Summary counts and totals exclude those instances. example: false type: boolean + total_capacity_microcents: + description: "Sum of every matching instance's capacity in the window, including per-instance overrides: the combined limit of the instances counted." + example: 300000000 + format: int64 + type: integer total_spend_microcents: description: Spend summed across all instances, in microcents. example: 75000000 @@ -8441,6 +8446,16 @@ components: type: string x-enum-varnames: - BUDGET_INSTANCES_SUMMARY + AiGatewayBudgetLimitMode: + description: How the budget limit applies. `shared` is one limit for all matching traffic. `per_instance` is one limit for each counter of a template budget that splits by value. + enum: + - shared + - per_instance + example: shared + type: string + x-enum-varnames: + - SHARED + - PER_INSTANCE AiGatewayBudgetListAttributes: description: Budget configuration including spend and capacity for the active accounting window. properties: @@ -8484,6 +8499,8 @@ components: description: Human-readable resource name. example: Coding agents type: string + reporting_summary: + $ref: "#/components/schemas/AiGatewayBudgetReportingSummary" scope_restricted: description: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. example: false @@ -8648,6 +8665,38 @@ components: type: string x-enum-varnames: - BUDGET_PERIODS + AiGatewayBudgetReportingSummary: + description: Health across all counters in the active accounting window. Includes hidden counters; contains no scope values or identities. + properties: + exceeded_capacity_count: + description: Number of counters at or above capacity. + example: 0 + format: int64 + type: integer + instance_count: + description: Number of counters in the active window. Counters are created on first use. + example: 1 + format: int64 + type: integer + limit_mode: + $ref: "#/components/schemas/AiGatewayBudgetLimitMode" + over_warning_threshold_count: + description: Number of counters at or above the warning threshold. + example: 0 + format: int64 + type: integer + total_capacity_microcents: + description: Combined capacity of the counters in the active window, in microcents. A shared budget reports its configured limit before its first counter exists. + example: 100000000 + format: int64 + type: integer + required: + - limit_mode + - total_capacity_microcents + - instance_count + - over_warning_threshold_count + - exceeded_capacity_count + type: object AiGatewayBudgetResource: description: AI Gateway budget resource. properties: @@ -9573,6 +9622,185 @@ components: - INPUT_SIZE_BY_ROLE - AVAILABLE_TOOLS - GENERATION_SETTINGS + AiGatewayModelAutomaticPricing: + description: The published models.dev price. Present only when it is the effective price. + properties: + last_validated_at: + description: Time the price was last revalidated against the source. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + mapping: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingMapping" + mode_triggers: + description: "Request fields that select each priced mode, such as `speed: fast` for `anthropic` models. Omitted when the model has a single mode." + items: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingModeTrigger" + type: array + observed_at: + description: Time the price was observed in the source. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + rates: + description: Published rates. + items: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingRate" + type: array + source: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingSource" + stale: + description: True when the price has not been revalidated recently and is being retained as last-known-good. + example: false + type: boolean + required: + - rates + - source + - observed_at + - last_validated_at + - stale + type: object + AiGatewayModelAutomaticPricingFieldMatch: + description: A request field name and the value that selects a mode. + properties: + name: + description: Field or header name. + example: speed + type: string + value: + description: Value that selects the mode. + example: fast + type: string + required: + - name + - value + type: object + AiGatewayModelAutomaticPricingMapping: + description: The reviewed endpoint mapping used to identify a custom provider. Omitted when the provider and model identity matched exactly. + properties: + id: + description: Mapping identifier. + example: mapping-a + type: string + revision: + description: Mapping revision. + example: mapping-revision + type: string + scope: + description: Mapping scope, such as `provider`. + example: provider + type: string + version: + description: Mapping version. + example: 1 + format: int64 + type: integer + required: + - id + - version + - scope + - revision + type: object + AiGatewayModelAutomaticPricingModeTrigger: + description: Request fields that select a priced mode. + properties: + body: + description: Request body fields that must match. + items: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingFieldMatch" + type: array + headers: + description: Request headers that must match. + items: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricingFieldMatch" + type: array + mode: + description: Priced mode selected by the fields. + example: fast + type: string + required: + - mode + type: object + AiGatewayModelAutomaticPricingRate: + description: One published price. Prices can differ by operation, mode, service tier, and input length. + properties: + amount: + description: Exact decimal amount per unit, zero or greater, represented as a string to preserve precision. Supports fixed decimal and exponent notation. + example: "2.5" + pattern: '^\d+(\.\d+)?([eE][+-]?\d+)?$' + type: string + component: + description: Token category priced, such as input, output, cache_read, or cache_write. + example: input + type: string + context_max_tokens: + description: Largest input length covered by this price. Omitted when there is no upper bound. + example: 272000 + format: int64 + minimum: 1 + type: integer + context_min_tokens: + description: Input length above which this price applies. Omitted for the base tier. + example: 0 + format: int64 + minimum: 0 + type: integer + currency: + description: Currency of the price. The only supported value is USD. + example: USD + type: string + mode: + description: Source mode name. Standard is the base mode; other values, such as fast, are source-defined and selected by `mode_triggers`. + example: standard + type: string + operation: + description: Operation the price applies to. Omitted when it applies to every operation. + type: string + service_tier: + description: Provider service tier explicitly associated with this mode by the source. Omitted when unknown. + example: priority + type: string + unit: + description: Unit of the quoted amount. The only supported value is million_tokens. + example: million_tokens + type: string + required: + - component + - currency + - unit + - amount + - mode + type: object + AiGatewayModelAutomaticPricingSource: + description: The pricing source entry the price was read from. + properties: + match_method: + description: How the gateway matched the model to the source entry, such as `wire_id`. + example: wire_id + type: string + model_id: + description: Model identifier in the source. + example: gpt-5.2-codex + type: string + name: + description: Pricing source name. + example: models.dev + type: string + provider_id: + description: Provider identifier in the source. + example: openai + type: string + revision: + description: Source revision the price was read from. + example: source-revision + type: string + required: + - name + - provider_id + - model_id + - revision + - match_method + type: object AiGatewayModelCapabilities: description: Model features reported by the enrichment source. Omitted properties are unknown. properties: @@ -9617,6 +9845,9 @@ components: description: Model identifier sent to the provider. example: gpt-5.2-codex-20260801 type: string + pricing: + $ref: "#/components/schemas/AiGatewayModelPricingAttributes" + description: Pricing status of the model. Returned by list operations; omitted elsewhere. provider_id: description: Provider identifier. example: 42 @@ -9636,6 +9867,9 @@ components: example: "2026-08-24T12:00:00Z" format: date-time type: string + zdr: + $ref: "#/components/schemas/AiGatewayModelZdr" + description: Zero data retention coverage of the model. Returned by list operations; omitted elsewhere. required: - provider_id - model_id_canonical @@ -10332,11 +10566,39 @@ components: AiGatewayModelPricingAttributes: description: Attributes of a model pricing resource. properties: + authoritative: + description: True when models.dev pricing is authoritative for this organization and provider. + example: true + type: boolean + automatic_pricing: + $ref: "#/components/schemas/AiGatewayModelAutomaticPricing" + blocks_budgeted_requests: + description: True when a `BLOCK` budget covering this model rejects its requests before they reach the provider. + example: false + type: boolean + cost_multiplier: + description: Effective provider multiplier applied to every reported rate. + example: 1.0 + format: double + type: number + duration_priced: + description: True when the provider bills this model per minute of audio rather than per token, as transcription models do. The gateway prices per token only, so these models cannot be charged for and a per-token override cannot express their rate. + example: false + type: boolean effective_source: $ref: "#/components/schemas/AiGatewayModelPricingEffectiveSource" pricing_config: $ref: "#/components/schemas/AiGatewayModelPricingConfig" description: Pricing configuration for the model. + status: + $ref: "#/components/schemas/AiGatewayModelPricingStatus" + unpriced_description: + description: Human-readable sentence for `unpriced_reason`. Omitted when the model is priced or the code has no description yet. + type: string + unpriced_reason: + description: Stable code explaining why the model has no price, such as `automatic_price_absent`. Omitted when the model is priced. + example: automatic_price_absent + type: string type: object AiGatewayModelPricingCatalogRequestConfig: additionalProperties: false @@ -10432,11 +10694,15 @@ components: enum: - catalog_auto - model_override + - models_dev + - unpriced - unknown type: string x-enum-varnames: - CATALOG_AUTO - MODEL_OVERRIDE + - MODELS_DEV + - UNPRICED - UNKNOWN AiGatewayModelPricingRates: additionalProperties: false @@ -10582,6 +10848,16 @@ components: x-enum-varnames: - CATALOG - CUSTOM + AiGatewayModelPricingStatus: + description: Whether the gateway has a price for the model. + enum: + - priced + - unpriced + example: priced + type: string + x-enum-varnames: + - PRICED + - UNPRICED AiGatewayModelPricingType: description: Model pricing resource type. enum: @@ -10741,6 +11017,42 @@ components: required: - data type: object + AiGatewayModelZdr: + description: Datadog's half of a model's zero data retention eligibility. The customer's half is the provider's `zdr_eligible`. + properties: + coverage: + $ref: "#/components/schemas/AiGatewayModelZdrCoverage" + covered_operations: + description: Operations covered by zero data retention. + example: + - OPENAI_RESPONSES + items: + type: string + type: array + uncovered_operations: + description: Operations not covered by zero data retention. + example: [] + items: + type: string + type: array + required: + - coverage + type: object + AiGatewayModelZdrCoverage: + description: |- + Datadog's coverage of the model's operations under zero data retention. A model is eligible when + coverage is `full` and its provider's `zdr_eligible` is true. `partial` means only the + `covered_operations` can be served: requests on other operations are not dispatched to it. + enum: + - full + - partial + - none + example: full + type: string + x-enum-varnames: + - FULL + - PARTIAL + - NONE AiGatewayModelsBulkCreateAttributes: description: Attributes used to create several model catalog entries. properties: @@ -11050,6 +11362,8 @@ components: example: "2026-08-24T12:00:00Z" format: date-time type: string + credential_source: + $ref: "#/components/schemas/AiGatewayProviderCredentialSource" integration_account_id: description: Provider integration account identifier. example: account-123 @@ -11066,11 +11380,17 @@ components: description: Immutable routing identifier. example: prod-us type: string + status: + $ref: "#/components/schemas/AiGatewayProviderStatus" updated_at: description: Time when the resource was last updated. example: "2026-08-24T12:00:00Z" format: date-time type: string + zdr_eligible: + description: Whether this provider connection is covered by a zero data retention agreement. + example: false + type: boolean required: - name - slug @@ -11092,6 +11412,8 @@ components: maximum: 1000000 minimum: 0 type: number + credential_source: + $ref: "#/components/schemas/AiGatewayProviderCreateCredentialSource" initial_bindings: description: Reserved for initial View/Edit permissions. Supplying this attribute, including an empty array or null, returns HTTP 503 before discovery or persistence. Omit it for normal creation. items: @@ -11125,10 +11447,31 @@ components: minLength: 1 pattern: "^[A-Za-z0-9_-]+$" type: string + zdr_eligible: + description: Whether this provider connection is covered by a zero data retention agreement. Defaults to false. For Bedrock, zero data retention is granted per region, so configure one provider per region and set this only on the covered ones. + example: false + type: boolean required: - name - slug type: object + AiGatewayProviderCreateCredentialSource: + default: integration_account + description: |- + Whose credential the gateway sends to the provider. Defaults to `integration_account`, which sends + the integration account's credential. `subscription` forwards each caller's own subscription sign-in + (`ChatGPT` for `openai`, `claude.ai` for `anthropic`) and needs no integration account; it is available + only to organizations with subscription providers enabled. A subscription provider's models are + optional: callers can use any model their subscription includes, and a model you add sets its + pricing. Immutable. + enum: + - integration_account + - subscription + example: integration_account + type: string + x-enum-varnames: + - INTEGRATION_ACCOUNT + - SUBSCRIPTION AiGatewayProviderCreateData: description: Data used to create an AI Gateway provider. properties: @@ -11148,6 +11491,19 @@ components: required: - data type: object + AiGatewayProviderCredentialSource: + description: |- + Whose credential the gateway sends to the provider. `integration_account` sends the integration + account's credential. `subscription` forwards each caller's own subscription sign-in (`ChatGPT` for + `openai`, `claude.ai` for `anthropic`) and needs no integration account. + enum: + - integration_account + - subscription + example: integration_account + type: string + x-enum-varnames: + - INTEGRATION_ACCOUNT + - SUBSCRIPTION AiGatewayProviderInitialBinding: description: Reserved initial provider access binding. Initial provider sharing is unavailable. properties: @@ -11241,6 +11597,9 @@ components: description: Model identifier sent to the provider. example: gpt-5.2-codex-20260801 type: string + pricing: + $ref: "#/components/schemas/AiGatewayModelPricingAttributes" + description: Pricing status of the model. Returned by list operations; omitted elsewhere. provider_id: description: Provider identifier. example: 42 @@ -11260,6 +11619,9 @@ components: example: "2026-08-24T12:00:00Z" format: date-time type: string + zdr: + $ref: "#/components/schemas/AiGatewayModelZdr" + description: Zero data retention coverage of the model. Returned by list operations; omitted elsewhere. required: - id - provider_id @@ -11323,6 +11685,60 @@ components: required: - data type: object + AiGatewayProviderStatus: + description: |- + Read-only. Whether the provider works, from the model sync and live calls. Omitted for providers + that are never checked: those without an integration account, and Azure OpenAI and Gemini until + live traffic records a status. + properties: + checked_at: + description: Time of the last observation. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + endpoint: + description: Models address called, for custom providers. + type: string + fix: + description: Display text saying how to fix the provider. Clients render it as-is. + type: string + http_status: + description: HTTP status the provider answered with. + example: 401 + format: int64 + type: integer + label: + description: Display text for the reason. Clients render it as-is. + type: string + last_ok_at: + description: Time of the last observation in which the provider worked. + example: "2026-08-24T12:00:00Z" + format: date-time + type: string + message: + description: The provider's own error message, with credentials removed. Never set for custom providers. + type: string + reason: + description: Why the provider is invalid, as a stable code such as `credentials_rejected`. Set only when `state` is `invalid`. + example: credentials_rejected + type: string + state: + $ref: "#/components/schemas/AiGatewayProviderStatusState" + required: + - state + type: object + AiGatewayProviderStatusState: + description: Whether the provider works. `checking` means no observation is recorded yet, not that a check is running. + enum: + - ok + - invalid + - checking + example: ok + type: string + x-enum-varnames: + - OK + - INVALID + - CHECKING AiGatewayProviderType: description: AI Gateway provider resource type. enum: @@ -11348,6 +11764,10 @@ components: maxLength: 256 minLength: 1 type: string + zdr_eligible: + description: Whether this provider connection is covered by a zero data retention agreement. Omit to leave unchanged. + example: false + type: boolean type: object AiGatewayProviderUpdateData: description: Data used to update an AI Gateway provider. @@ -12183,6 +12603,12 @@ components: AiGatewayRoutingRuleCreateAttributes: description: Attributes used to create an AI Gateway routing rule. properties: + initial_bindings: + description: Reserved for initial View/Edit permissions. Supplying this attribute returns HTTP 400 and creates no route. Create the route, then set its permissions through the restriction policy API. + items: + $ref: "#/components/schemas/AiGatewayProviderInitialBinding" + description: Reserved initial routing rule access binding. + type: array slug: description: Organization-unique resource slug. example: coding @@ -164087,6 +164513,12 @@ paths: enforcement: BLOCK monitor_id: 12345678 name: Coding agents + reporting_summary: + exceeded_capacity_count: 0 + instance_count: 1 + limit_mode: shared + over_warning_threshold_count: 0 + total_capacity_microcents: 100000000 tags: {} updated_at: "2026-08-24T12:00:00Z" warning_threshold: 0.9 diff --git a/examples/v2/ai-gateway/CreateAiGatewayProvider.py b/examples/v2/ai-gateway/CreateAiGatewayProvider.py index c4a927a996..060310769f 100644 --- a/examples/v2/ai-gateway/CreateAiGatewayProvider.py +++ b/examples/v2/ai-gateway/CreateAiGatewayProvider.py @@ -11,6 +11,9 @@ from datadog_api_client.v2.model.ai_gateway_known_provider import AiGatewayKnownProvider from datadog_api_client.v2.model.ai_gateway_model_input import AiGatewayModelInput from datadog_api_client.v2.model.ai_gateway_provider_create_attributes import AiGatewayProviderCreateAttributes +from datadog_api_client.v2.model.ai_gateway_provider_create_credential_source import ( + AiGatewayProviderCreateCredentialSource, +) from datadog_api_client.v2.model.ai_gateway_provider_create_data import AiGatewayProviderCreateData from datadog_api_client.v2.model.ai_gateway_provider_create_request import AiGatewayProviderCreateRequest from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding @@ -25,6 +28,7 @@ data=AiGatewayProviderCreateData( attributes=AiGatewayProviderCreateAttributes( cost_multiplier=1.0, + credential_source=AiGatewayProviderCreateCredentialSource.INTEGRATION_ACCOUNT, initial_bindings=[ AiGatewayProviderInitialBinding( principals=[ @@ -56,6 +60,7 @@ ], name="production-us", slug="prod-us", + zdr_eligible=False, ), type=AiGatewayProviderType.PROVIDERS, ), diff --git a/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.py b/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.py index d72d6d6102..ad40ce6b7c 100644 --- a/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.py +++ b/examples/v2/ai-gateway/CreateAiGatewayRoutingRule.py @@ -8,6 +8,10 @@ from datadog_api_client.v2.model.ai_gateway_nullable_routing_rule_tier_ordering import ( AiGatewayNullableRoutingRuleTierOrdering, ) +from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding +from datadog_api_client.v2.model.ai_gateway_provider_initial_binding_relation import ( + AiGatewayProviderInitialBindingRelation, +) from datadog_api_client.v2.model.ai_gateway_routing_classifier_request import AiGatewayRoutingClassifierRequest from datadog_api_client.v2.model.ai_gateway_routing_reasoning_level import AiGatewayRoutingReasoningLevel from datadog_api_client.v2.model.ai_gateway_routing_rule_create_attributes import AiGatewayRoutingRuleCreateAttributes @@ -21,6 +25,14 @@ body = AiGatewayRoutingRuleCreateRequest( data=AiGatewayRoutingRuleCreateData( attributes=AiGatewayRoutingRuleCreateAttributes( + initial_bindings=[ + AiGatewayProviderInitialBinding( + principals=[ + "org:11111111-1111-1111-1111-111111111111", + ], + relation=AiGatewayProviderInitialBindingRelation.VIEWER, + ), + ], slug="coding", tiers=[ AiGatewayRoutingRuleTierRequest( diff --git a/examples/v2/ai-gateway/UpdateAiGatewayProvider.py b/examples/v2/ai-gateway/UpdateAiGatewayProvider.py index 7b66d56c44..e977084e89 100644 --- a/examples/v2/ai-gateway/UpdateAiGatewayProvider.py +++ b/examples/v2/ai-gateway/UpdateAiGatewayProvider.py @@ -15,6 +15,7 @@ attributes=AiGatewayProviderUpdateAttributes( cost_multiplier=1.0, name="production-us-v2", + zdr_eligible=False, ), id="42", type=AiGatewayProviderType.PROVIDERS, diff --git a/src/datadog_api_client/v2/model/ai_gateway_budget_instances_summary_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_budget_instances_summary_attributes.py index 7fc6f4f3a1..11d10b62b6 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_budget_instances_summary_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_budget_instances_summary_attributes.py @@ -3,11 +3,14 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations +from typing import Union from datadog_api_client.model_utils import ( ModelNormal, cached_property, datetime, + unset, + UnsetType, UUID, ) @@ -21,6 +24,7 @@ def openapi_types(_): "instance_count": (int,), "over_warning_threshold_count": (int,), "restricted_details": (bool,), + "total_capacity_microcents": (int,), "total_spend_microcents": (int,), "window_start": (datetime,), } @@ -31,6 +35,7 @@ def openapi_types(_): "instance_count": "instance_count", "over_warning_threshold_count": "over_warning_threshold_count", "restricted_details": "restricted_details", + "total_capacity_microcents": "total_capacity_microcents", "total_spend_microcents": "total_spend_microcents", "window_start": "window_start", } @@ -44,6 +49,7 @@ def __init__( restricted_details: bool, total_spend_microcents: int, window_start: datetime, + total_capacity_microcents: Union[int, UnsetType] = unset, **kwargs, ): """ @@ -64,12 +70,17 @@ def __init__( :param restricted_details: Whether instances were withheld because their provider or model is hidden. Summary counts and totals exclude those instances. :type restricted_details: bool + :param total_capacity_microcents: Sum of every matching instance's capacity in the window, including per-instance overrides: the combined limit of the instances counted. + :type total_capacity_microcents: int, optional + :param total_spend_microcents: Spend summed across all instances, in microcents. :type total_spend_microcents: int :param window_start: Start of the accounting window. :type window_start: datetime """ + if total_capacity_microcents is not unset: + kwargs["total_capacity_microcents"] = total_capacity_microcents super().__init__(kwargs) self_.budget_id = budget_id diff --git a/src/datadog_api_client/v2/model/ai_gateway_budget_limit_mode.py b/src/datadog_api_client/v2/model/ai_gateway_budget_limit_mode.py new file mode 100644 index 0000000000..84b5931f30 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_budget_limit_mode.py @@ -0,0 +1,38 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayBudgetLimitMode(ModelSimple): + """ + How the budget limit applies. `shared` is one limit for all matching traffic. `per_instance` is one limit for each counter of a template budget that splits by value. + + :param value: Must be one of ["shared", "per_instance"]. + :type value: str + """ + + allowed_values = { + "shared", + "per_instance", + } + SHARED: ClassVar["AiGatewayBudgetLimitMode"] + PER_INSTANCE: ClassVar["AiGatewayBudgetLimitMode"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayBudgetLimitMode.SHARED = AiGatewayBudgetLimitMode("shared") +AiGatewayBudgetLimitMode.PER_INSTANCE = AiGatewayBudgetLimitMode("per_instance") diff --git a/src/datadog_api_client/v2/model/ai_gateway_budget_list_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_budget_list_attributes.py index 22d1026cb9..7725327cd4 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_budget_list_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_budget_list_attributes.py @@ -18,6 +18,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.ai_gateway_budget_enforcement import AiGatewayBudgetEnforcement + from datadog_api_client.v2.model.ai_gateway_budget_reporting_summary import AiGatewayBudgetReportingSummary from datadog_api_client.v2.model.ai_gateway_budget_selector_entry import AiGatewayBudgetSelectorEntry from datadog_api_client.v2.model.ai_gateway_budget_tags import AiGatewayBudgetTags from datadog_api_client.v2.model.ai_gateway_budget_window_policy import AiGatewayBudgetWindowPolicy @@ -27,6 +28,7 @@ class AiGatewayBudgetListAttributes(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.ai_gateway_budget_enforcement import AiGatewayBudgetEnforcement + from datadog_api_client.v2.model.ai_gateway_budget_reporting_summary import AiGatewayBudgetReportingSummary from datadog_api_client.v2.model.ai_gateway_budget_selector_entry import AiGatewayBudgetSelectorEntry from datadog_api_client.v2.model.ai_gateway_budget_tags import AiGatewayBudgetTags from datadog_api_client.v2.model.ai_gateway_budget_window_policy import AiGatewayBudgetWindowPolicy @@ -41,6 +43,7 @@ def openapi_types(_): "enforcement": (AiGatewayBudgetEnforcement,), "monitor_id": (int, none_type), "name": (str,), + "reporting_summary": (AiGatewayBudgetReportingSummary,), "scope_restricted": (bool,), "selector": ([AiGatewayBudgetSelectorEntry],), "tags": (AiGatewayBudgetTags,), @@ -63,6 +66,7 @@ def openapi_types(_): "enforcement": "enforcement", "monitor_id": "monitor_id", "name": "name", + "reporting_summary": "reporting_summary", "scope_restricted": "scope_restricted", "selector": "selector", "tags": "tags", @@ -93,6 +97,7 @@ def __init__( window_end: datetime, window_policy: AiGatewayBudgetWindowPolicy, window_start: datetime, + reporting_summary: Union[AiGatewayBudgetReportingSummary, UnsetType] = unset, selector: Union[List[AiGatewayBudgetSelectorEntry], none_type, UnsetType] = unset, team_id: Union[UUID, UnsetType] = unset, user_id: Union[UUID, UnsetType] = unset, @@ -128,6 +133,9 @@ def __init__( :param name: Human-readable resource name. :type name: str + :param reporting_summary: Health across all counters in the active accounting window. Includes hidden counters; contains no scope values or identities. + :type reporting_summary: AiGatewayBudgetReportingSummary, optional + :param scope_restricted: Whether provider or model scope metadata was withheld. Omit unchanged scope fields on an unrelated update to preserve their saved values. :type scope_restricted: bool @@ -158,6 +166,8 @@ def __init__( :param window_start: Start of the active accounting window. :type window_start: datetime """ + if reporting_summary is not unset: + kwargs["reporting_summary"] = reporting_summary if selector is not unset: kwargs["selector"] = selector if team_id is not unset: diff --git a/src/datadog_api_client/v2/model/ai_gateway_budget_reporting_summary.py b/src/datadog_api_client/v2/model/ai_gateway_budget_reporting_summary.py new file mode 100644 index 0000000000..85cf0de9fd --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_budget_reporting_summary.py @@ -0,0 +1,72 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_budget_limit_mode import AiGatewayBudgetLimitMode + + +class AiGatewayBudgetReportingSummary(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_budget_limit_mode import AiGatewayBudgetLimitMode + + return { + "exceeded_capacity_count": (int,), + "instance_count": (int,), + "limit_mode": (AiGatewayBudgetLimitMode,), + "over_warning_threshold_count": (int,), + "total_capacity_microcents": (int,), + } + + attribute_map = { + "exceeded_capacity_count": "exceeded_capacity_count", + "instance_count": "instance_count", + "limit_mode": "limit_mode", + "over_warning_threshold_count": "over_warning_threshold_count", + "total_capacity_microcents": "total_capacity_microcents", + } + + def __init__( + self_, + exceeded_capacity_count: int, + instance_count: int, + limit_mode: AiGatewayBudgetLimitMode, + over_warning_threshold_count: int, + total_capacity_microcents: int, + **kwargs, + ): + """ + Health across all counters in the active accounting window. Includes hidden counters; contains no scope values or identities. + + :param exceeded_capacity_count: Number of counters at or above capacity. + :type exceeded_capacity_count: int + + :param instance_count: Number of counters in the active window. Counters are created on first use. + :type instance_count: int + + :param limit_mode: How the budget limit applies. ``shared`` is one limit for all matching traffic. ``per_instance`` is one limit for each counter of a template budget that splits by value. + :type limit_mode: AiGatewayBudgetLimitMode + + :param over_warning_threshold_count: Number of counters at or above the warning threshold. + :type over_warning_threshold_count: int + + :param total_capacity_microcents: Combined capacity of the counters in the active window, in microcents. A shared budget reports its configured limit before its first counter exists. + :type total_capacity_microcents: int + """ + super().__init__(kwargs) + + self_.exceeded_capacity_count = exceeded_capacity_count + self_.instance_count = instance_count + self_.limit_mode = limit_mode + self_.over_warning_threshold_count = over_warning_threshold_count + self_.total_capacity_microcents = total_capacity_microcents diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing.py new file mode 100644 index 0000000000..638ca2db05 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing.py @@ -0,0 +1,111 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mapping import ( + AiGatewayModelAutomaticPricingMapping, + ) + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mode_trigger import ( + AiGatewayModelAutomaticPricingModeTrigger, + ) + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_rate import AiGatewayModelAutomaticPricingRate + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_source import ( + AiGatewayModelAutomaticPricingSource, + ) + + +class AiGatewayModelAutomaticPricing(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mapping import ( + AiGatewayModelAutomaticPricingMapping, + ) + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mode_trigger import ( + AiGatewayModelAutomaticPricingModeTrigger, + ) + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_rate import ( + AiGatewayModelAutomaticPricingRate, + ) + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_source import ( + AiGatewayModelAutomaticPricingSource, + ) + + return { + "last_validated_at": (datetime,), + "mapping": (AiGatewayModelAutomaticPricingMapping,), + "mode_triggers": ([AiGatewayModelAutomaticPricingModeTrigger],), + "observed_at": (datetime,), + "rates": ([AiGatewayModelAutomaticPricingRate],), + "source": (AiGatewayModelAutomaticPricingSource,), + "stale": (bool,), + } + + attribute_map = { + "last_validated_at": "last_validated_at", + "mapping": "mapping", + "mode_triggers": "mode_triggers", + "observed_at": "observed_at", + "rates": "rates", + "source": "source", + "stale": "stale", + } + + def __init__( + self_, + last_validated_at: datetime, + observed_at: datetime, + rates: List[AiGatewayModelAutomaticPricingRate], + source: AiGatewayModelAutomaticPricingSource, + stale: bool, + mapping: Union[AiGatewayModelAutomaticPricingMapping, UnsetType] = unset, + mode_triggers: Union[List[AiGatewayModelAutomaticPricingModeTrigger], UnsetType] = unset, + **kwargs, + ): + """ + The published models.dev price. Present only when it is the effective price. + + :param last_validated_at: Time the price was last revalidated against the source. + :type last_validated_at: datetime + + :param mapping: The reviewed endpoint mapping used to identify a custom provider. Omitted when the provider and model identity matched exactly. + :type mapping: AiGatewayModelAutomaticPricingMapping, optional + + :param mode_triggers: Request fields that select each priced mode, such as ``speed: fast`` for ``anthropic`` models. Omitted when the model has a single mode. + :type mode_triggers: [AiGatewayModelAutomaticPricingModeTrigger], optional + + :param observed_at: Time the price was observed in the source. + :type observed_at: datetime + + :param rates: Published rates. + :type rates: [AiGatewayModelAutomaticPricingRate] + + :param source: The pricing source entry the price was read from. + :type source: AiGatewayModelAutomaticPricingSource + + :param stale: True when the price has not been revalidated recently and is being retained as last-known-good. + :type stale: bool + """ + if mapping is not unset: + kwargs["mapping"] = mapping + if mode_triggers is not unset: + kwargs["mode_triggers"] = mode_triggers + super().__init__(kwargs) + + self_.last_validated_at = last_validated_at + self_.observed_at = observed_at + self_.rates = rates + self_.source = source + self_.stale = stale diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_field_match.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_field_match.py new file mode 100644 index 0000000000..a12edd9398 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_field_match.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AiGatewayModelAutomaticPricingFieldMatch(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "value": (str,), + } + + attribute_map = { + "name": "name", + "value": "value", + } + + def __init__(self_, name: str, value: str, **kwargs): + """ + A request field name and the value that selects a mode. + + :param name: Field or header name. + :type name: str + + :param value: Value that selects the mode. + :type value: str + """ + super().__init__(kwargs) + + self_.name = name + self_.value = value diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mapping.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mapping.py new file mode 100644 index 0000000000..faa598ff8e --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mapping.py @@ -0,0 +1,51 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AiGatewayModelAutomaticPricingMapping(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "revision": (str,), + "scope": (str,), + "version": (int,), + } + + attribute_map = { + "id": "id", + "revision": "revision", + "scope": "scope", + "version": "version", + } + + def __init__(self_, id: str, revision: str, scope: str, version: int, **kwargs): + """ + The reviewed endpoint mapping used to identify a custom provider. Omitted when the provider and model identity matched exactly. + + :param id: Mapping identifier. + :type id: str + + :param revision: Mapping revision. + :type revision: str + + :param scope: Mapping scope, such as ``provider``. + :type scope: str + + :param version: Mapping version. + :type version: int + """ + super().__init__(kwargs) + + self_.id = id + self_.revision = revision + self_.scope = scope + self_.version = version diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mode_trigger.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mode_trigger.py new file mode 100644 index 0000000000..f6187cb164 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_mode_trigger.py @@ -0,0 +1,66 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_field_match import ( + AiGatewayModelAutomaticPricingFieldMatch, + ) + + +class AiGatewayModelAutomaticPricingModeTrigger(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_field_match import ( + AiGatewayModelAutomaticPricingFieldMatch, + ) + + return { + "body": ([AiGatewayModelAutomaticPricingFieldMatch],), + "headers": ([AiGatewayModelAutomaticPricingFieldMatch],), + "mode": (str,), + } + + attribute_map = { + "body": "body", + "headers": "headers", + "mode": "mode", + } + + def __init__( + self_, + mode: str, + body: Union[List[AiGatewayModelAutomaticPricingFieldMatch], UnsetType] = unset, + headers: Union[List[AiGatewayModelAutomaticPricingFieldMatch], UnsetType] = unset, + **kwargs, + ): + """ + Request fields that select a priced mode. + + :param body: Request body fields that must match. + :type body: [AiGatewayModelAutomaticPricingFieldMatch], optional + + :param headers: Request headers that must match. + :type headers: [AiGatewayModelAutomaticPricingFieldMatch], optional + + :param mode: Priced mode selected by the fields. + :type mode: str + """ + if body is not unset: + kwargs["body"] = body + if headers is not unset: + kwargs["headers"] = headers + super().__init__(kwargs) + + self_.mode = mode diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_rate.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_rate.py new file mode 100644 index 0000000000..0de847a7ad --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_rate.py @@ -0,0 +1,110 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AiGatewayModelAutomaticPricingRate(ModelNormal): + validations = { + "amount": {}, + "context_max_tokens": { + "inclusive_minimum": 1, + }, + "context_min_tokens": { + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "amount": (str,), + "component": (str,), + "context_max_tokens": (int,), + "context_min_tokens": (int,), + "currency": (str,), + "mode": (str,), + "operation": (str,), + "service_tier": (str,), + "unit": (str,), + } + + attribute_map = { + "amount": "amount", + "component": "component", + "context_max_tokens": "context_max_tokens", + "context_min_tokens": "context_min_tokens", + "currency": "currency", + "mode": "mode", + "operation": "operation", + "service_tier": "service_tier", + "unit": "unit", + } + + def __init__( + self_, + amount: str, + component: str, + currency: str, + mode: str, + unit: str, + context_max_tokens: Union[int, UnsetType] = unset, + context_min_tokens: Union[int, UnsetType] = unset, + operation: Union[str, UnsetType] = unset, + service_tier: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + One published price. Prices can differ by operation, mode, service tier, and input length. + + :param amount: Exact decimal amount per unit, zero or greater, represented as a string to preserve precision. Supports fixed decimal and exponent notation. + :type amount: str + + :param component: Token category priced, such as input, output, cache_read, or cache_write. + :type component: str + + :param context_max_tokens: Largest input length covered by this price. Omitted when there is no upper bound. + :type context_max_tokens: int, optional + + :param context_min_tokens: Input length above which this price applies. Omitted for the base tier. + :type context_min_tokens: int, optional + + :param currency: Currency of the price. The only supported value is USD. + :type currency: str + + :param mode: Source mode name. Standard is the base mode; other values, such as fast, are source-defined and selected by ``mode_triggers``. + :type mode: str + + :param operation: Operation the price applies to. Omitted when it applies to every operation. + :type operation: str, optional + + :param service_tier: Provider service tier explicitly associated with this mode by the source. Omitted when unknown. + :type service_tier: str, optional + + :param unit: Unit of the quoted amount. The only supported value is million_tokens. + :type unit: str + """ + if context_max_tokens is not unset: + kwargs["context_max_tokens"] = context_max_tokens + if context_min_tokens is not unset: + kwargs["context_min_tokens"] = context_min_tokens + if operation is not unset: + kwargs["operation"] = operation + if service_tier is not unset: + kwargs["service_tier"] = service_tier + super().__init__(kwargs) + + self_.amount = amount + self_.component = component + self_.currency = currency + self_.mode = mode + self_.unit = unit diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_source.py b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_source.py new file mode 100644 index 0000000000..ec6005ddec --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_automatic_pricing_source.py @@ -0,0 +1,57 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AiGatewayModelAutomaticPricingSource(ModelNormal): + @cached_property + def openapi_types(_): + return { + "match_method": (str,), + "model_id": (str,), + "name": (str,), + "provider_id": (str,), + "revision": (str,), + } + + attribute_map = { + "match_method": "match_method", + "model_id": "model_id", + "name": "name", + "provider_id": "provider_id", + "revision": "revision", + } + + def __init__(self_, match_method: str, model_id: str, name: str, provider_id: str, revision: str, **kwargs): + """ + The pricing source entry the price was read from. + + :param match_method: How the gateway matched the model to the source entry, such as ``wire_id``. + :type match_method: str + + :param model_id: Model identifier in the source. + :type model_id: str + + :param name: Pricing source name. + :type name: str + + :param provider_id: Provider identifier in the source. + :type provider_id: str + + :param revision: Source revision the price was read from. + :type revision: str + """ + super().__init__(kwargs) + + self_.match_method = match_method + self_.model_id = model_id + self_.name = name + self_.provider_id = provider_id + self_.revision = revision diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_catalog_entry_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_model_catalog_entry_attributes.py index ae75b10ab3..c0061bd0f7 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_model_catalog_entry_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_model_catalog_entry_attributes.py @@ -16,16 +16,20 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.ai_gateway_model_metadata import AiGatewayModelMetadata + from datadog_api_client.v2.model.ai_gateway_model_pricing_attributes import AiGatewayModelPricingAttributes from datadog_api_client.v2.model.ai_gateway_model_source import AiGatewayModelSource from datadog_api_client.v2.model.ai_gateway_supported_operation import AiGatewaySupportedOperation + from datadog_api_client.v2.model.ai_gateway_model_zdr import AiGatewayModelZdr class AiGatewayModelCatalogEntryAttributes(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.ai_gateway_model_metadata import AiGatewayModelMetadata + from datadog_api_client.v2.model.ai_gateway_model_pricing_attributes import AiGatewayModelPricingAttributes from datadog_api_client.v2.model.ai_gateway_model_source import AiGatewayModelSource from datadog_api_client.v2.model.ai_gateway_supported_operation import AiGatewaySupportedOperation + from datadog_api_client.v2.model.ai_gateway_model_zdr import AiGatewayModelZdr return { "created_at": (datetime,), @@ -33,10 +37,12 @@ def openapi_types(_): "metadata": (AiGatewayModelMetadata,), "model_id_canonical": (str,), "model_id_wire": (str,), + "pricing": (AiGatewayModelPricingAttributes,), "provider_id": (int,), "source": (AiGatewayModelSource,), "supported_operations": ([AiGatewaySupportedOperation],), "updated_at": (datetime,), + "zdr": (AiGatewayModelZdr,), } attribute_map = { @@ -45,10 +51,12 @@ def openapi_types(_): "metadata": "metadata", "model_id_canonical": "model_id_canonical", "model_id_wire": "model_id_wire", + "pricing": "pricing", "provider_id": "provider_id", "source": "source", "supported_operations": "supported_operations", "updated_at": "updated_at", + "zdr": "zdr", } def __init__( @@ -62,6 +70,8 @@ def __init__( supported_operations: List[AiGatewaySupportedOperation], updated_at: datetime, metadata: Union[AiGatewayModelMetadata, UnsetType] = unset, + pricing: Union[AiGatewayModelPricingAttributes, UnsetType] = unset, + zdr: Union[AiGatewayModelZdr, UnsetType] = unset, **kwargs, ): """ @@ -82,6 +92,9 @@ def __init__( :param model_id_wire: Model identifier sent to the provider. :type model_id_wire: str + :param pricing: Attributes of a model pricing resource. + :type pricing: AiGatewayModelPricingAttributes, optional + :param provider_id: Provider identifier. :type provider_id: int @@ -93,9 +106,16 @@ def __init__( :param updated_at: Time when the resource was last updated. :type updated_at: datetime + + :param zdr: Datadog's half of a model's zero data retention eligibility. The customer's half is the provider's ``zdr_eligible``. + :type zdr: AiGatewayModelZdr, optional """ if metadata is not unset: kwargs["metadata"] = metadata + if pricing is not unset: + kwargs["pricing"] = pricing + if zdr is not unset: + kwargs["zdr"] = zdr super().__init__(kwargs) self_.created_at = created_at diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_pricing_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_attributes.py index 04dda2081c..244c5eff1a 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_model_pricing_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_attributes.py @@ -14,47 +14,115 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing import AiGatewayModelAutomaticPricing from datadog_api_client.v2.model.ai_gateway_model_pricing_effective_source import ( AiGatewayModelPricingEffectiveSource, ) from datadog_api_client.v2.model.ai_gateway_model_pricing_config import AiGatewayModelPricingConfig + from datadog_api_client.v2.model.ai_gateway_model_pricing_status import AiGatewayModelPricingStatus class AiGatewayModelPricingAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing import AiGatewayModelAutomaticPricing from datadog_api_client.v2.model.ai_gateway_model_pricing_effective_source import ( AiGatewayModelPricingEffectiveSource, ) from datadog_api_client.v2.model.ai_gateway_model_pricing_config import AiGatewayModelPricingConfig + from datadog_api_client.v2.model.ai_gateway_model_pricing_status import AiGatewayModelPricingStatus return { + "authoritative": (bool,), + "automatic_pricing": (AiGatewayModelAutomaticPricing,), + "blocks_budgeted_requests": (bool,), + "cost_multiplier": (float,), + "duration_priced": (bool,), "effective_source": (AiGatewayModelPricingEffectiveSource,), "pricing_config": (AiGatewayModelPricingConfig,), + "status": (AiGatewayModelPricingStatus,), + "unpriced_description": (str,), + "unpriced_reason": (str,), } attribute_map = { + "authoritative": "authoritative", + "automatic_pricing": "automatic_pricing", + "blocks_budgeted_requests": "blocks_budgeted_requests", + "cost_multiplier": "cost_multiplier", + "duration_priced": "duration_priced", "effective_source": "effective_source", "pricing_config": "pricing_config", + "status": "status", + "unpriced_description": "unpriced_description", + "unpriced_reason": "unpriced_reason", } def __init__( self_, + authoritative: Union[bool, UnsetType] = unset, + automatic_pricing: Union[AiGatewayModelAutomaticPricing, UnsetType] = unset, + blocks_budgeted_requests: Union[bool, UnsetType] = unset, + cost_multiplier: Union[float, UnsetType] = unset, + duration_priced: Union[bool, UnsetType] = unset, effective_source: Union[AiGatewayModelPricingEffectiveSource, UnsetType] = unset, pricing_config: Union[AiGatewayModelPricingConfig, UnsetType] = unset, + status: Union[AiGatewayModelPricingStatus, UnsetType] = unset, + unpriced_description: Union[str, UnsetType] = unset, + unpriced_reason: Union[str, UnsetType] = unset, **kwargs, ): """ Attributes of a model pricing resource. + :param authoritative: True when models.dev pricing is authoritative for this organization and provider. + :type authoritative: bool, optional + + :param automatic_pricing: The published models.dev price. Present only when it is the effective price. + :type automatic_pricing: AiGatewayModelAutomaticPricing, optional + + :param blocks_budgeted_requests: True when a ``BLOCK`` budget covering this model rejects its requests before they reach the provider. + :type blocks_budgeted_requests: bool, optional + + :param cost_multiplier: Effective provider multiplier applied to every reported rate. + :type cost_multiplier: float, optional + + :param duration_priced: True when the provider bills this model per minute of audio rather than per token, as transcription models do. The gateway prices per token only, so these models cannot be charged for and a per-token override cannot express their rate. + :type duration_priced: bool, optional + :param effective_source: Effective source of the model pricing data. :type effective_source: AiGatewayModelPricingEffectiveSource, optional :param pricing_config: Pricing configuration for a model. :type pricing_config: AiGatewayModelPricingConfig, optional + + :param status: Whether the gateway has a price for the model. + :type status: AiGatewayModelPricingStatus, optional + + :param unpriced_description: Human-readable sentence for ``unpriced_reason``. Omitted when the model is priced or the code has no description yet. + :type unpriced_description: str, optional + + :param unpriced_reason: Stable code explaining why the model has no price, such as ``automatic_price_absent``. Omitted when the model is priced. + :type unpriced_reason: str, optional """ + if authoritative is not unset: + kwargs["authoritative"] = authoritative + if automatic_pricing is not unset: + kwargs["automatic_pricing"] = automatic_pricing + if blocks_budgeted_requests is not unset: + kwargs["blocks_budgeted_requests"] = blocks_budgeted_requests + if cost_multiplier is not unset: + kwargs["cost_multiplier"] = cost_multiplier + if duration_priced is not unset: + kwargs["duration_priced"] = duration_priced if effective_source is not unset: kwargs["effective_source"] = effective_source if pricing_config is not unset: kwargs["pricing_config"] = pricing_config + if status is not unset: + kwargs["status"] = status + if unpriced_description is not unset: + kwargs["unpriced_description"] = unpriced_description + if unpriced_reason is not unset: + kwargs["unpriced_reason"] = unpriced_reason super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_pricing_effective_source.py b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_effective_source.py index 08cd7ba906..b3c3ae23d6 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_model_pricing_effective_source.py +++ b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_effective_source.py @@ -16,17 +16,21 @@ class AiGatewayModelPricingEffectiveSource(ModelSimple): """ Effective source of the model pricing data. - :param value: Must be one of ["catalog_auto", "model_override", "unknown"]. + :param value: Must be one of ["catalog_auto", "model_override", "models_dev", "unpriced", "unknown"]. :type value: str """ allowed_values = { "catalog_auto", "model_override", + "models_dev", + "unpriced", "unknown", } CATALOG_AUTO: ClassVar["AiGatewayModelPricingEffectiveSource"] MODEL_OVERRIDE: ClassVar["AiGatewayModelPricingEffectiveSource"] + MODELS_DEV: ClassVar["AiGatewayModelPricingEffectiveSource"] + UNPRICED: ClassVar["AiGatewayModelPricingEffectiveSource"] UNKNOWN: ClassVar["AiGatewayModelPricingEffectiveSource"] @cached_property @@ -38,4 +42,6 @@ def openapi_types(_): AiGatewayModelPricingEffectiveSource.CATALOG_AUTO = AiGatewayModelPricingEffectiveSource("catalog_auto") AiGatewayModelPricingEffectiveSource.MODEL_OVERRIDE = AiGatewayModelPricingEffectiveSource("model_override") +AiGatewayModelPricingEffectiveSource.MODELS_DEV = AiGatewayModelPricingEffectiveSource("models_dev") +AiGatewayModelPricingEffectiveSource.UNPRICED = AiGatewayModelPricingEffectiveSource("unpriced") AiGatewayModelPricingEffectiveSource.UNKNOWN = AiGatewayModelPricingEffectiveSource("unknown") diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_pricing_status.py b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_status.py new file mode 100644 index 0000000000..1add7754b9 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_pricing_status.py @@ -0,0 +1,38 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayModelPricingStatus(ModelSimple): + """ + Whether the gateway has a price for the model. + + :param value: Must be one of ["priced", "unpriced"]. + :type value: str + """ + + allowed_values = { + "priced", + "unpriced", + } + PRICED: ClassVar["AiGatewayModelPricingStatus"] + UNPRICED: ClassVar["AiGatewayModelPricingStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayModelPricingStatus.PRICED = AiGatewayModelPricingStatus("priced") +AiGatewayModelPricingStatus.UNPRICED = AiGatewayModelPricingStatus("unpriced") diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_zdr.py b/src/datadog_api_client/v2/model/ai_gateway_model_zdr.py new file mode 100644 index 0000000000..2b4d11b351 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_zdr.py @@ -0,0 +1,64 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_model_zdr_coverage import AiGatewayModelZdrCoverage + + +class AiGatewayModelZdr(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_model_zdr_coverage import AiGatewayModelZdrCoverage + + return { + "coverage": (AiGatewayModelZdrCoverage,), + "covered_operations": ([str],), + "uncovered_operations": ([str],), + } + + attribute_map = { + "coverage": "coverage", + "covered_operations": "covered_operations", + "uncovered_operations": "uncovered_operations", + } + + def __init__( + self_, + coverage: AiGatewayModelZdrCoverage, + covered_operations: Union[List[str], UnsetType] = unset, + uncovered_operations: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Datadog's half of a model's zero data retention eligibility. The customer's half is the provider's ``zdr_eligible``. + + :param coverage: Datadog's coverage of the model's operations under zero data retention. A model is eligible when + coverage is ``full`` and its provider's ``zdr_eligible`` is true. ``partial`` means only the + ``covered_operations`` can be served: requests on other operations are not dispatched to it. + :type coverage: AiGatewayModelZdrCoverage + + :param covered_operations: Operations covered by zero data retention. + :type covered_operations: [str], optional + + :param uncovered_operations: Operations not covered by zero data retention. + :type uncovered_operations: [str], optional + """ + if covered_operations is not unset: + kwargs["covered_operations"] = covered_operations + if uncovered_operations is not unset: + kwargs["uncovered_operations"] = uncovered_operations + super().__init__(kwargs) + + self_.coverage = coverage diff --git a/src/datadog_api_client/v2/model/ai_gateway_model_zdr_coverage.py b/src/datadog_api_client/v2/model/ai_gateway_model_zdr_coverage.py new file mode 100644 index 0000000000..5b6dfe1858 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_model_zdr_coverage.py @@ -0,0 +1,43 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayModelZdrCoverage(ModelSimple): + """ + Datadog's coverage of the model's operations under zero data retention. A model is eligible when + coverage is `full` and its provider's `zdr_eligible` is true. `partial` means only the + `covered_operations` can be served: requests on other operations are not dispatched to it. + + :param value: Must be one of ["full", "partial", "none"]. + :type value: str + """ + + allowed_values = { + "full", + "partial", + "none", + } + FULL: ClassVar["AiGatewayModelZdrCoverage"] + PARTIAL: ClassVar["AiGatewayModelZdrCoverage"] + NONE: ClassVar["AiGatewayModelZdrCoverage"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayModelZdrCoverage.FULL = AiGatewayModelZdrCoverage("full") +AiGatewayModelZdrCoverage.PARTIAL = AiGatewayModelZdrCoverage("partial") +AiGatewayModelZdrCoverage.NONE = AiGatewayModelZdrCoverage("none") diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_provider_attributes.py index ade3dd4834..1a8bf43f7d 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_provider_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_attributes.py @@ -15,38 +15,48 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_provider_credential_source import AiGatewayProviderCredentialSource from datadog_api_client.v2.model.ai_gateway_provider_integration_config import AiGatewayProviderIntegrationConfig from datadog_api_client.v2.model.ai_gateway_known_provider import AiGatewayKnownProvider + from datadog_api_client.v2.model.ai_gateway_provider_status import AiGatewayProviderStatus class AiGatewayProviderAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_provider_credential_source import AiGatewayProviderCredentialSource from datadog_api_client.v2.model.ai_gateway_provider_integration_config import ( AiGatewayProviderIntegrationConfig, ) from datadog_api_client.v2.model.ai_gateway_known_provider import AiGatewayKnownProvider + from datadog_api_client.v2.model.ai_gateway_provider_status import AiGatewayProviderStatus return { "cost_multiplier": (float,), "created_at": (datetime,), + "credential_source": (AiGatewayProviderCredentialSource,), "integration_account_id": (str,), "integration_config": (AiGatewayProviderIntegrationConfig,), "known_provider": (AiGatewayKnownProvider,), "name": (str,), "slug": (str,), + "status": (AiGatewayProviderStatus,), "updated_at": (datetime,), + "zdr_eligible": (bool,), } attribute_map = { "cost_multiplier": "cost_multiplier", "created_at": "created_at", + "credential_source": "credential_source", "integration_account_id": "integration_account_id", "integration_config": "integration_config", "known_provider": "known_provider", "name": "name", "slug": "slug", + "status": "status", "updated_at": "updated_at", + "zdr_eligible": "zdr_eligible", } def __init__( @@ -58,7 +68,10 @@ def __init__( name: str, slug: str, updated_at: datetime, + credential_source: Union[AiGatewayProviderCredentialSource, UnsetType] = unset, integration_config: Union[AiGatewayProviderIntegrationConfig, UnsetType] = unset, + status: Union[AiGatewayProviderStatus, UnsetType] = unset, + zdr_eligible: Union[bool, UnsetType] = unset, **kwargs, ): """ @@ -70,6 +83,11 @@ def __init__( :param created_at: Time when the resource was created. :type created_at: datetime + :param credential_source: Whose credential the gateway sends to the provider. ``integration_account`` sends the integration + account's credential. ``subscription`` forwards each caller's own subscription sign-in ( ``ChatGPT`` for + ``openai`` , ``claude.ai`` for ``anthropic`` ) and needs no integration account. + :type credential_source: AiGatewayProviderCredentialSource, optional + :param integration_account_id: Provider integration account identifier. :type integration_account_id: str @@ -85,11 +103,25 @@ def __init__( :param slug: Immutable routing identifier. :type slug: str + :param status: Read-only. Whether the provider works, from the model sync and live calls. Omitted for providers + that are never checked: those without an integration account, and Azure OpenAI and Gemini until + live traffic records a status. + :type status: AiGatewayProviderStatus, optional + :param updated_at: Time when the resource was last updated. :type updated_at: datetime + + :param zdr_eligible: Whether this provider connection is covered by a zero data retention agreement. + :type zdr_eligible: bool, optional """ + if credential_source is not unset: + kwargs["credential_source"] = credential_source if integration_config is not unset: kwargs["integration_config"] = integration_config + if status is not unset: + kwargs["status"] = status + if zdr_eligible is not unset: + kwargs["zdr_eligible"] = zdr_eligible super().__init__(kwargs) self_.cost_multiplier = cost_multiplier diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_create_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_provider_create_attributes.py index 92e732c501..d5e8e36bb7 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_provider_create_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_create_attributes.py @@ -14,6 +14,9 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_provider_create_credential_source import ( + AiGatewayProviderCreateCredentialSource, + ) from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding from datadog_api_client.v2.model.ai_gateway_provider_integration_config import AiGatewayProviderIntegrationConfig from datadog_api_client.v2.model.ai_gateway_known_provider import AiGatewayKnownProvider @@ -41,6 +44,9 @@ class AiGatewayProviderCreateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_provider_create_credential_source import ( + AiGatewayProviderCreateCredentialSource, + ) from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding from datadog_api_client.v2.model.ai_gateway_provider_integration_config import ( AiGatewayProviderIntegrationConfig, @@ -50,6 +56,7 @@ def openapi_types(_): return { "cost_multiplier": (float,), + "credential_source": (AiGatewayProviderCreateCredentialSource,), "initial_bindings": ([AiGatewayProviderInitialBinding],), "integration_account_id": (str,), "integration_config": (AiGatewayProviderIntegrationConfig,), @@ -57,10 +64,12 @@ def openapi_types(_): "models": ([AiGatewayModelInput],), "name": (str,), "slug": (str,), + "zdr_eligible": (bool,), } attribute_map = { "cost_multiplier": "cost_multiplier", + "credential_source": "credential_source", "initial_bindings": "initial_bindings", "integration_account_id": "integration_account_id", "integration_config": "integration_config", @@ -68,6 +77,7 @@ def openapi_types(_): "models": "models", "name": "name", "slug": "slug", + "zdr_eligible": "zdr_eligible", } def __init__( @@ -75,11 +85,13 @@ def __init__( name: str, slug: str, cost_multiplier: Union[float, UnsetType] = unset, + credential_source: Union[AiGatewayProviderCreateCredentialSource, UnsetType] = unset, initial_bindings: Union[List[AiGatewayProviderInitialBinding], UnsetType] = unset, integration_account_id: Union[str, UnsetType] = unset, integration_config: Union[AiGatewayProviderIntegrationConfig, UnsetType] = unset, known_provider: Union[AiGatewayKnownProvider, UnsetType] = unset, models: Union[List[AiGatewayModelInput], UnsetType] = unset, + zdr_eligible: Union[bool, UnsetType] = unset, **kwargs, ): """ @@ -88,6 +100,14 @@ def __init__( :param cost_multiplier: Multiplier applied to provider costs. Must be greater than 0 and at most 1000000. :type cost_multiplier: float, optional + :param credential_source: Whose credential the gateway sends to the provider. Defaults to ``integration_account`` , which sends + the integration account's credential. ``subscription`` forwards each caller's own subscription sign-in + ( ``ChatGPT`` for ``openai`` , ``claude.ai`` for ``anthropic`` ) and needs no integration account; it is available + only to organizations with subscription providers enabled. A subscription provider's models are + optional: callers can use any model their subscription includes, and a model you add sets its + pricing. Immutable. + :type credential_source: AiGatewayProviderCreateCredentialSource, optional + :param initial_bindings: Reserved for initial View/Edit permissions. Supplying this attribute, including an empty array or null, returns HTTP 503 before discovery or persistence. Omit it for normal creation. :type initial_bindings: [AiGatewayProviderInitialBinding], optional @@ -108,9 +128,14 @@ def __init__( :param slug: Immutable routing identifier. :type slug: str + + :param zdr_eligible: Whether this provider connection is covered by a zero data retention agreement. Defaults to false. For Bedrock, zero data retention is granted per region, so configure one provider per region and set this only on the covered ones. + :type zdr_eligible: bool, optional """ if cost_multiplier is not unset: kwargs["cost_multiplier"] = cost_multiplier + if credential_source is not unset: + kwargs["credential_source"] = credential_source if initial_bindings is not unset: kwargs["initial_bindings"] = initial_bindings if integration_account_id is not unset: @@ -121,6 +146,8 @@ def __init__( kwargs["known_provider"] = known_provider if models is not unset: kwargs["models"] = models + if zdr_eligible is not unset: + kwargs["zdr_eligible"] = zdr_eligible super().__init__(kwargs) self_.name = name diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_create_credential_source.py b/src/datadog_api_client/v2/model/ai_gateway_provider_create_credential_source.py new file mode 100644 index 0000000000..5f85e76498 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_create_credential_source.py @@ -0,0 +1,45 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayProviderCreateCredentialSource(ModelSimple): + """ + Whose credential the gateway sends to the provider. Defaults to `integration_account`, which sends + the integration account's credential. `subscription` forwards each caller's own subscription sign-in + (`ChatGPT` for `openai`, `claude.ai` for `anthropic`) and needs no integration account; it is available + only to organizations with subscription providers enabled. A subscription provider's models are + optional: callers can use any model their subscription includes, and a model you add sets its + pricing. Immutable. + + :param value: If omitted defaults to "integration_account". Must be one of ["integration_account", "subscription"]. + :type value: str + """ + + allowed_values = { + "integration_account", + "subscription", + } + INTEGRATION_ACCOUNT: ClassVar["AiGatewayProviderCreateCredentialSource"] + SUBSCRIPTION: ClassVar["AiGatewayProviderCreateCredentialSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayProviderCreateCredentialSource.INTEGRATION_ACCOUNT = AiGatewayProviderCreateCredentialSource( + "integration_account" +) +AiGatewayProviderCreateCredentialSource.SUBSCRIPTION = AiGatewayProviderCreateCredentialSource("subscription") diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_credential_source.py b/src/datadog_api_client/v2/model/ai_gateway_provider_credential_source.py new file mode 100644 index 0000000000..229328ef7f --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_credential_source.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayProviderCredentialSource(ModelSimple): + """ + Whose credential the gateway sends to the provider. `integration_account` sends the integration + account's credential. `subscription` forwards each caller's own subscription sign-in (`ChatGPT` for + `openai`, `claude.ai` for `anthropic`) and needs no integration account. + + :param value: Must be one of ["integration_account", "subscription"]. + :type value: str + """ + + allowed_values = { + "integration_account", + "subscription", + } + INTEGRATION_ACCOUNT: ClassVar["AiGatewayProviderCredentialSource"] + SUBSCRIPTION: ClassVar["AiGatewayProviderCredentialSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayProviderCredentialSource.INTEGRATION_ACCOUNT = AiGatewayProviderCredentialSource("integration_account") +AiGatewayProviderCredentialSource.SUBSCRIPTION = AiGatewayProviderCredentialSource("subscription") diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_model_entry.py b/src/datadog_api_client/v2/model/ai_gateway_provider_model_entry.py index 792a9fc1fc..f8ac93879c 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_provider_model_entry.py +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_model_entry.py @@ -16,16 +16,20 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.ai_gateway_model_metadata import AiGatewayModelMetadata + from datadog_api_client.v2.model.ai_gateway_model_pricing_attributes import AiGatewayModelPricingAttributes from datadog_api_client.v2.model.ai_gateway_model_source import AiGatewayModelSource from datadog_api_client.v2.model.ai_gateway_supported_operation import AiGatewaySupportedOperation + from datadog_api_client.v2.model.ai_gateway_model_zdr import AiGatewayModelZdr class AiGatewayProviderModelEntry(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.ai_gateway_model_metadata import AiGatewayModelMetadata + from datadog_api_client.v2.model.ai_gateway_model_pricing_attributes import AiGatewayModelPricingAttributes from datadog_api_client.v2.model.ai_gateway_model_source import AiGatewayModelSource from datadog_api_client.v2.model.ai_gateway_supported_operation import AiGatewaySupportedOperation + from datadog_api_client.v2.model.ai_gateway_model_zdr import AiGatewayModelZdr return { "created_at": (datetime,), @@ -33,10 +37,12 @@ def openapi_types(_): "id": (str,), "metadata": (AiGatewayModelMetadata,), "model_id_wire": (str,), + "pricing": (AiGatewayModelPricingAttributes,), "provider_id": (int,), "source": (AiGatewayModelSource,), "supported_operations": ([AiGatewaySupportedOperation],), "updated_at": (datetime,), + "zdr": (AiGatewayModelZdr,), } attribute_map = { @@ -45,10 +51,12 @@ def openapi_types(_): "id": "id", "metadata": "metadata", "model_id_wire": "model_id_wire", + "pricing": "pricing", "provider_id": "provider_id", "source": "source", "supported_operations": "supported_operations", "updated_at": "updated_at", + "zdr": "zdr", } def __init__( @@ -62,6 +70,8 @@ def __init__( supported_operations: List[AiGatewaySupportedOperation], updated_at: datetime, metadata: Union[AiGatewayModelMetadata, UnsetType] = unset, + pricing: Union[AiGatewayModelPricingAttributes, UnsetType] = unset, + zdr: Union[AiGatewayModelZdr, UnsetType] = unset, **kwargs, ): """ @@ -82,6 +92,9 @@ def __init__( :param model_id_wire: Model identifier sent to the provider. :type model_id_wire: str + :param pricing: Attributes of a model pricing resource. + :type pricing: AiGatewayModelPricingAttributes, optional + :param provider_id: Provider identifier. :type provider_id: int @@ -93,9 +106,16 @@ def __init__( :param updated_at: Time when the resource was last updated. :type updated_at: datetime + + :param zdr: Datadog's half of a model's zero data retention eligibility. The customer's half is the provider's ``zdr_eligible``. + :type zdr: AiGatewayModelZdr, optional """ if metadata is not unset: kwargs["metadata"] = metadata + if pricing is not unset: + kwargs["pricing"] = pricing + if zdr is not unset: + kwargs["zdr"] = zdr super().__init__(kwargs) self_.created_at = created_at diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_status.py b/src/datadog_api_client/v2/model/ai_gateway_provider_status.py new file mode 100644 index 0000000000..796b0c8336 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_status.py @@ -0,0 +1,113 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_provider_status_state import AiGatewayProviderStatusState + + +class AiGatewayProviderStatus(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_provider_status_state import AiGatewayProviderStatusState + + return { + "checked_at": (datetime,), + "endpoint": (str,), + "fix": (str,), + "http_status": (int,), + "label": (str,), + "last_ok_at": (datetime,), + "message": (str,), + "reason": (str,), + "state": (AiGatewayProviderStatusState,), + } + + attribute_map = { + "checked_at": "checked_at", + "endpoint": "endpoint", + "fix": "fix", + "http_status": "http_status", + "label": "label", + "last_ok_at": "last_ok_at", + "message": "message", + "reason": "reason", + "state": "state", + } + + def __init__( + self_, + state: AiGatewayProviderStatusState, + checked_at: Union[datetime, UnsetType] = unset, + endpoint: Union[str, UnsetType] = unset, + fix: Union[str, UnsetType] = unset, + http_status: Union[int, UnsetType] = unset, + label: Union[str, UnsetType] = unset, + last_ok_at: Union[datetime, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + reason: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Read-only. Whether the provider works, from the model sync and live calls. Omitted for providers + that are never checked: those without an integration account, and Azure OpenAI and Gemini until + live traffic records a status. + + :param checked_at: Time of the last observation. + :type checked_at: datetime, optional + + :param endpoint: Models address called, for custom providers. + :type endpoint: str, optional + + :param fix: Display text saying how to fix the provider. Clients render it as-is. + :type fix: str, optional + + :param http_status: HTTP status the provider answered with. + :type http_status: int, optional + + :param label: Display text for the reason. Clients render it as-is. + :type label: str, optional + + :param last_ok_at: Time of the last observation in which the provider worked. + :type last_ok_at: datetime, optional + + :param message: The provider's own error message, with credentials removed. Never set for custom providers. + :type message: str, optional + + :param reason: Why the provider is invalid, as a stable code such as ``credentials_rejected``. Set only when ``state`` is ``invalid``. + :type reason: str, optional + + :param state: Whether the provider works. ``checking`` means no observation is recorded yet, not that a check is running. + :type state: AiGatewayProviderStatusState + """ + if checked_at is not unset: + kwargs["checked_at"] = checked_at + if endpoint is not unset: + kwargs["endpoint"] = endpoint + if fix is not unset: + kwargs["fix"] = fix + if http_status is not unset: + kwargs["http_status"] = http_status + if label is not unset: + kwargs["label"] = label + if last_ok_at is not unset: + kwargs["last_ok_at"] = last_ok_at + if message is not unset: + kwargs["message"] = message + if reason is not unset: + kwargs["reason"] = reason + super().__init__(kwargs) + + self_.state = state diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_status_state.py b/src/datadog_api_client/v2/model/ai_gateway_provider_status_state.py new file mode 100644 index 0000000000..976f08b621 --- /dev/null +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_status_state.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class AiGatewayProviderStatusState(ModelSimple): + """ + Whether the provider works. `checking` means no observation is recorded yet, not that a check is running. + + :param value: Must be one of ["ok", "invalid", "checking"]. + :type value: str + """ + + allowed_values = { + "ok", + "invalid", + "checking", + } + OK: ClassVar["AiGatewayProviderStatusState"] + INVALID: ClassVar["AiGatewayProviderStatusState"] + CHECKING: ClassVar["AiGatewayProviderStatusState"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +AiGatewayProviderStatusState.OK = AiGatewayProviderStatusState("ok") +AiGatewayProviderStatusState.INVALID = AiGatewayProviderStatusState("invalid") +AiGatewayProviderStatusState.CHECKING = AiGatewayProviderStatusState("checking") diff --git a/src/datadog_api_client/v2/model/ai_gateway_provider_update_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_provider_update_attributes.py index 2c6f6d3895..1ce6b60f25 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_provider_update_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_provider_update_attributes.py @@ -30,15 +30,21 @@ def openapi_types(_): return { "cost_multiplier": (float,), "name": (str,), + "zdr_eligible": (bool,), } attribute_map = { "cost_multiplier": "cost_multiplier", "name": "name", + "zdr_eligible": "zdr_eligible", } def __init__( - self_, cost_multiplier: Union[float, UnsetType] = unset, name: Union[str, UnsetType] = unset, **kwargs + self_, + cost_multiplier: Union[float, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + zdr_eligible: Union[bool, UnsetType] = unset, + **kwargs, ): """ Attributes used to update an AI Gateway provider. @@ -48,9 +54,14 @@ def __init__( :param name: Human-readable resource name. :type name: str, optional + + :param zdr_eligible: Whether this provider connection is covered by a zero data retention agreement. Omit to leave unchanged. + :type zdr_eligible: bool, optional """ if cost_multiplier is not unset: kwargs["cost_multiplier"] = cost_multiplier if name is not unset: kwargs["name"] = name + if zdr_eligible is not unset: + kwargs["zdr_eligible"] = zdr_eligible super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/ai_gateway_routing_rule_create_attributes.py b/src/datadog_api_client/v2/model/ai_gateway_routing_rule_create_attributes.py index 71475fd8c3..9288f358eb 100644 --- a/src/datadog_api_client/v2/model/ai_gateway_routing_rule_create_attributes.py +++ b/src/datadog_api_client/v2/model/ai_gateway_routing_rule_create_attributes.py @@ -3,15 +3,18 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) if TYPE_CHECKING: + from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding from datadog_api_client.v2.model.ai_gateway_routing_rule_tier_request import AiGatewayRoutingRuleTierRequest @@ -28,28 +31,42 @@ class AiGatewayRoutingRuleCreateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding from datadog_api_client.v2.model.ai_gateway_routing_rule_tier_request import AiGatewayRoutingRuleTierRequest return { + "initial_bindings": ([AiGatewayProviderInitialBinding],), "slug": (str,), "tiers": ([AiGatewayRoutingRuleTierRequest],), } attribute_map = { + "initial_bindings": "initial_bindings", "slug": "slug", "tiers": "tiers", } - def __init__(self_, slug: str, tiers: List[AiGatewayRoutingRuleTierRequest], **kwargs): + def __init__( + self_, + slug: str, + tiers: List[AiGatewayRoutingRuleTierRequest], + initial_bindings: Union[List[AiGatewayProviderInitialBinding], UnsetType] = unset, + **kwargs, + ): """ Attributes used to create an AI Gateway routing rule. + :param initial_bindings: Reserved for initial View/Edit permissions. Supplying this attribute returns HTTP 400 and creates no route. Create the route, then set its permissions through the restriction policy API. + :type initial_bindings: [AiGatewayProviderInitialBinding], optional + :param slug: Organization-unique resource slug. :type slug: str :param tiers: :type tiers: [AiGatewayRoutingRuleTierRequest] """ + if initial_bindings is not unset: + kwargs["initial_bindings"] = initial_bindings super().__init__(kwargs) self_.slug = slug diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 8b3adfdfbc..0bb1db954d 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -384,6 +384,7 @@ AiGatewayBudgetInstancesSummaryResponse, ) from datadog_api_client.v2.model.ai_gateway_budget_instances_summary_type import AiGatewayBudgetInstancesSummaryType +from datadog_api_client.v2.model.ai_gateway_budget_limit_mode import AiGatewayBudgetLimitMode from datadog_api_client.v2.model.ai_gateway_budget_list_attributes import AiGatewayBudgetListAttributes from datadog_api_client.v2.model.ai_gateway_budget_list_resource import AiGatewayBudgetListResource from datadog_api_client.v2.model.ai_gateway_budget_list_response import AiGatewayBudgetListResponse @@ -391,6 +392,7 @@ from datadog_api_client.v2.model.ai_gateway_budget_period_resource import AiGatewayBudgetPeriodResource from datadog_api_client.v2.model.ai_gateway_budget_period_response import AiGatewayBudgetPeriodResponse from datadog_api_client.v2.model.ai_gateway_budget_period_type import AiGatewayBudgetPeriodType +from datadog_api_client.v2.model.ai_gateway_budget_reporting_summary import AiGatewayBudgetReportingSummary from datadog_api_client.v2.model.ai_gateway_budget_resource import AiGatewayBudgetResource from datadog_api_client.v2.model.ai_gateway_budget_response import AiGatewayBudgetResponse from datadog_api_client.v2.model.ai_gateway_budget_selector_entry import AiGatewayBudgetSelectorEntry @@ -488,6 +490,16 @@ from datadog_api_client.v2.model.ai_gateway_known_provider import AiGatewayKnownProvider from datadog_api_client.v2.model.ai_gateway_max_reasoning_level import AiGatewayMaxReasoningLevel from datadog_api_client.v2.model.ai_gateway_metadata_capture_item import AiGatewayMetadataCaptureItem +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing import AiGatewayModelAutomaticPricing +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_field_match import ( + AiGatewayModelAutomaticPricingFieldMatch, +) +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mapping import AiGatewayModelAutomaticPricingMapping +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_mode_trigger import ( + AiGatewayModelAutomaticPricingModeTrigger, +) +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_rate import AiGatewayModelAutomaticPricingRate +from datadog_api_client.v2.model.ai_gateway_model_automatic_pricing_source import AiGatewayModelAutomaticPricingSource from datadog_api_client.v2.model.ai_gateway_model_capabilities import AiGatewayModelCapabilities from datadog_api_client.v2.model.ai_gateway_model_catalog_entry_attributes import AiGatewayModelCatalogEntryAttributes from datadog_api_client.v2.model.ai_gateway_model_catalog_entry_identifier import AiGatewayModelCatalogEntryIdentifier @@ -560,6 +572,7 @@ from datadog_api_client.v2.model.ai_gateway_model_pricing_response_data import AiGatewayModelPricingResponseData from datadog_api_client.v2.model.ai_gateway_model_pricing_source import AiGatewayModelPricingSource from datadog_api_client.v2.model.ai_gateway_model_pricing_source_type import AiGatewayModelPricingSourceType +from datadog_api_client.v2.model.ai_gateway_model_pricing_status import AiGatewayModelPricingStatus from datadog_api_client.v2.model.ai_gateway_model_pricing_type import AiGatewayModelPricingType from datadog_api_client.v2.model.ai_gateway_model_reasoning import AiGatewayModelReasoning from datadog_api_client.v2.model.ai_gateway_model_reasoning_control import AiGatewayModelReasoningControl @@ -569,6 +582,8 @@ from datadog_api_client.v2.model.ai_gateway_model_update_attributes import AiGatewayModelUpdateAttributes from datadog_api_client.v2.model.ai_gateway_model_update_data import AiGatewayModelUpdateData from datadog_api_client.v2.model.ai_gateway_model_update_request import AiGatewayModelUpdateRequest +from datadog_api_client.v2.model.ai_gateway_model_zdr import AiGatewayModelZdr +from datadog_api_client.v2.model.ai_gateway_model_zdr_coverage import AiGatewayModelZdrCoverage from datadog_api_client.v2.model.ai_gateway_models_bulk_create_attributes import AiGatewayModelsBulkCreateAttributes from datadog_api_client.v2.model.ai_gateway_models_bulk_create_data import AiGatewayModelsBulkCreateData from datadog_api_client.v2.model.ai_gateway_models_bulk_create_request import AiGatewayModelsBulkCreateRequest @@ -596,8 +611,12 @@ from datadog_api_client.v2.model.ai_gateway_policy_type import AiGatewayPolicyType from datadog_api_client.v2.model.ai_gateway_provider_attributes import AiGatewayProviderAttributes from datadog_api_client.v2.model.ai_gateway_provider_create_attributes import AiGatewayProviderCreateAttributes +from datadog_api_client.v2.model.ai_gateway_provider_create_credential_source import ( + AiGatewayProviderCreateCredentialSource, +) from datadog_api_client.v2.model.ai_gateway_provider_create_data import AiGatewayProviderCreateData from datadog_api_client.v2.model.ai_gateway_provider_create_request import AiGatewayProviderCreateRequest +from datadog_api_client.v2.model.ai_gateway_provider_credential_source import AiGatewayProviderCredentialSource from datadog_api_client.v2.model.ai_gateway_provider_initial_binding import AiGatewayProviderInitialBinding from datadog_api_client.v2.model.ai_gateway_provider_initial_binding_relation import ( AiGatewayProviderInitialBindingRelation, @@ -609,6 +628,8 @@ from datadog_api_client.v2.model.ai_gateway_provider_relationships import AiGatewayProviderRelationships from datadog_api_client.v2.model.ai_gateway_provider_resource import AiGatewayProviderResource from datadog_api_client.v2.model.ai_gateway_provider_response import AiGatewayProviderResponse +from datadog_api_client.v2.model.ai_gateway_provider_status import AiGatewayProviderStatus +from datadog_api_client.v2.model.ai_gateway_provider_status_state import AiGatewayProviderStatusState from datadog_api_client.v2.model.ai_gateway_provider_type import AiGatewayProviderType from datadog_api_client.v2.model.ai_gateway_provider_update_attributes import AiGatewayProviderUpdateAttributes from datadog_api_client.v2.model.ai_gateway_provider_update_data import AiGatewayProviderUpdateData @@ -14324,6 +14345,7 @@ "AiGatewayBudgetInstancesSummaryResource", "AiGatewayBudgetInstancesSummaryResponse", "AiGatewayBudgetInstancesSummaryType", + "AiGatewayBudgetLimitMode", "AiGatewayBudgetListAttributes", "AiGatewayBudgetListResource", "AiGatewayBudgetListResponse", @@ -14331,6 +14353,7 @@ "AiGatewayBudgetPeriodResource", "AiGatewayBudgetPeriodResponse", "AiGatewayBudgetPeriodType", + "AiGatewayBudgetReportingSummary", "AiGatewayBudgetResource", "AiGatewayBudgetResponse", "AiGatewayBudgetSelectorEntry", @@ -14388,6 +14411,12 @@ "AiGatewayKnownProvider", "AiGatewayMaxReasoningLevel", "AiGatewayMetadataCaptureItem", + "AiGatewayModelAutomaticPricing", + "AiGatewayModelAutomaticPricingFieldMatch", + "AiGatewayModelAutomaticPricingMapping", + "AiGatewayModelAutomaticPricingModeTrigger", + "AiGatewayModelAutomaticPricingRate", + "AiGatewayModelAutomaticPricingSource", "AiGatewayModelCapabilities", "AiGatewayModelCatalogEntryAttributes", "AiGatewayModelCatalogEntryIdentifier", @@ -14442,6 +14471,7 @@ "AiGatewayModelPricingResponseData", "AiGatewayModelPricingSource", "AiGatewayModelPricingSourceType", + "AiGatewayModelPricingStatus", "AiGatewayModelPricingType", "AiGatewayModelReasoning", "AiGatewayModelReasoningControl", @@ -14451,6 +14481,8 @@ "AiGatewayModelUpdateAttributes", "AiGatewayModelUpdateData", "AiGatewayModelUpdateRequest", + "AiGatewayModelZdr", + "AiGatewayModelZdrCoverage", "AiGatewayModelsBulkCreateAttributes", "AiGatewayModelsBulkCreateData", "AiGatewayModelsBulkCreateRequest", @@ -14474,8 +14506,10 @@ "AiGatewayPolicyType", "AiGatewayProviderAttributes", "AiGatewayProviderCreateAttributes", + "AiGatewayProviderCreateCredentialSource", "AiGatewayProviderCreateData", "AiGatewayProviderCreateRequest", + "AiGatewayProviderCredentialSource", "AiGatewayProviderInitialBinding", "AiGatewayProviderInitialBindingRelation", "AiGatewayProviderIntegrationConfig", @@ -14485,6 +14519,8 @@ "AiGatewayProviderRelationships", "AiGatewayProviderResource", "AiGatewayProviderResponse", + "AiGatewayProviderStatus", + "AiGatewayProviderStatusState", "AiGatewayProviderType", "AiGatewayProviderUpdateAttributes", "AiGatewayProviderUpdateData", diff --git a/tests/v2/features/ai_gateway.feature b/tests/v2/features/ai_gateway.feature index b9312a5721..f87f8b1ac2 100644 --- a/tests/v2/features/ai_gateway.feature +++ b/tests/v2/features/ai_gateway.feature @@ -160,7 +160,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway provider returns "Bad Request" response Given operation "CreateAiGatewayProvider" enabled And new "CreateAiGatewayProvider" request - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "credential_source": "integration_account", "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us", "zdr_eligible": false}, "type": "providers"}} When the request is sent Then the response status is 400 Bad Request @@ -168,7 +168,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway provider returns "Conflict" response Given operation "CreateAiGatewayProvider" enabled And new "CreateAiGatewayProvider" request - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "credential_source": "integration_account", "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us", "zdr_eligible": false}, "type": "providers"}} When the request is sent Then the response status is 409 Conflict @@ -176,7 +176,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway provider returns "Created" response Given operation "CreateAiGatewayProvider" enabled And new "CreateAiGatewayProvider" request - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us"}, "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "credential_source": "integration_account", "initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "integration_account_id": "account-123", "integration_config": {"bedrock_region": "us-east-1", "foundry_project": "my-project", "foundry_resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai/providers/Microsoft.CognitiveServices/accounts/my-foundry", "location": "us-central1", "project_id": "my-gcp-project", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}, "known_provider": "openai", "models": [{"model_id_canonical": "gpt-5.2-codex", "model_id_wire": "gpt-5.2-codex-20260801", "supported_operations": ["OPENAI_CHAT_COMPLETIONS"]}], "name": "production-us", "slug": "prod-us", "zdr_eligible": false}, "type": "providers"}} When the request is sent Then the response status is 201 Created @@ -208,7 +208,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway routing rule returns "Bad Request" response Given operation "CreateAiGatewayRoutingRule" enabled And new "CreateAiGatewayRoutingRule" request - And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + And body with value {"data": {"attributes": {"initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} When the request is sent Then the response status is 400 Bad Request @@ -216,7 +216,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway routing rule returns "Conflict" response Given operation "CreateAiGatewayRoutingRule" enabled And new "CreateAiGatewayRoutingRule" request - And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + And body with value {"data": {"attributes": {"initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} When the request is sent Then the response status is 409 Conflict @@ -224,7 +224,7 @@ Feature: AI Gateway Scenario: Create an AI Gateway routing rule returns "Created" response Given operation "CreateAiGatewayRoutingRule" enabled And new "CreateAiGatewayRoutingRule" request - And body with value {"data": {"attributes": {"slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} + And body with value {"data": {"attributes": {"initial_bindings": [{"principals": ["org:11111111-1111-1111-1111-111111111111"], "relation": "viewer"}], "slug": "coding", "tiers": [{"classifier": {"confidence_threshold": 0.5, "context": "Requests come from engineers.", "model": "gpt-6-luna", "provider": "openai"}, "ordering": "configured", "targets": [{"default": false, "id": 901, "model": "gpt-5.2-codex", "model_id": 101, "provider": "prod-us", "reasoning_level": "medium", "rubric": "Short factual questions.", "slug": "coding-fallback", "type": "model", "weight": 70}]}]}, "type": "routing-rules"}} When the request is sent Then the response status is 201 Created @@ -1032,7 +1032,7 @@ Feature: AI Gateway Given operation "UpdateAiGatewayProvider" enabled And new "UpdateAiGatewayProvider" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2", "zdr_eligible": false}, "id": "42", "type": "providers"}} When the request is sent Then the response status is 400 Bad Request @@ -1041,7 +1041,7 @@ Feature: AI Gateway Given operation "UpdateAiGatewayProvider" enabled And new "UpdateAiGatewayProvider" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2", "zdr_eligible": false}, "id": "42", "type": "providers"}} When the request is sent Then the response status is 409 Conflict @@ -1050,7 +1050,7 @@ Feature: AI Gateway Given operation "UpdateAiGatewayProvider" enabled And new "UpdateAiGatewayProvider" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2", "zdr_eligible": false}, "id": "42", "type": "providers"}} When the request is sent Then the response status is 404 Not Found @@ -1059,7 +1059,7 @@ Feature: AI Gateway Given operation "UpdateAiGatewayProvider" enabled And new "UpdateAiGatewayProvider" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2"}, "id": "42", "type": "providers"}} + And body with value {"data": {"attributes": {"cost_multiplier": 1.0, "name": "production-us-v2", "zdr_eligible": false}, "id": "42", "type": "providers"}} When the request is sent Then the response status is 200 OK