---
title: "Update an AI Gateway Model"
url: "https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3/operations/update-ai-gateway-model"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3.md

# Update an AI Gateway Model

`PUT` `/ai-gateways/{gatewayId}/models/{modelId}`

Operation ID: `update-ai-gateway-model`

Updates the configuration of an existing AI Gateway model.

## Path parameters

- `gatewayId` (string, uuid, required) - The unique ID of the AI Gateway.
- `modelId` (string, uuid, required) - The unique ID of the AI Gateway model.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Model updated successfully.
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `429` - Too Many Requests

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect AI Gateway
  version: 0.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
paths:
  /ai-gateways/{gatewayId}/models/{modelId}:
    parameters:
      - $ref: "#/components/parameters/AIGatewayId"
      - $ref: "#/components/parameters/AIGatewayModelId"
    put:
      operationId: update-ai-gateway-model
      summary: Update an AI Gateway Model
      description: Updates the configuration of an existing AI Gateway model.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAIGatewayModelRequest"
      responses:
        "200":
          $ref: "#/components/responses/UpdateAIGatewayModelResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
      tags:
        - AI Gateway Models
security:
  - konnectAccessToken: []
components:
  parameters:
    AIGatewayId:
      name: gatewayId
      in: path
      required: true
      description: The unique ID of the AI Gateway.
      example: bf138ba2-c9b1-4229-b268-04d9d8a6410b
      schema:
        $ref: "#/components/schemas/UUID"
    AIGatewayModelId:
      name: modelId
      in: path
      required: true
      description: The unique ID of the AI Gateway model.
      example: bf138ba2-c9b1-4229-b268-04d9d8a6410b
      schema:
        $ref: "#/components/schemas/UUID"
  schemas:
    UpdateAIGatewayModelRequest:
      description: Configuration for an AI Gateway model.
      discriminator:
        propertyName: type
        mapping:
          model: "#/components/schemas/AIGatewayModelModel"
          api: "#/components/schemas/AIGatewayModelAPI"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayModelModel"
        - $ref: "#/components/schemas/AIGatewayModelAPI"
    UUID:
      description: Contains a unique identifier used for this resource.
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
      readOnly: true
    AIGatewayModelModel:
      type: object
      properties:
        display_name:
          description: The display name for this policy instance.
          type: string
          example: My GPT 5 model
        ref:
          description: A user-defined unique identifier for this model, used as a stable
            human-readable reference.
          type: string
          example: my-gpt-5-model
        enabled:
          description: Whether the model is enabled.
          type: boolean
          example: true
          default: true
        acls:
          description: Access control rules for allowing or denying consumer groups access
            to this model.
          allOf:
            - $ref: "#/components/schemas/AIGatewayACLS"
        config:
          $ref: "#/components/schemas/AIGatewayModelConfig"
        formats:
          description: List of request/response formats supported by this model. Defaults
            to OpenAI format.
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayModelFormat"
        target_models:
          description: One or more backend models that this model entry routes to.
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayTargetModel"
        policies:
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayPolicyReference"
        labels:
          $ref: "#/components/schemas/PublicLabels"
        managed_by:
          $ref: "#/components/schemas/AIGatewayManagedBy"
        type:
          type: string
          enum:
            - model
        capabilities:
          description: List of AI capabilities enabled for this model.
          type: array
          items:
            type: string
            enum:
              - chat
              - embeddings
              - assistants
              - responses
              - audio-transcriptions
              - audio-translations
              - image-generation
              - image-edits
              - video-generations
              - realtime
      additionalProperties: false
      required:
        - display_name
        - ref
        - formats
        - acls
        - config
        - target_models
        - policies
        - type
        - capabilities
    AIGatewayModelAPI:
      type: object
      properties:
        display_name:
          description: The display name for this policy instance.
          type: string
          example: My GPT 5 model
        ref:
          description: A user-defined unique identifier for this model, used as a stable
            human-readable reference.
          type: string
          example: my-gpt-5-model
        enabled:
          description: Whether the model is enabled.
          type: boolean
          example: true
          default: true
        acls:
          description: Access control rules for allowing or denying consumer groups access
            to this model.
          allOf:
            - $ref: "#/components/schemas/AIGatewayACLS"
        config:
          $ref: "#/components/schemas/AIGatewayModelConfig"
        formats:
          description: List of request/response formats supported by this model. Defaults
            to OpenAI format.
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayModelFormat"
        target_models:
          description: One or more backend models that this model entry routes to.
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayTargetModel"
        policies:
          type: array
          items:
            $ref: "#/components/schemas/AIGatewayPolicyReference"
        labels:
          $ref: "#/components/schemas/PublicLabels"
        managed_by:
          $ref: "#/components/schemas/AIGatewayManagedBy"
        type:
          type: string
          enum:
            - api
        capabilities:
          description: List of AI capabilities enabled for this API model.
          type: array
          items:
            type: string
            enum:
              - batches
              - files
      additionalProperties: false
      required:
        - display_name
        - ref
        - formats
        - acls
        - config
        - target_models
        - policies
        - type
        - capabilities
    AIGatewayModel:
      description: Configuration for an AI Gateway model.
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
      additionalProperties: false
      discriminator:
        propertyName: type
        mapping:
          model: "#/components/schemas/AIGatewayModelModel"
          api: "#/components/schemas/AIGatewayModelAPI"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayModelModel"
        - $ref: "#/components/schemas/AIGatewayModelAPI"
      required:
        - id
        - created_at
        - updated_at
    BadRequestError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          required:
            - invalid_parameters
          properties:
            invalid_parameters:
              $ref: "#/components/schemas/InvalidParameters"
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    TooManyRequestsError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 429
            title:
              example: Too Many Requests
            type:
              example: https://httpstatuses.com/429
            instance:
              example: kong:trace:1234567890
            detail:
              example: Too Many Requests
    AIGatewayACLS:
      type: object
      properties:
        allow:
          description: List of consumer group names permitted access.
          type: array
          items:
            type: string
        deny:
          description: List of consumer group names denied access.
          type: array
          items:
            type: string
      additionalProperties: false
      required:
        - allow
        - deny
    AIGatewayModelConfig:
      description: Routing, logging, and load balancing configuration for the model.
      type: object
      properties:
        route:
          $ref: "#/components/schemas/AIGatewayRouteConfig"
        logging:
          $ref: "#/components/schemas/AIGatewayLoggingConfig"
        response_streaming:
          type: string
          default: allow
          enum:
            - allow
            - always
            - deny
        max_request_body_size:
          type: integer
          default: 1048576
        model:
          type: object
          additionalProperties: false
          properties:
            alias:
              description: An optional alias for the model, used to select the target virtual
                model when passed in the "model" parameter of the request body.
              type: string
            name_header:
              description: Display the model name selected in the X-Kong-LLM-Model response
                header
              type: boolean
          required:
            - name_header
        balancer:
          description: Load balancing strategy when multiple target models are configured.
          type: object
          additionalProperties: false
          properties:
            algorithm:
              description: Which load balancing algorithm to use.
              type: string
              default: round-robin
              enum:
                - consistent-hashing
                - least-connections
                - lowest-latency
                - lowest-usage
                - priority
                - round-robin
                - semantic
            connect_timeout:
              type: integer
              default: 60000
              maximum: 2147483646
              minimum: 1
            embeddings:
              description: Embeddings model configuration for this model.
              type: object
              additionalProperties: false
              properties:
                provider:
                  $ref: "#/components/schemas/AIGatewayProviderReference"
                name:
                  description: The name of the embeddings model.
                  type: string
                config:
                  $ref: "#/components/schemas/AIGatewayEmbeddingsModelConfig"
              required:
                - name
                - provider
            fail_timeout:
              description: The period of time (in milliseconds) the target will be considered
                unavailable after the number of unsuccessful attempts reaches
                `max_fails`.
              type: integer
              default: 10000
              maximum: 2147483646
              minimum: 1
            failover_criteria:
              description: 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
              type: array
              items:
                type: string
                enum:
                  - error
                  - http_403
                  - http_404
                  - http_429
                  - http_500
                  - http_502
                  - http_503
                  - http_504
                  - invalid_header
                  - non_idempotent
                  - timeout
              default:
                - error
                - timeout
            hash_on_header:
              description: The header to use for consistent-hashing.
              type: string
              default: X-Kong-LLM-Request-ID
            latency_strategy:
              description: "What metrics to use for latency. Available values are: `tpot`
                (time-per-output-token) and `e2e`."
              type: string
              default: tpot
              enum:
                - e2e
                - tpot
            max_fails:
              description: 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.
              type: integer
              default: 0
              maximum: 32767
              minimum: 0
            read_timeout:
              type: integer
              default: 60000
              maximum: 2147483646
              minimum: 1
            retries:
              description: The number of retries to execute upon failure to proxy.
              type: integer
              default: 5
              maximum: 32767
              minimum: 0
            slots:
              description: The number of slots in the load balancer algorithm.
              type: integer
              default: 10000
              maximum: 65536
              minimum: 10
            tokens_count_strategy:
              description: "What tokens to use for usage calculation. Available values are:
                `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`."
              type: string
              default: total-tokens
              enum:
                - completion-tokens
                - cost
                - llm-accuracy
                - prompt-tokens
                - total-tokens
            vectordb:
              $ref: "#/components/schemas/AIGatewayModelVectorDBConfig"
            write_timeout:
              type: integer
              default: 60000
              maximum: 2147483646
              minimum: 1
          required:
            - algorithm
            - connect_timeout
            - fail_timeout
            - failover_criteria
            - hash_on_header
            - latency_strategy
            - max_fails
            - read_timeout
            - retries
            - slots
            - tokens_count_strategy
            - vectordb
            - write_timeout
      additionalProperties: false
      required:
        - route
        - logging
        - model
        - response_streaming
        - max_request_body_size
    AIGatewayModelFormat:
      description: Request and response format supported by this model.
      type: object
      properties:
        type:
          description: The format type.
          type: string
          example: openai
      additionalProperties: false
    AIGatewayTargetModel:
      description: A target model instance that this model entry routes requests to.
      type: object
      properties:
        name:
          description: The name of the model defined in the upstream provider that will be
            executed.
          type: string
          example: gpt-5-model
        provider:
          $ref: "#/components/schemas/AIGatewayProviderReference"
        config:
          $ref: "#/components/schemas/AIGatewayTargetModelConfig"
      additionalProperties: false
      required:
        - name
        - provider
    AIGatewayPolicyReference:
      description: Lightweight object used to reference a policy instance, identified
        by its `ref`.
      type: object
      properties:
        ref:
          description: The user-defined unique identifier for a policy instance.
          type: string
          example: ai-pii-sanitizer-1234
      additionalProperties: false
      required:
        - ref
    PublicLabels:
      description: >
        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 "_".
      type: object
      example:
        category: finance
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
      maxProperties: 50
      title: PublicLabels
    AIGatewayManagedBy:
      description: >
        Indicates the managing entities for a resource. A maximum of 5 keys is
        allowed.


        Keys must be 63 characters or less, starting and ending with an
        alphanumeric character,

        and may include dashes (-), underscores (_), and dots (.).


        Values must be non-empty strings of 127 characters or less.


        Keys and values must not contain spaces or control characters, and are
        case-insensitive.
      type: object
      example:
        team: platform
        owner: kong
      additionalProperties:
        type: string
        minLength: 1
        maxLength: 127
      maxProperties: 5
      nullable: true
    CreatedAt:
      description: An ISO-8601 timestamp representation of entity creation date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    UpdatedAt:
      description: An ISO-8601 timestamp representation of entity update date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    InvalidParameters:
      description: invalid parameters
      type: array
      items:
        oneOf:
          - $ref: "#/components/schemas/InvalidParameterStandard"
          - $ref: "#/components/schemas/InvalidParameterMinimumLength"
          - $ref: "#/components/schemas/InvalidParameterMaximumLength"
          - $ref: "#/components/schemas/InvalidParameterChoiceItem"
          - $ref: "#/components/schemas/InvalidParameterDependentItem"
      minItems: 1
      nullable: false
      uniqueItems: true
    AIGatewayRouteConfig:
      description: Configuration for an AI Gateway route.
      type: object
      properties:
        destinations:
          description: A list of IP destinations of incoming connections that match this
            route when using stream routing. Each entry is an object with fields
            ip (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties:
              ip:
                type: string
              port:
                type: integer
            example:
              ip: 10.1.0.0/16
              port: 1234
        headers:
          description: "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."
          type: object
          example:
            version:
              - v1
              - v2
          additionalProperties: true
        hosts:
          description: A list of domain names that match this route. Note that the hosts
            value is case sensitive.
          type: array
          items:
            type: string
            example: foo.example.com
        https_redirect_status_code:
          description: "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."
          type: integer
          default: 426
        id:
          type: string
          example: 56c4566c-14cc-4132-9011-4139fcbbe50a
        methods:
          description: A list of HTTP methods that match this route.
          type: array
          items:
            type: string
        name:
          description: The name of the route. Route names must be unique, and they are
            case sensitive. For example, there can be two different routes named
            test and Test.
          type: string
        path_handling:
          description: Controls how the service path, route path and requested path are
            combined when sending a request to the upstream. See above for a
            detailed description of each behavior.
          type: string
          default: v0
        paths:
          description: A list of paths that match this route.
          type: array
          items:
            type: string
        preserve_host:
          description: 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`.
          type: boolean
          default: false
        protocols:
          description: 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.
          type: array
          items:
            type: string
          default:
            - http
            - https
        regex_priority:
          description: 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).
          type: integer
          default: 0
        request_buffering:
          description: 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.
          type: boolean
          default: true
        response_buffering:
          description: 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.
          type: boolean
          default: true
        service:
          description: The service this route is associated to. This is where the route
            proxies traffic to.
          type: object
          additionalProperties: false
          properties:
            id:
              type: string
        snis:
          description: A list of SNIs that match this route when using stream routing.
          type: array
          items:
            type: string
        sources:
          description: A list of IP sources of incoming connections that match this route
            when using stream routing. Each entry is an object with fields ip
            (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties:
              ip:
                type: string
              port:
                type: integer
            example:
              ip: 10.1.0.0/16
              port: 1234
        strip_path:
          description: When matching a route via one of the `paths`, strip the matching
            prefix from the upstream request URL.
          type: boolean
          default: true
        tags:
          description: An optional set of strings associated with the route for grouping
            and filtering.
          type: array
          items:
            type: string
      additionalProperties: false
    AIGatewayLoggingConfig:
      description: Configuration for AI Gateway logging.
      type: object
      properties:
        payloads:
          type: boolean
          default: false
        statistics:
          type: boolean
          default: false
      additionalProperties: false
      required:
        - payloads
        - statistics
    AIGatewayProviderReference:
      description: Lightweight object used to reference a provider instance,
        identified by its `ref`.
      type: object
      properties:
        ref:
          description: The user-defined unique identifier for a provider instance.
          type: string
          example: azure-ai-se
      additionalProperties: false
      required:
        - ref
    AIGatewayEmbeddingsModelConfig:
      description: Configuration for an embeddings model.
      discriminator:
        propertyName: type
        mapping:
          azure: "#/components/schemas/AIGatewayAzureEmbeddingsModelConfig"
          bedrock: "#/components/schemas/AIGatewayBedrockEmbeddingsModelConfig"
          gemini: "#/components/schemas/AIGatewayGeminiEmbeddingsModelConfig"
          huggingface: "#/components/schemas/AIGatewayHuggingfaceEmbeddingsModelConfig"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayAzureEmbeddingsModelConfig"
        - $ref: "#/components/schemas/AIGatewayBedrockEmbeddingsModelConfig"
        - $ref: "#/components/schemas/AIGatewayGeminiEmbeddingsModelConfig"
        - $ref: "#/components/schemas/AIGatewayHuggingfaceEmbeddingsModelConfig"
    AIGatewayModelVectorDBConfig:
      description: Configuration for the vector database used by the model.
      discriminator:
        propertyName: strategy
        mapping:
          pgvector: "#/components/schemas/AIGatewayModelVectorDBConfigPgVector"
          redis: "#/components/schemas/AIGatewayModelVectorDBConfigRedis"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayModelVectorDBConfigPgVector"
        - $ref: "#/components/schemas/AIGatewayModelVectorDBConfigRedis"
    AIGatewayTargetModelConfig:
      description: Configuration for a target model.
      discriminator:
        propertyName: type
        mapping:
          anthropic: "#/components/schemas/AIGatewayTargetModelAnthropicConfig"
          azure: "#/components/schemas/AIGatewayTargetModelAzureConfig"
          bedrock: "#/components/schemas/AIGatewayTargetModelBedrockConfig"
          cohere: "#/components/schemas/AIGatewayTargetModelCohereConfig"
          dashscope: "#/components/schemas/AIGatewayTargetModelDashscopeConfig"
          databricks: "#/components/schemas/AIGatewayTargetModelDatabricksConfig"
          gemini: "#/components/schemas/AIGatewayTargetModelGeminiConfig"
          huggingface: "#/components/schemas/AIGatewayTargetModelHuggingfaceConfig"
          llama2: "#/components/schemas/AIGatewayTargetModelLlama2Config"
          mistral: "#/components/schemas/AIGatewayTargetModelMistralConfig"
      oneOf:
        - $ref: "#/components/schemas/AIGatewayTargetModelAnthropicConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelAzureConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelBedrockConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelCohereConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelDashscopeConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelDatabricksConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelGeminiConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelHuggingfaceConfig"
        - $ref: "#/components/schemas/AIGatewayTargetModelLlama2Config"
        - $ref: "#/components/schemas/AIGatewayTargetModelMistralConfig"
    InvalidParameterStandard:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          $ref: "#/components/schemas/InvalidRules"
        source:
          type: string
          example: body
        reason:
          type: string
          example: is a required field
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
    InvalidParameterMinimumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - min_length
            - min_digits
            - min_lowercase
            - min_uppercase
            - min_symbols
            - min_items
            - min
          nullable: false
          readOnly: true
        minimum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must have at least 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - minimum
    InvalidParameterMaximumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - max_length
            - max_items
            - max
          nullable: false
          readOnly: true
        maximum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must not have more than 8 characters
          readOnly: true
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - maximum
    InvalidParameterChoiceItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - enum
          nullable: false
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        choices:
          type: array
          items: {}
          minItems: 1
          nullable: false
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - reason
        - rule
        - choices
    InvalidParameterDependentItem:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
            - dependent_fields
          nullable: true
          readOnly: true
        reason:
          type: string
          example: is a required field
          readOnly: true
        dependents:
          type: array
          items: {}
          nullable: true
          readOnly: true
          uniqueItems: true
        source:
          type: string
          example: body
      additionalProperties: false
      required:
        - field
        - rule
        - reason
        - dependents
    AIGatewayAzureEmbeddingsModelConfig:
      description: Azure-specific configuration for a model.
      type: object
      properties:
        name:
          description: The name of the embeddings model.
          type: string
        upstream_url:
          description: The URL of the embeddings model.
          type: string
        type:
          type: string
          enum:
            - azure
        deployment_id:
          description: The Azure deployment ID for the model.
          type: string
        api_version:
          description: The Azure OpenAI API version to use.
          type: string
          default: 2023-05-15
      additionalProperties: false
      required:
        - name
        - upstream_url
        - type
    AIGatewayBedrockEmbeddingsModelConfig:
      description: AWS Bedrock-specific configuration for a model.
      type: object
      properties:
        name:
          description: The name of the embeddings model.
          type: string
        upstream_url:
          description: The URL of the embeddings model.
          type: string
        type:
          type: string
          enum:
            - bedrock
        batch_bucket_prefix:
          description: S3 bucket prefix for batch inference jobs.
          type: string
        embeddings_normalize:
          description: Whether to normalize embedding vectors in the response.
          type: boolean
          default: false
        performance_config_latency:
          description: Latency performance configuration for the model invocation.
          type: string
        video_output_s3_uri:
          description: S3 URI for storing video generation outputs.
          type: string
      additionalProperties: false
      required:
        - name
        - upstream_url
        - type
    AIGatewayGeminiEmbeddingsModelConfig:
      description: Google Gemini-specific configuration for a model.
      type: object
      properties:
        name:
          description: The name of the embeddings model.
          type: string
        upstream_url:
          description: The URL of the embeddings model.
          type: string
        type:
          type: string
          enum:
            - gemini
        location_id:
          description: The Google Cloud location ID for the model endpoint.
          type: string
        api_endpoint:
          description: The custom API endpoint for the Gemini model.
          type: string
      additionalProperties: false
      required:
        - name
        - upstream_url
        - type
    AIGatewayHuggingfaceEmbeddingsModelConfig:
      description: Hugging Face-specific configuration for a model.
      type: object
      properties:
        name:
          description: The name of the embeddings model.
          type: string
        upstream_url:
          description: The URL of the embeddings model.
          type: string
        type:
          type: string
          enum:
            - huggingface
        use_cache:
          description: Whether to use the Hugging Face inference cache.
          type: boolean
          default: false
        wait_for_model:
          description: Whether to wait for the model to load if it is not ready.
          type: boolean
          default: false
      additionalProperties: false
      required:
        - name
        - upstream_url
        - type
    AIGatewayModelVectorDBConfigPgVector:
      type: object
      properties:
        strategy:
          type: string
          enum:
            - pgvector
        dimensions:
          description: the desired dimensionality for the vectors
          type: integer
        distance_metric:
          description: the distance metric to use for vector searches
          type: string
          enum:
            - cosine
            - euclidean
        threshold:
          description: the default similarity threshold for accepting semantic search
            results (float). Higher threshold means more results are considered
            similar.
          type: number
        database:
          description: the database of the pgvector database
          type: string
          default: kong-pgvector
        host:
          description: the host of the pgvector database
          type: string
          default: 127.0.0.1
        password:
          description: |-
            the password of the pgvector database 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          writeOnly: true
          x-encrypted: true
          x-referenceable: true
        port:
          description: the port of the pgvector database
          type: integer
          default: 5432
        ssl:
          type: object
          additionalProperties: false
          properties:
            enabled:
              description: whether to use ssl for the pgvector database
              type: boolean
              default: false
            cert:
              description: the path of ssl cert to use for the pgvector database
              type: string
            cert_key:
              description: the path of ssl cert key to use for the pgvector database
              type: string
            required:
              description: whether ssl is required for the pgvector database
              type: boolean
              default: false
            verify:
              description: whether to verify ssl for the pgvector database
              type: boolean
              default: true
            version:
              description: the ssl version to use for the pgvector database
              type: string
              default: tlsv1_2
              enum:
                - any
                - tlsv1_2
                - tlsv1_3
        timeout:
          description: the timeout of the pgvector database
          type: number
          default: 5000
        user:
          description: |-
            the user of the pgvector database 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          default: postgres
          x-referenceable: true
      additionalProperties: false
      required:
        - strategy
        - dimensions
        - distance_metric
    AIGatewayModelVectorDBConfigRedis:
      description: Config for connecting to a Cloud Provider's Redis instance.
      type: object
      properties:
        strategy:
          type: string
          enum:
            - redis
        dimensions:
          description: the desired dimensionality for the vectors
          type: integer
        distance_metric:
          description: the distance metric to use for vector searches
          type: string
          enum:
            - cosine
            - euclidean
        threshold:
          description: the default similarity threshold for accepting semantic search
            results (float). Higher threshold means more results are considered
            similar.
          type: number
        cloud_authentication:
          description: Auth related config for connecting to a Cloud Provider's Redis
            instance.
          discriminator:
            propertyName: type
            mapping:
              aws: "#/components/schemas/AIGatewayRedisAWSAuthentication"
              azure: "#/components/schemas/AIGatewayRedisAzureAuthentication"
              gcp: "#/components/schemas/AIGatewayRedisGCPAuthentication"
          oneOf:
            - $ref: "#/components/schemas/AIGatewayRedisAWSAuthentication"
            - $ref: "#/components/schemas/AIGatewayRedisAzureAuthentication"
            - $ref: "#/components/schemas/AIGatewayRedisGCPAuthentication"
        cluster:
          description: Cluster configuration for the Redis connection.
          type: object
          additionalProperties: false
          properties:
            max_redirections:
              description: Maximum retry attempts for redirection.
              type: integer
              default: 5
            nodes:
              description: Cluster addresses to use for Redis connections when the `redis`
                strategy is defined. Defining this field implies using a Redis
                Cluster. The minimum length of the array is 1 element.
              type: array
              items:
                type: object
                properties:
                  ip:
                    description: A string representing a host name, such as example.com.
                    type: string
                    default: 127.0.0.1
                  port:
                    description: An integer representing a port number between 0 and 65535,
                      inclusive.
                    type: integer
                    default: 6379
                    maximum: 65535
                    minimum: 0
              minItems: 1
        connect_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        connection_is_proxied:
          description: If the connection to Redis is proxied (e.g. Envoy), set it `true`.
            Set the `host` and `port` to point to the proxy address.
          type: boolean
          default: false
        database:
          description: Database to use for the Redis connection when using the `redis`
            strategy
          type: integer
          default: 0
        host:
          description: |-
            A string representing a host name, such as example.com. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          default: 127.0.0.1
          x-referenceable: true
        keepalive:
          description: Keepalive configuration for the Redis connection.
          type: object
          additionalProperties: false
          properties:
            backlog:
              description: Limits the total number of opened connections for a pool. If the
                connection pool is full, connection queues above the limit go
                into the backlog queue. If the backlog queue is full, subsequent
                connect operations fail and return `nil`. Queued operations
                (subject to set timeouts) resume once the number of connections
                in the pool is less than `pool_size`. If latency is high or
                throughput is low, try increasing this value. Empirically, this
                value is larger than `pool_size`.
              type: integer
              maximum: 2147483646
              minimum: 0
            pool_size:
              description: The size limit for every cosocket connection pool associated with
                every remote server, per worker process. If neither `pool_size`
                nor `backlog` is specified, no pool is created. If `pool_size`
                isn't specified but `backlog` is specified, then the pool uses
                the default value. Try to increase (e.g. 512) this value if
                latency is high or throughput is low.
              type: integer
              default: 256
              maximum: 2147483646
              minimum: 1
        password:
          description: |-
            Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        port:
          description: |-
            An integer representing a port number between 0 and 65535, inclusive. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: integer
          default: 6379
          maximum: 65535
          minimum: 0
          x-referenceable: true
        read_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        send_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        sentinel:
          description: Configuration for Redis Sentinel.
          type: object
          additionalProperties: false
          properties:
            master:
              description: Sentinel master to use for Redis connections. Defining this value
                implies using Redis Sentinel.
              type: string
            nodes:
              description: Sentinel node addresses to use for Redis connections when the
                `redis` strategy is defined. Defining this field implies using a
                Redis Sentinel. The minimum length of the array is 1 element.
              type: array
              items:
                type: object
                properties:
                  host:
                    description: A string representing a host name, such as example.com.
                    type: string
                    default: 127.0.0.1
                  port:
                    description: An integer representing a port number between 0 and 65535,
                      inclusive.
                    type: integer
                    default: 6379
                    maximum: 65535
                    minimum: 0
              minItems: 1
            password:
              description: |-
                Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels. 
                This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
                This field is [encrypted](/gateway/keyring/).
              type: string
              x-encrypted: true
              x-referenceable: true
            role:
              description: Sentinel role to use for Redis connections when the `redis`
                strategy is defined. Defining this value implies using Redis
                Sentinel.
              type: string
              enum:
                - any
                - master
                - slave
            username:
              description: |-
                Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+. 
                This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
              type: string
              x-referenceable: true
        server_name:
          description: |-
            A string representing an SNI (server name indication) value for TLS. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        ssl:
          description: If set to true, uses SSL to connect to Redis.
          type: boolean
          default: false
        ssl_verify:
          description: If set to true, verifies the validity of the server SSL
            certificate. If setting this parameter, also configure
            `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or
            server) certificate used by your Redis server. You may also need to
            configure `lua_ssl_verify_depth` accordingly.
          type: boolean
          default: true
        username:
          description: |-
            Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
      additionalProperties: false
      required:
        - strategy
        - dimensions
        - distance_metric
    AIGatewayTargetModelAnthropicConfig:
      description: Anthropic-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - anthropic
        version:
          description: The Anthropic API version to use.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelAzureConfig:
      description: Azure-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - azure
        deployment_id:
          description: The Azure deployment ID for the model.
          type: string
        api_version:
          description: The Azure OpenAI API version to use.
          type: string
          default: 2023-05-15
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelBedrockConfig:
      description: AWS Bedrock-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - bedrock
        batch_bucket_prefix:
          description: S3 bucket prefix for batch inference jobs.
          type: string
        embeddings_normalize:
          description: Whether to normalize embedding vectors in the response.
          type: boolean
          default: false
        performance_config_latency:
          description: Latency performance configuration for the model invocation.
          type: string
        video_output_s3_uri:
          description: S3 URI for storing video generation outputs.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelCohereConfig:
      description: Cohere-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - cohere
        embedding_input_type:
          description: The intended downstream use of the embeddings to improve model
            quality.
          type: string
          default: classification
          enum:
            - classification
            - clustering
            - image
            - search_document
            - search_query
        wait_for_model:
          description: Whether to wait for the model to be ready before sending the request.
          type: boolean
          default: false
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelDashscopeConfig:
      description: Alibaba DashScope-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - dashscope
        international:
          description: Whether to use the international DashScope endpoint.
          type: boolean
          default: true
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelDatabricksConfig:
      description: Databricks-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - databricks
        workspace_instance_id:
          description: The Databricks workspace instance ID.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelGeminiConfig:
      description: Google Gemini-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - gemini
        location_id:
          description: The Google Cloud location ID for the model endpoint.
          type: string
        api_endpoint:
          description: The custom API endpoint for the Gemini model.
          type: string
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelHuggingfaceConfig:
      description: Hugging Face-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - huggingface
        use_cache:
          description: Whether to use the Hugging Face inference cache.
          type: boolean
          default: false
        wait_for_model:
          description: Whether to wait for the model to load if it is not ready.
          type: boolean
          default: false
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelLlama2Config:
      description: Llama2-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - llama2
        format:
          description: The request format to use when communicating with the Llama2 model.
          type: string
          enum:
            - ollama
            - openai
            - raw
      additionalProperties: false
      required:
        - type
    AIGatewayTargetModelMistralConfig:
      description: Mistral-specific configuration for a model.
      type: object
      properties:
        embeddings_dimensions:
          description: The number of dimensions for embedding outputs.
          type: integer
        max_tokens:
          description: The maximum number of tokens to generate in the response.
          type: integer
        input_cost:
          description: Cost per input token for billing and cost tracking.
          type: number
        output_cost:
          description: Cost per output token for billing and cost tracking.
          type: number
        temperature:
          description: Controls randomness in the model output. Higher values produce more
            varied responses.
          type: number
        top_k:
          description: Limits the number of highest-probability tokens considered during
            generation.
          type: integer
        top_p:
          description: Nucleus sampling probability mass. Tokens with cumulative
            probability up to top_p are considered.
          type: number
        upstream_url:
          description: The upstream URL for the model endpoint.
          type: string
          format: uri
        type:
          type: string
          enum:
            - mistral
        format:
          description: The request format to use when communicating with the Mistral model.
          type: string
          enum:
            - ollama
            - openai
      additionalProperties: false
      required:
        - type
    InvalidRules:
      description: invalid parameters rules
      type: string
      enum:
        - required
        - is_array
        - is_base64
        - is_boolean
        - is_date_time
        - is_integer
        - is_null
        - is_number
        - is_object
        - is_string
        - is_uuid
        - is_fqdn
        - is_arn
        - unknown_property
        - missing_reference
        - is_label
        - matches_regex
        - invalid
        - is_supported_network_availability_zone_list
        - is_supported_network_cidr_block
        - is_supported_provider_region
        - type
      nullable: true
      readOnly: true
    AIGatewayRedisAWSAuthentication:
      description: AWS specific configs for connecting to a Cloud Provider's redis instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - aws
        access_key_id:
          description: |-
            AWS Access Key ID to be used for authentication. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        assume_role_arn:
          description: |-
            The ARN of the IAM role to assume for generating ElastiCache IAM authentication tokens. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        cache_name:
          description: |-
            The name of the AWS Elasticache cluster. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        is_serverless:
          description: This flag specifies whether the cluster is serverless.
          type: boolean
          default: true
        region:
          description: |-
            The region of the AWS ElastiCache cluster. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        role_session_name:
          description: |-
            The session name for the temporary credentials when assuming the IAM role. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        secret_access_key:
          description: |-
            AWS Secret Access Key. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
    AIGatewayRedisAzureAuthentication:
      description: Azure specific configs for connecting to a Cloud Provider's redis
        instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - azure
        client_id:
          description: |-
            Azure Client ID. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        secret:
          description: |-
            Azure Client Secret. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        tenant_id:
          description: |-
            Azure Tenant ID. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
    AIGatewayRedisGCPAuthentication:
      description: GCP specific configs for connecting to a Cloud Provider's redis instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - gcp
        service_account_json:
          description: |-
            GCP Service Account JSON. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
  responses:
    UpdateAIGatewayModelResponse:
      description: Model updated successfully.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AIGatewayModel"
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/BadRequestError"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
    TooManyRequests:
      description: Too Many Requests
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/TooManyRequestsError"
  examples:
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
```
