---
title: "Update an AI Gateway Model"
method: PUT
path: "/v1/ai-gateways/{gatewayId}/models/{modelIdOrName}"
tags: ["AI Gateway Models"]
---

# Update an AI Gateway Model

`PUT /v1/ai-gateways/{gatewayId}/models/{modelIdOrName}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-gateways/{gatewayId}/models/{modelIdOrName}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Updates the configuration of an existing AI Gateway model.

## Path parameters

- `gatewayId` string, uuid, required: Contains a unique identifier used for this resource.
- `modelIdOrName` string, uuid, required: Contains a unique identifier used for this resource.

## Request body

- union: Configuration for an AI Gateway model.
  - AIGatewayModelAPI: Configuration for proxying asynchronous requests/responses to/from an AI Gateway model using the files, batches, and skills APIs.
    - `display_name` string, required: The display name for this model instance.
    - `name` string, required: A user-defined unique identifier for this model, used as a stable human-readable reference. This value is immutable after creation.
    - `enabled` boolean: Whether the model is enabled.
    - `access` AIGatewayModelAccess: Access control configuration for a model.
      - `acls` AIGatewayACLS: Access control rules. Configure exactly one of `allow`, `deny`, `allow_when`, or `deny_when`.
        - `allow` string[]: List of Consumer Groups Names, or Authenticated Groups Names that are permitted access.
        - `deny` string[]: List of Consumer Groups Names, or Authenticated Groups Names that are denied access.
        - `allow_when` string[], nullable: Allow the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `allow`, `deny`, `allow_when`, or `deny_when` must be specified.
        - `deny_when` string[], nullable: Deny the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `allow`, `deny`, `allow_when`, or `deny_when` must be specified.
      - `identity_providers` AIGatewayIdentityProviderReference[]: List of identity providers for granting access to the model. At most 1 identity provider of each identity provider type can be referenced. Deprecated: use `auth_strategies` instead. The two are mutually exclusive.
      - `auth_strategies` AIGatewayAuthStrategyReference[]: List of auth strategies for granting access to the model. At most 1 auth strategy of each auth strategy type can be referenced.
    - `formats` AIGatewayModelFormat[], required: List of request/response formats supported by this model.
      - `type` '*' | 'anthropic' | 'bedrock' | 'cohere' | 'gemini' | 'huggingface' | 'openai' | 'passthrough' | 'typesafe': The request and response format this model supports. Set to a specific format to restrict the model to that format only, or to `*` to allow all formats that the targets support at the gateway's min_runtime_version. A format that needs a newer min_runtime_version is left out of `*`. The `*` format never includes passthrough. **`passthrough` requires a minimum runtime version of `2.2`**. **`typesafe` requires a minimum runtime version of `2.2`**.
    - `targets` AIGatewayTarget[], required: One or more backend models that this model entry routes to.
      - `name` string, required: The name of the model defined in the upstream provider that will be executed.
      - `weight` integer: The weight this target gets within the upstream load balancer
      - `semantic_description` string: The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.
      - `allow_auth_override` boolean: When enabled, request-level auth parameters (such as API keys or bearer tokens) will override the static values defined for the provider.
      - `provider` string, required: Reference to a model provider instance by name.
      - `config` union, required: Configuration for a target model.
        - AIGatewayTargetAnthropicConfig: Anthropic-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'anthropic', required
          - `version` string: The Anthropic API version to use.
        - AIGatewayTargetAzureConfig: Azure-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'azure', required
          - `deployment_id` string: The Azure deployment ID for the model. Applies when the Azure provider's `service` is `azure-openai`; not used for `azure-foundry`.
          - `api_version` string: The Azure OpenAI API version to use.
          - `foundry_path_prefix` '/openai/v1' | '/anthropic/v1': The API path prefix for the Azure AI Foundry endpoint, selecting the model's API surface. `/openai/v1` targets the OpenAI-compatible surface; `/anthropic/v1` targets the Anthropic surface. Applies when the Azure provider's `service` is `azure-foundry`.
        - AIGatewayTargetBasetenConfig: Baseten-specific configuration for a model. Requests are sent to Baseten Model APIs at `https://inference.baseten.co/v1` by default, and the target `name` is the Baseten model slug (for example, `deepseek-ai/DeepSeek-V4-Pro-0813`). To route to a dedicated Baseten deployment, set `upstream_url` to the deployment's full OpenAI-compatible endpoint (for example, `https://model-{model_id}.api.baseten.co/environments/{environment}/sync/v1/chat/completions`) or use passthrough format. **Requires a minimum runtime version of `2.3`**.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'baseten', required
        - AIGatewayTargetBedrockConfig: AWS Bedrock-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'bedrock', required
          - `region` string: The AWS region for the model. Setting this option overrides the AWS_REGION environment variable.
          - `batch_bucket_prefix` string: S3 bucket prefix for batch inference jobs.
          - `embeddings_normalize` boolean: Whether to normalize embedding vectors in the response.
          - `performance_config_latency` string: Latency performance configuration for the model invocation.
          - `video_output_s3_uri` string: S3 URI for storing video generation outputs.
          - `vpc_endpoint` string: Hostname of an AWS PrivateLink VPC endpoint to use instead of the public Bedrock endpoint. Ignored if `upstream_url` is set. **Requires a minimum runtime version of `2.3`**.
          - `endpoint_type` 'runtime' | 'mantle': The AWS Bedrock inference endpoint that requests to this target are sent to. `runtime` sends requests to the Bedrock Runtime endpoint (`bedrock-runtime.{region}.amazonaws.com`). `mantle` sends requests to the Bedrock Mantle endpoint (`bedrock-mantle.{region}.api.aws`), which accepts OpenAI and Anthropic request formats natively. A target with `endpoint_type` set to `mantle` is rejected if its model includes a format with `type` set to `bedrock`, because the Mantle endpoint does not support the Bedrock Converse or InvokeModel APIs. **Requires a minimum runtime version of `2.3`**.
        - AIGatewayTargetCerebrasConfig: Cerebras-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'cerebras', required
        - AIGatewayTargetCohereConfig: Cohere-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'cohere', required
          - `api_version` 'v1' | 'v2': Cohere API version. `v1` uses the legacy `/v1/chat` endpoint; `v2` (default) uses `/v2/chat` and supports tool calling.
          - `embedding_input_type` 'classification' | 'clustering' | 'image' | 'search_document' | 'search_query': The intended downstream use of the embeddings to improve model quality.
          - `wait_for_model` boolean: Whether to wait for the model to be ready before sending the request.
        - AIGatewayTargetDashscopeConfig: Alibaba DashScope-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'dashscope', required
          - `international` boolean: Whether to use the international DashScope endpoint.
        - AIGatewayTargetDatabricksConfig: Databricks-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'databricks', required
          - `workspace_instance_id` string, required: The Databricks workspace instance ID.
        - AIGatewayTargetDeepseekConfig: Deepseek-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'deepseek', required
        - AIGatewayTargetGeminiConfig: Google Gemini-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'gemini', required
          - `gcp_environment` GCPModelConfig: Configuration for a model hosted on Google Cloud Project.
            - `api_endpoint` string, required: The custom API endpoint for the Gemini model.
            - `location_id` string, required: The Google Cloud location ID for the model endpoint.
            - `project_id` string, required: The Google Cloud project ID for the model endpoint.
        - AIGatewayTargetHuggingfaceConfig: Hugging Face-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'huggingface', required
          - `use_cache` boolean: Whether to use the Hugging Face inference cache.
          - `wait_for_model` boolean: Whether to wait for the model to load if it is not ready.
        - AIGatewayTargetKimiConfig: Kimi (Moonshot AI)-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'kimi', required
          - `international` boolean: When `true`, requests are sent to `api.moonshot.ai` (international). When `false`, requests are sent to `api.moonshot.cn` (mainland China).
        - AIGatewayTargetLlama2Config: Llama2-specific configuration for a model. Deprecated: the `llama2` provider is deprecated and will be removed in 3.0. Migrate by the `format` value: `ollama` maps to the `ollama` provider, `openai` maps to the `openai` provider with `upstream_url` set, or to the `vllm` provider; `raw` has no replacement provider.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri, required: The upstream URL for the model endpoint.
          - `type` 'llama2', required
          - `format` 'ollama' | 'openai' | 'raw', required: The request format to use when communicating with the Llama2 model.
        - AIGatewayTargetMistralConfig: Mistral-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'mistral', required
          - `format` 'ollama' | 'openai', required: The request format to use when communicating with the Mistral model.
        - AIGatewayTargetOllamaConfig: Ollama-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'ollama', required
        - AIGatewayTargetOpenaiConfig: Openai-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'openai', required
        - AIGatewayTargetVercelConfig: Vercel AI Gateway-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'vercel', required
        - AIGatewayTargetVllmConfig: Vllm-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri, required: The upstream URL for the model endpoint.
          - `type` 'vllm', required
        - AIGatewayTargetXaiConfig: Xai-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'xai', required
        - AIGatewayTargetSagemakerConfig: AWS SageMaker-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'sagemaker', required
          - `aws` object, nullable
            - `region` string, nullable: Overrides the AWS_REGION environment variable for SageMaker requests.
            - `assume_role_arn` string, nullable: Assume a different IAM role after authenticating; mutually required with role_session_name.
            - `role_session_name` string, nullable: Session identifier for the assumed role; mutually required with assume_role_arn.
            - `sts_endpoint_url` string, nullable: Overrides the STS endpoint when assuming a role.
          - `target` object, nullable
            - `model` string, nullable: Sets the X-Amzn-SageMaker-Target-Model header (multi-model endpoints).
            - `variant` string, nullable: Sets the X-Amzn-SageMaker-Target-Variant header (A/B variant testing).
            - `container_hostname` string, nullable: Sets the X-Amzn-SageMaker-Target-Container-Hostname header (multi-container).
        - AIGatewayTargetTypesafeConfig: Typesafe-specific configuration for a model. **Requires a minimum runtime version of `2.2`**.
          - `type` 'typesafe', required
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
    - `policies` string[]: List of policy references.
    - `labels` PublicLabels: Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store **PUBLIC** metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `managed_by` ManagedBy: Stores information about what manages this entity, such as the tool or system responsible for its lifecycle (for example, `terraform`). Keys must be 1–63 characters long, start and end with an alphanumeric character, and may contain dashes (`-`), underscores (`_`), and dots (`.`). Values must be 1–127 characters long and must not be empty. Keys and values must not contain spaces or control characters.
    - `datastores` AIGatewayModelDatastoreRef[]: The Datastores this model references, with the feature that uses each one.
      - `name` string, required: An immutable user-defined identifier for this resource.
      - `purpose` 'semantic-balancer': The model feature that uses the datastore. `semantic-balancer` supplies the connection of the model vector store.
    - `type` 'api', required
    - `config` AIGatewayModelAPIConfig, required: Routing, logging, and load balancing configuration for the model.
      - `route` AIGatewayModelRouteConfig, required: Configuration for an AI Gateway route.
        - `headers` object: One or more lists of values indexed by header name that will cause this route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression.
        - `hosts` string[]: A list of domain names that match this route. Note that the hosts value is case sensitive.
        - `https_redirect_status_code` integer: The status code Kong responds with when all properties of a route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the route is configured to only accept the `https` protocol.
        - `methods` string[]: A list of HTTP methods that match this route.
        - `paths` string[]: A list of paths that match this route.
        - `preserve_host` boolean: When matching a route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the service's `host`.
        - `protocols` string[]: An array of the protocols this route should allow. See the [route Object](#route-object) section for a list of accepted protocols. When set to only `https`, HTTP requests are answered with an upgrade error. When set to only `http`, HTTPS requests are answered with an error.
        - `regex_priority` integer: A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones).
        - `request_buffering` boolean: Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.
        - `response_buffering` boolean: Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.
        - `strip_path` boolean: When matching a route via one of the `paths`, strip the matching prefix from the upstream request URL.
        - `tags` string[]: An optional set of strings associated with the route for grouping and filtering.
        - `model` AIGatewayModelSelectorConfig: Configuration for overriding routing to this model using a selector. When no selector location is set, the format default selector is used. When values are not set, the model name is used as the selector value.
          - `body_param` string: The body property name to match for routing.
          - `header_param` string: The header property name to match for routing.
          - `path_param` string: The name of the regex capture group defined in the route path for routing.
          - `values` string[]: Optional model aliases. When omitted, the model name is used. When no selector location is configured, the format default selector is used.
      - `logging` AIGatewayLoggingConfig: Configuration for AI Gateway logging.
        - `payloads` boolean
      - `response_streaming` 'allow' | 'always' | 'deny'
      - `max_request_body_size` integer: The maximum size, in bytes, of a request body that the gateway reads and sends to the model. A request with a larger body fails. Set to 0 for no limit. If you do not set a value, the gateway uses the request size limit that the model's providers publish, with defaults to 8 MB. If the targets use more than one provider, the gateway uses the highest of these limits.
      - `balancer` union: Configuration for a model's load balancer when multiple target models are configured.
        - AIGatewayModelBalancerConsistentHashingConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'consistent-hashing', required
          - `hash_on_header` string: The header to use for consistent-hashing.
        - AIGatewayModelBalancerLeastConnectionsConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'least-connections', required
        - AIGatewayModelBalancerLowestLatencyConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'lowest-latency', required
          - `latency_strategy` 'e2e' | 'tpot', required: What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.
        - AIGatewayModelBalancerLowestUsageConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'lowest-usage', required
          - `tokens_count_strategy` 'completion-tokens' | 'cost' | 'llm-accuracy' | 'prompt-tokens' | 'total-tokens', required: Methodology to use for token usage calculation.
        - AIGatewayModelBalancerPriorityConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'priority', required
        - AIGatewayModelBalancerRoundRobinConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'round-robin', required
        - AIGatewayModelBalancerSemanticConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'semantic', required
          - `embeddings` object, required: Embeddings model configuration for this model.
            - `allow_auth_override` boolean: When enabled, request-level auth parameters (such as API keys or bearer tokens) will override the static values defined for the provider.
            - `provider` string, required: Reference to a model provider instance by name.
            - `name` string, required: The name of the embeddings model.
            - `config` union, required: Configuration for an embeddings model.
              - …
          - `vectordb` union, required: Configuration for the vector database used by the model.
            - AIGatewayModelVectorDBConfigPgVector
              - …
            - AIGatewayModelVectorDBConfigRedis: Config for connecting to a Cloud Provider's Redis instance.
              - …
      - `proxy` AIGatewayProxyConfig: HTTP/HTTPS proxy configuration for outbound requests to the upstream AI provider.
        - `http_proxy` object, nullable: HTTP proxy server to route plaintext outbound requests through.
          - `host` string, nullable: A string representing a host name, such as example.com.
          - `port` integer, nullable: An integer representing a port number between 0 and 65535, inclusive.
        - `https_proxy` object, nullable: HTTPS proxy server to route TLS outbound requests through.
          - `host` string, nullable: A string representing a host name, such as example.com.
          - `port` integer, nullable: An integer representing a port number between 0 and 65535, inclusive.
        - `proxy_scheme` 'http': The proxy scheme to use when connecting to the proxy server.
        - `auth` object, nullable: Credentials used to authenticate to the proxy server.
          - `username` string, nullable: The username to use for proxy authentication. This field is [referenceable](https://developer.konghq.com/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          - `password` string, nullable: The password to use for proxy authentication. This field is [referenceable](https://developer.konghq.com/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
        - `no_proxy` string, nullable: Comma-separated list of hosts that should not be proxied.
    - `capabilities` string[], required: The capabilities this model supports. Set to a specific capability to restrict the model to that capability only, or to `*` to allow all capabilities that the targets support at the gateway's min_runtime_version. A capability that needs a newer min_runtime_version is left out of `*`.
  - AIGatewayModelModel: Configuration for proxying synchronous requests/responses to/from an AI Gateway model using generative APIs.
    - `display_name` string, required: The display name for this model instance.
    - `name` string, required: A user-defined unique identifier for this model, used as a stable human-readable reference. This value is immutable after creation.
    - `enabled` boolean: Whether the model is enabled.
    - `access` AIGatewayModelAccess: Access control configuration for a model.
      - `acls` AIGatewayACLS: Access control rules. Configure exactly one of `allow`, `deny`, `allow_when`, or `deny_when`.
        - `allow` string[]: List of Consumer Groups Names, or Authenticated Groups Names that are permitted access.
        - `deny` string[]: List of Consumer Groups Names, or Authenticated Groups Names that are denied access.
        - `allow_when` string[], nullable: Allow the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `allow`, `deny`, `allow_when`, or `deny_when` must be specified.
        - `deny_when` string[], nullable: Deny the request if it matches any of these CEL boolean expressions evaluated against the request context (consumer, principal, HTTP attributes, consumer groups, etc.). Exactly one of `allow`, `deny`, `allow_when`, or `deny_when` must be specified.
      - `identity_providers` AIGatewayIdentityProviderReference[]: List of identity providers for granting access to the model. At most 1 identity provider of each identity provider type can be referenced. Deprecated: use `auth_strategies` instead. The two are mutually exclusive.
      - `auth_strategies` AIGatewayAuthStrategyReference[]: List of auth strategies for granting access to the model. At most 1 auth strategy of each auth strategy type can be referenced.
    - `formats` AIGatewayModelFormat[], required: List of request/response formats supported by this model.
      - `type` '*' | 'anthropic' | 'bedrock' | 'cohere' | 'gemini' | 'huggingface' | 'openai' | 'passthrough' | 'typesafe': The request and response format this model supports. Set to a specific format to restrict the model to that format only, or to `*` to allow all formats that the targets support at the gateway's min_runtime_version. A format that needs a newer min_runtime_version is left out of `*`. The `*` format never includes passthrough. **`passthrough` requires a minimum runtime version of `2.2`**. **`typesafe` requires a minimum runtime version of `2.2`**.
    - `targets` AIGatewayTarget[], required: One or more backend models that this model entry routes to.
      - `name` string, required: The name of the model defined in the upstream provider that will be executed.
      - `weight` integer: The weight this target gets within the upstream load balancer
      - `semantic_description` string: The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.
      - `allow_auth_override` boolean: When enabled, request-level auth parameters (such as API keys or bearer tokens) will override the static values defined for the provider.
      - `provider` string, required: Reference to a model provider instance by name.
      - `config` union, required: Configuration for a target model.
        - AIGatewayTargetAnthropicConfig: Anthropic-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'anthropic', required
          - `version` string: The Anthropic API version to use.
        - AIGatewayTargetAzureConfig: Azure-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'azure', required
          - `deployment_id` string: The Azure deployment ID for the model. Applies when the Azure provider's `service` is `azure-openai`; not used for `azure-foundry`.
          - `api_version` string: The Azure OpenAI API version to use.
          - `foundry_path_prefix` '/openai/v1' | '/anthropic/v1': The API path prefix for the Azure AI Foundry endpoint, selecting the model's API surface. `/openai/v1` targets the OpenAI-compatible surface; `/anthropic/v1` targets the Anthropic surface. Applies when the Azure provider's `service` is `azure-foundry`.
        - AIGatewayTargetBasetenConfig: Baseten-specific configuration for a model. Requests are sent to Baseten Model APIs at `https://inference.baseten.co/v1` by default, and the target `name` is the Baseten model slug (for example, `deepseek-ai/DeepSeek-V4-Pro-0813`). To route to a dedicated Baseten deployment, set `upstream_url` to the deployment's full OpenAI-compatible endpoint (for example, `https://model-{model_id}.api.baseten.co/environments/{environment}/sync/v1/chat/completions`) or use passthrough format. **Requires a minimum runtime version of `2.3`**.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'baseten', required
        - AIGatewayTargetBedrockConfig: AWS Bedrock-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'bedrock', required
          - `region` string: The AWS region for the model. Setting this option overrides the AWS_REGION environment variable.
          - `batch_bucket_prefix` string: S3 bucket prefix for batch inference jobs.
          - `embeddings_normalize` boolean: Whether to normalize embedding vectors in the response.
          - `performance_config_latency` string: Latency performance configuration for the model invocation.
          - `video_output_s3_uri` string: S3 URI for storing video generation outputs.
          - `vpc_endpoint` string: Hostname of an AWS PrivateLink VPC endpoint to use instead of the public Bedrock endpoint. Ignored if `upstream_url` is set. **Requires a minimum runtime version of `2.3`**.
          - `endpoint_type` 'runtime' | 'mantle': The AWS Bedrock inference endpoint that requests to this target are sent to. `runtime` sends requests to the Bedrock Runtime endpoint (`bedrock-runtime.{region}.amazonaws.com`). `mantle` sends requests to the Bedrock Mantle endpoint (`bedrock-mantle.{region}.api.aws`), which accepts OpenAI and Anthropic request formats natively. A target with `endpoint_type` set to `mantle` is rejected if its model includes a format with `type` set to `bedrock`, because the Mantle endpoint does not support the Bedrock Converse or InvokeModel APIs. **Requires a minimum runtime version of `2.3`**.
        - AIGatewayTargetCerebrasConfig: Cerebras-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'cerebras', required
        - AIGatewayTargetCohereConfig: Cohere-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'cohere', required
          - `api_version` 'v1' | 'v2': Cohere API version. `v1` uses the legacy `/v1/chat` endpoint; `v2` (default) uses `/v2/chat` and supports tool calling.
          - `embedding_input_type` 'classification' | 'clustering' | 'image' | 'search_document' | 'search_query': The intended downstream use of the embeddings to improve model quality.
          - `wait_for_model` boolean: Whether to wait for the model to be ready before sending the request.
        - AIGatewayTargetDashscopeConfig: Alibaba DashScope-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'dashscope', required
          - `international` boolean: Whether to use the international DashScope endpoint.
        - AIGatewayTargetDatabricksConfig: Databricks-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'databricks', required
          - `workspace_instance_id` string, required: The Databricks workspace instance ID.
        - AIGatewayTargetDeepseekConfig: Deepseek-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'deepseek', required
        - AIGatewayTargetGeminiConfig: Google Gemini-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'gemini', required
          - `gcp_environment` GCPModelConfig: Configuration for a model hosted on Google Cloud Project.
            - `api_endpoint` string, required: The custom API endpoint for the Gemini model.
            - `location_id` string, required: The Google Cloud location ID for the model endpoint.
            - `project_id` string, required: The Google Cloud project ID for the model endpoint.
        - AIGatewayTargetHuggingfaceConfig: Hugging Face-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'huggingface', required
          - `use_cache` boolean: Whether to use the Hugging Face inference cache.
          - `wait_for_model` boolean: Whether to wait for the model to load if it is not ready.
        - AIGatewayTargetKimiConfig: Kimi (Moonshot AI)-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'kimi', required
          - `international` boolean: When `true`, requests are sent to `api.moonshot.ai` (international). When `false`, requests are sent to `api.moonshot.cn` (mainland China).
        - AIGatewayTargetLlama2Config: Llama2-specific configuration for a model. Deprecated: the `llama2` provider is deprecated and will be removed in 3.0. Migrate by the `format` value: `ollama` maps to the `ollama` provider, `openai` maps to the `openai` provider with `upstream_url` set, or to the `vllm` provider; `raw` has no replacement provider.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri, required: The upstream URL for the model endpoint.
          - `type` 'llama2', required
          - `format` 'ollama' | 'openai' | 'raw', required: The request format to use when communicating with the Llama2 model.
        - AIGatewayTargetMistralConfig: Mistral-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'mistral', required
          - `format` 'ollama' | 'openai', required: The request format to use when communicating with the Mistral model.
        - AIGatewayTargetOllamaConfig: Ollama-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'ollama', required
        - AIGatewayTargetOpenaiConfig: Openai-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'openai', required
        - AIGatewayTargetVercelConfig: Vercel AI Gateway-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'vercel', required
        - AIGatewayTargetVllmConfig: Vllm-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri, required: The upstream URL for the model endpoint.
          - `type` 'vllm', required
        - AIGatewayTargetXaiConfig: Xai-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'xai', required
        - AIGatewayTargetSagemakerConfig: AWS SageMaker-specific configuration for a model.
          - `embeddings_dimensions` integer: The number of dimensions for embedding outputs.
          - `max_tokens` integer: The maximum number of tokens to generate in the response.
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `cache_read_cost` number: Cost per 1M cache-read (cached) prompt tokens for billing and cost tracking.
          - `cache_write_cost` number: Cost per 1M cache-write prompt tokens for billing and cost tracking.
          - `input_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `input_cost`, in cost per 1M prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `output_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `output_cost`, in cost per 1M output tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_read_cost_list` AIGatewayModalCostList[], nullable: Per-modality override of `cache_read_cost`, in cost per 1M cache-read prompt tokens. Set it for models that price each modality separately. **Requires a minimum runtime version of `2.1`**.
            - `modal` 'text' | 'audio' | 'image' | 'video', required: The modal type this price applies to.
            - `cost` number, required: Cost per 1M tokens for this modal type.
          - `cache_write_cost_list` AIGatewayCacheWriteCost[]: Per-cache-TTL cache-write pricing; overrides cache_write_cost per TTL. Configure this when the upstream provider charges differently for different cache TTLs.
            - `ttl` string, required: Cache TTL this price applies to, e.g. "5m" or "1h".
            - `cost` number, required: Cost per 1M cache-write prompt tokens for this TTL.
          - `context_window_factor` AIGatewayContextWindowFactor[]: Above an input-token threshold, scale input and output pricing by the corresponding factor.
            - `above` string, required: Input-token threshold above which the factors apply, e.g. "128k" or "1m".
            - `input_factor` number, required: Multiplier applied to input pricing above the threshold.
            - `output_factor` number, required: Multiplier applied to output pricing above the threshold.
          - `service_tier_factor` AIGatewayServiceTierFactor[]: Multiplier applied to the whole request for a service tier. The default factor is 1.0 when no tier matches.
            - `tier` string, required: Matched case-insensitively as a substring of the vendor's reported service tier (e.g. "priority", "flex", "throughput"). When more than one entry matches, the longest (most specific) tier wins; array order does not matter.
            - `factor` number, required: Multiplier applied to the whole request for this service tier.
          - `temperature` number: Controls randomness in the model output. Higher values produce more varied responses.
          - `top_k` integer: Limits the number of highest-probability tokens considered during generation.
          - `top_p` number: Nucleus sampling probability mass. Tokens with cumulative probability up to top_p are considered.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
          - `type` 'sagemaker', required
          - `aws` object, nullable
            - `region` string, nullable: Overrides the AWS_REGION environment variable for SageMaker requests.
            - `assume_role_arn` string, nullable: Assume a different IAM role after authenticating; mutually required with role_session_name.
            - `role_session_name` string, nullable: Session identifier for the assumed role; mutually required with assume_role_arn.
            - `sts_endpoint_url` string, nullable: Overrides the STS endpoint when assuming a role.
          - `target` object, nullable
            - `model` string, nullable: Sets the X-Amzn-SageMaker-Target-Model header (multi-model endpoints).
            - `variant` string, nullable: Sets the X-Amzn-SageMaker-Target-Variant header (A/B variant testing).
            - `container_hostname` string, nullable: Sets the X-Amzn-SageMaker-Target-Container-Hostname header (multi-container).
        - AIGatewayTargetTypesafeConfig: Typesafe-specific configuration for a model. **Requires a minimum runtime version of `2.2`**.
          - `type` 'typesafe', required
          - `input_cost` number: Cost per 1M input tokens for billing and cost tracking.
          - `output_cost` number: Cost per 1M output tokens for billing and cost tracking.
          - `upstream_url` string, uri: The upstream URL for the model endpoint.
    - `policies` string[]: List of policy references.
    - `labels` PublicLabels: Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store **PUBLIC** metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `managed_by` ManagedBy: Stores information about what manages this entity, such as the tool or system responsible for its lifecycle (for example, `terraform`). Keys must be 1–63 characters long, start and end with an alphanumeric character, and may contain dashes (`-`), underscores (`_`), and dots (`.`). Values must be 1–127 characters long and must not be empty. Keys and values must not contain spaces or control characters.
    - `datastores` AIGatewayModelDatastoreRef[]: The Datastores this model references, with the feature that uses each one.
      - `name` string, required: An immutable user-defined identifier for this resource.
      - `purpose` 'semantic-balancer': The model feature that uses the datastore. `semantic-balancer` supplies the connection of the model vector store.
    - `type` 'model', required
    - `config` AIGatewayModelModelConfig, required: Routing, logging, and load balancing configuration for the model.
      - `route` AIGatewayModelRouteConfig, required: Configuration for an AI Gateway route.
        - `headers` object: One or more lists of values indexed by header name that will cause this route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression.
        - `hosts` string[]: A list of domain names that match this route. Note that the hosts value is case sensitive.
        - `https_redirect_status_code` integer: The status code Kong responds with when all properties of a route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the route is configured to only accept the `https` protocol.
        - `methods` string[]: A list of HTTP methods that match this route.
        - `paths` string[]: A list of paths that match this route.
        - `preserve_host` boolean: When matching a route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the service's `host`.
        - `protocols` string[]: An array of the protocols this route should allow. See the [route Object](#route-object) section for a list of accepted protocols. When set to only `https`, HTTP requests are answered with an upgrade error. When set to only `http`, HTTPS requests are answered with an error.
        - `regex_priority` integer: A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones).
        - `request_buffering` boolean: Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.
        - `response_buffering` boolean: Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.
        - `strip_path` boolean: When matching a route via one of the `paths`, strip the matching prefix from the upstream request URL.
        - `tags` string[]: An optional set of strings associated with the route for grouping and filtering.
        - `model` AIGatewayModelSelectorConfig: Configuration for overriding routing to this model using a selector. When no selector location is set, the format default selector is used. When values are not set, the model name is used as the selector value.
          - `body_param` string: The body property name to match for routing.
          - `header_param` string: The header property name to match for routing.
          - `path_param` string: The name of the regex capture group defined in the route path for routing.
          - `values` string[]: Optional model aliases. When omitted, the model name is used. When no selector location is configured, the format default selector is used.
      - `logging` AIGatewayLoggingConfig: Configuration for AI Gateway logging.
        - `payloads` boolean
      - `response_streaming` 'allow' | 'always' | 'deny'
      - `max_request_body_size` integer: The maximum size, in bytes, of a request body that the gateway reads and sends to the model. A request with a larger body fails. Set to 0 for no limit. If you do not set a value, the gateway uses the request size limit that the model's providers publish, with defaults to 8 MB. If the targets use more than one provider, the gateway uses the highest of these limits.
      - `model` object
        - `name_header` boolean: Display the model name selected in the X-Kong-LLM-Model response header
      - `balancer` union: Configuration for a model's load balancer when multiple target models are configured.
        - AIGatewayModelBalancerConsistentHashingConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'consistent-hashing', required
          - `hash_on_header` string: The header to use for consistent-hashing.
        - AIGatewayModelBalancerLeastConnectionsConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'least-connections', required
        - AIGatewayModelBalancerLowestLatencyConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'lowest-latency', required
          - `latency_strategy` 'e2e' | 'tpot', required: What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.
        - AIGatewayModelBalancerLowestUsageConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'lowest-usage', required
          - `tokens_count_strategy` 'completion-tokens' | 'cost' | 'llm-accuracy' | 'prompt-tokens' | 'total-tokens', required: Methodology to use for token usage calculation.
        - AIGatewayModelBalancerPriorityConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'priority', required
        - AIGatewayModelBalancerRoundRobinConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'round-robin', required
        - AIGatewayModelBalancerSemanticConfig
          - `connect_timeout` integer
          - `fail_timeout` integer: The period of time (in milliseconds) the target will be considered unavailable after the number of unsuccessful attempts reaches `max_fails`.
          - `failover_criteria` string[]: Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
          - `max_fails` integer: Number of unsuccessful attempts to communicate with a target that should occur in the duration defined by `fail_timeout` before the target is considered unavailable. The zero value disables the circuit breaker. What is considered an unsuccessful attempt is defined by `failover_criteria`. Note the cases of `error`, `timeout` and `invalid_header` are always considered unsuccessful attempts, while the cases of `http_403` and `http_404` are never considered unsuccessful attempts.
          - `read_timeout` integer
          - `retries` integer: The number of retries to execute upon failure to proxy.
          - `slots` integer: The number of slots in the load balancer algorithm.
          - `write_timeout` integer
          - `algorithm` 'semantic', required
          - `embeddings` object, required: Embeddings model configuration for this model.
            - `allow_auth_override` boolean: When enabled, request-level auth parameters (such as API keys or bearer tokens) will override the static values defined for the provider.
            - `provider` string, required: Reference to a model provider instance by name.
            - `name` string, required: The name of the embeddings model.
            - `config` union, required: Configuration for an embeddings model.
              - …
          - `vectordb` union, required: Configuration for the vector database used by the model.
            - AIGatewayModelVectorDBConfigPgVector
              - …
            - AIGatewayModelVectorDBConfigRedis: Config for connecting to a Cloud Provider's Redis instance.
              - …
      - `proxy` AIGatewayProxyConfig: HTTP/HTTPS proxy configuration for outbound requests to the upstream AI provider.
        - `http_proxy` object, nullable: HTTP proxy server to route plaintext outbound requests through.
          - `host` string, nullable: A string representing a host name, such as example.com.
          - `port` integer, nullable: An integer representing a port number between 0 and 65535, inclusive.
        - `https_proxy` object, nullable: HTTPS proxy server to route TLS outbound requests through.
          - `host` string, nullable: A string representing a host name, such as example.com.
          - `port` integer, nullable: An integer representing a port number between 0 and 65535, inclusive.
        - `proxy_scheme` 'http': The proxy scheme to use when connecting to the proxy server.
        - `auth` object, nullable: Credentials used to authenticate to the proxy server.
          - `username` string, nullable: The username to use for proxy authentication. This field is [referenceable](https://developer.konghq.com/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          - `password` string, nullable: The password to use for proxy authentication. This field is [referenceable](https://developer.konghq.com/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
        - `no_proxy` string, nullable: Comma-separated list of hosts that should not be proxied.
    - `capabilities` string[], required: The capabilities this model supports. Set to a specific capability to restrict the model to that capability only, or to `*` to allow all capabilities that the targets support at the gateway's min_runtime_version. A capability that needs a newer min_runtime_version is left out of `*`.

## Response `200`

Model updated successfully.

- union: Configuration for an AI Gateway model.
  - intersection
    - object
      - `id` string, uuid, required: Contains a unique identifier used for this resource.
      - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
      - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - [`AIGatewayModelAPI`](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea/schema?at=%2Fcomponents%2Fschemas%2FAIGatewayModelAPI)
  - intersection
    - object
      - `id` string, uuid, required: Contains a unique identifier used for this resource.
      - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
      - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - [`AIGatewayModelModel`](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea/schema?at=%2Fcomponents%2Fschemas%2FAIGatewayModelModel)

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests

## Changes

- **2026-11-25** `7b12799d6a39`: 8 info
  - the `max_request_body_size` request property default value `8388608` was removed
  - the `max_request_body_size` request property default value `8388608` was removed
  - request property `oneOf[#/components/schemas/AIGatewayModelAPI]/targets/items/config/oneOf[#/components/schemas/AIGatewayTargetLlama2Config]/` deprecated
  - request property `oneOf[#/components/schemas/AIGatewayModelModel]/targets/items/config/oneOf[#/components/schemas/AIGatewayTargetLlama2Config]/` deprecated
  - …4 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/kong/apis/konnect-api/changes/v1/ai-gateways/:gatewayId/models/:modelIdOrName/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api/revisions/5da43f6209ea?raw)
