{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-completion-post-request-schema.json",
  "title": "CompletionPostRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-orchestration-openapi.yml#/components/schemas/CompletionPostRequest",
  "oneOf": [
    {
      "$ref": "#/$defs/CompletionRequestConfiguration"
    },
    {
      "$ref": "#/$defs/CompletionRequestConfigurationReferenceById"
    },
    {
      "$ref": "#/$defs/CompletionRequestConfigurationReferenceByNameScenarioVersion"
    }
  ],
  "$defs": {
    "AfterLastRoleTargetSelector": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "after_last_role"
      ],
      "properties": {
        "after_last_role": {
          "type": "string",
          "description": "Filter all messages after the last message with this role in the combined message list. If no message is scoped after applying this filter, then the filter is skipped.\n",
          "enum": [
            "system",
            "user",
            "assistant",
            "developer",
            "tool"
          ]
        }
      }
    },
    "AssistantChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "assistant"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        },
        "refusal": {
          "type": "string"
        },
        "tool_calls": {
          "$ref": "#/$defs/MessageToolCalls"
        },
        "reasoning_content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReasoningBlock"
          },
          "description": "Reasoning or thinking content from the model's previous turn.\n"
        }
      },
      "required": [
        "role"
      ]
    },
    "AzureContentSafetyInput": {
      "description": "Filter configuration for Azure Content Safety",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "hate": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "self_harm": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "sexual": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "violence": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "prompt_shield": {
          "type": "boolean",
          "description": "Filter prompts for harmful content such as jailbreaks and prompt injections.",
          "default": false
        }
      }
    },
    "AzureContentSafetyInputFilterConfig": {
      "type": "object",
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Name of the filter provider type",
          "type": "string",
          "enum": [
            "azure_content_safety"
          ]
        },
        "config": {
          "$ref": "#/$defs/AzureContentSafetyInput"
        },
        "target_selector": {
          "$ref": "#/$defs/InputFilterTargetSelector"
        }
      }
    },
    "AzureContentSafetyOutput": {
      "description": "Filter configuration for Azure Content Safety",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "hate": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "self_harm": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "sexual": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "violence": {
          "$ref": "#/$defs/AzureThreshold"
        },
        "protected_material_code": {
          "type": "boolean",
          "description": "Detect protected code content from known GitHub repositories. The scan includes software libraries, source code, algorithms, and other proprietary programming content.",
          "default": false
        }
      }
    },
    "AzureContentSafetyOutputFilterConfig": {
      "type": "object",
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Name of the filter provider type",
          "type": "string",
          "enum": [
            "azure_content_safety"
          ]
        },
        "config": {
          "$ref": "#/$defs/AzureContentSafetyOutput"
        }
      }
    },
    "AzureThreshold": {
      "type": "integer",
      "enum": [
        0,
        2,
        4,
        6
      ]
    },
    "CacheControl": {
      "type": "object",
      "description": "Cache control directive for Anthropic prompt caching. Only applicable to Anthropic Claude models. When set, marks the content block as a cache breakpoint.\n",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ephemeral"
          ]
        },
        "ttl": {
          "type": "string",
          "description": "Time-to-live for the cache entry. Default is \"5m\" (5 minutes). \"1h\" (1 hour) is supported on select models (e.g. Claude Opus 4.5, Haiku 4.5, Sonnet 4.5).\n",
          "enum": [
            "5m",
            "1h"
          ]
        }
      }
    },
    "ChatCompletionTool": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "$ref": "#/$defs/FunctionObject"
        },
        "cache_control": {
          "$ref": "#/$defs/CacheControl"
        }
      },
      "required": [
        "type",
        "function"
      ]
    },
    "ChatMessage": {
      "oneOf": [
        {
          "$ref": "#/$defs/SystemChatMessage"
        },
        {
          "$ref": "#/$defs/UserChatMessage"
        },
        {
          "$ref": "#/$defs/AssistantChatMessage"
        },
        {
          "$ref": "#/$defs/ToolChatMessage"
        },
        {
          "$ref": "#/$defs/DeveloperChatMessage"
        }
      ]
    },
    "ChatMessageContent": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextContent"
          },
          "minItems": 1
        }
      ]
    },
    "ChatMessages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ChatMessage"
      }
    },
    "CompletionRequestConfiguration": {
      "type": "object",
      "title": "Completion Request Configuration",
      "required": [
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "config": {
          "$ref": "#/$defs/OrchestrationConfig"
        },
        "placeholder_values": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "messages_history": {
          "allOf": [
            {
              "$ref": "#/$defs/ChatMessages"
            }
          ],
          "description": "History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message"
        }
      }
    },
    "CompletionRequestConfigurationReferenceById": {
      "type": "object",
      "title": "Completion Request Configuration Reference By Id",
      "required": [
        "config_ref"
      ],
      "additionalProperties": false,
      "properties": {
        "config_ref": {
          "$ref": "#/$defs/CompletionRequestConfigurationReferenceByIdConfigRef"
        },
        "config": {
          "$ref": "#/$defs/PartialOrchestrationConfig"
        },
        "placeholder_values": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "messages_history": {
          "allOf": [
            {
              "$ref": "#/$defs/ChatMessages"
            }
          ],
          "description": "History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message"
        }
      }
    },
    "CompletionRequestConfigurationReferenceByIdConfigRef": {
      "type": "object",
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "CompletionRequestConfigurationReferenceByNameScenarioVersion": {
      "type": "object",
      "title": "Completion Request Configuration Reference By Name-Scenario-Version",
      "required": [
        "config_ref"
      ],
      "additionalProperties": false,
      "properties": {
        "config_ref": {
          "$ref": "#/$defs/CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef"
        },
        "config": {
          "$ref": "#/$defs/PartialOrchestrationConfig"
        },
        "placeholder_values": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "messages_history": {
          "allOf": [
            {
              "$ref": "#/$defs/ChatMessages"
            }
          ],
          "description": "History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message"
        }
      }
    },
    "CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef": {
      "type": "object",
      "required": [
        "scenario",
        "name",
        "version"
      ],
      "additionalProperties": false,
      "properties": {
        "scenario": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "DPIConfig": {
      "type": "object",
      "required": [
        "type",
        "method",
        "entities"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Type of masking service provider",
          "type": "string",
          "enum": [
            "sap_data_privacy_integration"
          ]
        },
        "method": {
          "description": "Type of masking method to be used",
          "type": "string",
          "enum": [
            "anonymization",
            "pseudonymization"
          ]
        },
        "entities": {
          "description": "List of entities to be masked",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/DPIEntityConfig"
          }
        },
        "allowlist": {
          "description": "List of strings that should not be masked",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "mask_grounding_input": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": false,
              "description": "controls whether the input to the grounding module will be masked with the configuration supplied in the masking module"
            }
          }
        },
        "mask_file_input_method": {
          "description": "Type of masking method to be used for file inputs. Required if file inputs are provided.",
          "type": "string",
          "enum": [
            "anonymization",
            "skip"
          ]
        }
      }
    },
    "DPICustomEntity": {
      "type": "object",
      "required": [
        "regex",
        "replacement_strategy"
      ],
      "additionalProperties": false,
      "properties": {
        "regex": {
          "description": "Regular expression to match the entity",
          "type": "string"
        },
        "replacement_strategy": {
          "description": "Replacement strategy to be used for the entity",
          "oneOf": [
            {
              "$ref": "#/$defs/DPIMethodConstant"
            }
          ]
        }
      }
    },
    "DPIEntities": {
      "description": "Default entities supported by data privacy and integration service",
      "type": "string",
      "enum": [
        "profile-person",
        "profile-org",
        "profile-university",
        "profile-location",
        "profile-email",
        "profile-phone",
        "profile-address",
        "profile-sapids-internal",
        "profile-sapids-public",
        "profile-url",
        "profile-username-password",
        "profile-nationalid",
        "profile-iban",
        "profile-ssn",
        "profile-credit-card-number",
        "profile-passport",
        "profile-driverlicense",
        "profile-nationality",
        "profile-religious-group",
        "profile-political-group",
        "profile-pronouns-gender",
        "profile-ethnicity",
        "profile-gender",
        "profile-sexual-orientation",
        "profile-trade-union",
        "profile-sensitive-data"
      ]
    },
    "DPIEntityConfig": {
      "oneOf": [
        {
          "$ref": "#/$defs/DPIStandardEntity"
        },
        {
          "$ref": "#/$defs/DPICustomEntity"
        }
      ]
    },
    "DPIMethodConstant": {
      "description": "Replaces the entity with the specified value followed by an incrementing number",
      "type": "object",
      "required": [
        "method",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "method": {
          "type": "string",
          "enum": [
            "constant"
          ]
        },
        "value": {
          "description": "Value to be used for replacement",
          "type": "string"
        }
      }
    },
    "DPIMethodFabricatedData": {
      "description": "Replaces the entity with a randomly generated value appropriate to its type.",
      "type": "object",
      "required": [
        "method"
      ],
      "additionalProperties": false,
      "properties": {
        "method": {
          "type": "string",
          "enum": [
            "fabricated_data"
          ]
        }
      }
    },
    "DPIStandardEntity": {
      "type": "object",
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/DPIEntities"
        },
        "replacement_strategy": {
          "description": "Replacement strategy to be used for the entity",
          "oneOf": [
            {
              "$ref": "#/$defs/DPIMethodConstant"
            },
            {
              "$ref": "#/$defs/DPIMethodFabricatedData"
            }
          ]
        }
      }
    },
    "DataRepositoryType": {
      "type": "string",
      "description": "Only include DataRepositories with the given type.",
      "enum": [
        "vector",
        "help.sap.com"
      ],
      "title": "DataRepositoryType"
    },
    "DeveloperChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "developer"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content"
      ]
    },
    "DocumentGroundingFilter": {
      "type": "object",
      "required": [
        "data_repository_type"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "$ref": "#/$defs/GroundingFilterId"
        },
        "search_config": {
          "$ref": "#/$defs/GroundingFilterSearchConfiguration"
        },
        "data_repositories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "DataRepositories",
          "description": "Specify ['*'] to search across all DataRepositories or give a specific list of DataRepository ids.",
          "default": [
            "*"
          ]
        },
        "data_repository_type": {
          "$ref": "#/$defs/DataRepositoryType"
        },
        "data_repository_metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValueListPair"
          },
          "title": "Datarepositorymetadata",
          "description": "Restrict DataRepositories considered during search to those annotated with the given metadata. Useful when combined with dataRepositories=['*']"
        },
        "document_metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SearchDocumentKeyValueListPair"
          },
          "title": "Documentmetadata",
          "description": "Restrict documents considered during search to those annotated with the given metadata."
        },
        "chunk_metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValueListPair"
          },
          "title": "Chunkmetadata",
          "description": "Restrict chunks considered during search to those with the given metadata."
        }
      },
      "minProperties": 1
    },
    "FileContent": {
      "type": "object",
      "required": [
        "file_data"
      ],
      "additionalProperties": false,
      "properties": {
        "file_data": {
          "type": "string",
          "description": "Base64 encoded file content or file URL"
        },
        "filename": {
          "type": "string",
          "description": "Name of the file"
        }
      }
    },
    "FilteringModuleConfig": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "input": {
          "allOf": [
            {
              "$ref": "#/$defs/InputFilteringConfig"
            }
          ],
          "description": "List of provider type and filters"
        },
        "output": {
          "allOf": [
            {
              "$ref": "#/$defs/OutputFilteringConfig"
            }
          ],
          "description": "List of provider type and filters"
        }
      },
      "minProperties": 1
    },
    "FilteringStreamOptions": {
      "description": "Stream options for output filtering. Will be ignored if stream is false.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "overlap": {
          "type": "integer",
          "description": "Number of characters that should be additionally sent to content filtering services from previous chunks as additional context.",
          "default": 0,
          "minimum": 0,
          "maximum": 10000
        }
      }
    },
    "FunctionObject": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string",
          "description": "A description of what the function does, used by the model to choose when and how to call the function."
        },
        "name": {
          "type": "string",
          "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
          "pattern": "^[a-zA-Z0-9-_]+$",
          "maxLength": 64
        },
        "parameters": {
          "$ref": "#/$defs/FunctionParameters"
        },
        "strict": {
          "type": [
            "boolean",
            "null"
          ],
          "default": false,
          "description": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling)."
        }
      },
      "required": [
        "name"
      ]
    },
    "FunctionParameters": {
      "type": "object",
      "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.  Omitting `parameters` defines a function with an empty parameter list.",
      "additionalProperties": true
    },
    "GlobalStreamOptions": {
      "description": "Options for streaming. Will be ignored if enabled is false.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "If true, the response will be streamed back to the client",
          "default": false
        },
        "chunk_size": {
          "type": "integer",
          "description": "Minimum number of characters per chunk that post-LLM modules operate on.",
          "default": 100,
          "minimum": 1,
          "maximum": 10000
        },
        "delimiters": {
          "type": "array",
          "minItems": 1,
          "description": "List of delimiters to split the input text into chunks.Please note, this is a required parameter when `input_translation_module_config` or `output_translation_module_config` are configured.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "GraniteGuardian41": {
      "description": "Configuration for IBM Granite Guardian 4.1 filter provider.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "categories"
      ],
      "properties": {
        "enable_reasoning": {
          "type": "boolean",
          "default": false,
          "description": "Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, 'reasoning': '...'}"
        },
        "categories": {
          "description": "Content criteria to evaluate. Note: Granite Guardian requires separate calls for each configured content category. Recommendation: Use only `harm` catch all content category.",
          "type": "object",
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "harm": {
              "type": "boolean",
              "description": "Catch-all criterion for generally harmful content."
            },
            "social_bias": {
              "type": "boolean",
              "description": "Detect prejudice or discrimination based on identity or protected characteristics."
            },
            "jailbreak": {
              "type": "boolean",
              "description": "Detect attempts to manipulate the model into producing harmful or otherwise undesired outputs."
            },
            "violence": {
              "type": "boolean",
              "description": "Detect content promoting or depicting physical, mental, or sexual harm."
            },
            "profanity": {
              "type": "boolean",
              "description": "Detect offensive language or insults."
            },
            "sexual_content": {
              "type": "boolean",
              "description": "Detect explicit or suggestive material of a sexual nature."
            },
            "unethical_behavior": {
              "type": "boolean",
              "description": "Detect content describing actions that violate moral or legal standards."
            }
          }
        }
      }
    },
    "GraniteGuardianFilterConfig": {
      "type": "object",
      "description": "Filter configuration for IBM Granite Guardian filter provider.",
      "required": [
        "type",
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Name of the filter provider type",
          "type": "string",
          "enum": [
            "granite_guardian_4_1"
          ]
        },
        "config": {
          "$ref": "#/$defs/GraniteGuardian41"
        },
        "target_selector": {
          "$ref": "#/$defs/InputFilterTargetSelector"
        }
      }
    },
    "GroundingFilterId": {
      "title": "Id",
      "description": "Identifier of this SearchFilter - unique per request.",
      "type": "string"
    },
    "GroundingFilterSearchConfiguration": {
      "additionalProperties": false,
      "properties": {
        "max_chunk_count": {
          "type": "integer",
          "minimum": 0,
          "exclusiveMinimum": true,
          "title": "Maxchunkcount",
          "description": "Maximum number of chunks to be returned. Cannot be used with 'maxDocumentCount'."
        },
        "max_document_count": {
          "type": "integer",
          "minimum": 0,
          "exclusiveMinimum": true,
          "title": "Maxdocumentcount",
          "description": "[Only supports 'vector' dataRepositoryType] - Maximum number of documents to be returned. Cannot be used with 'maxChunkCount'. If maxDocumentCount is given, then only one chunk per document is returned."
        }
      },
      "title": "SearchConfiguration",
      "minProperties": 0,
      "maxProperties": 1
    },
    "GroundingModuleConfig": {
      "type": "object",
      "required": [
        "type",
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "anyOf": [
            {
              "enum": [
                "document_grounding_service"
              ]
            },
            {}
          ]
        },
        "config": {
          "type": "object",
          "required": [
            "placeholders"
          ],
          "additionalProperties": false,
          "properties": {
            "filters": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "$ref": "#/$defs/DocumentGroundingFilter"
                  }
                ]
              },
              "description": "Document grounding service filters to be used"
            },
            "placeholders": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "input",
                "output"
              ],
              "properties": {
                "input": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "string"
                  },
                  "description": "Contains the input parameters used for grounding input questions"
                },
                "output": {
                  "type": "string",
                  "description": "Placeholder name for grounding output"
                }
              },
              "description": "Placeholders to be used for grounding input questions and output"
            },
            "metadata_params": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Parameter name used for specifying metadata parameters"
            }
          }
        }
      }
    },
    "ImageContentUrl": {
      "type": "object",
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string"
        },
        "detail": {
          "type": "string",
          "default": "auto"
        }
      }
    },
    "InputFilterConfig": {
      "oneOf": [
        {
          "$ref": "#/$defs/AzureContentSafetyInputFilterConfig"
        },
        {
          "$ref": "#/$defs/LlamaGuard38bFilterConfig"
        },
        {
          "$ref": "#/$defs/GraniteGuardianFilterConfig"
        }
      ]
    },
    "InputFilterTargetSelector": {
      "oneOf": [
        {
          "$ref": "#/$defs/AfterLastRoleTargetSelector"
        },
        {
          "$ref": "#/$defs/LastMessagesTargetSelector"
        }
      ],
      "description": "Selector for scoping input filtering to a subset of the combined message list (messages_history prepended to template). If not present, all input content is filtered.\n"
    },
    "InputFilteringConfig": {
      "type": "object",
      "required": [
        "filters"
      ],
      "additionalProperties": false,
      "properties": {
        "filters": {
          "description": "Configuration for content filtering services that should be used for the given filtering step (input filtering).",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/InputFilterConfig"
          }
        }
      }
    },
    "KeyValueListPair": {
      "additionalProperties": false,
      "properties": {
        "key": {
          "type": "string",
          "maxLength": 1024,
          "title": "Key"
        },
        "value": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1024
          },
          "title": "Value"
        }
      },
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "title": "KeyValueListPair"
    },
    "LLMModelDetails": {
      "type": "object",
      "description": "The model and parameters to be used for the prompt templating. This is the model that will be used to generate the response.\n",
      "required": [
        "name"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the model as in LLM Access configuration"
        },
        "version": {
          "type": "string",
          "description": "Version of the model to be used",
          "default": "latest"
        },
        "params": {
          "type": "object",
          "description": "Additional parameters for the model. Default values are used for mandatory parameters.",
          "additionalProperties": true
        },
        "timeout": {
          "description": "Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. Values above 600s may not be honored due to infrastructure connection limits; in practice this primarily affects non-streaming calls where the connection may be idle while waiting for a response.",
          "type": "integer",
          "default": 600,
          "minimum": 1,
          "maximum": 1200
        },
        "max_retries": {
          "description": "Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models.",
          "type": "integer",
          "default": 2,
          "minimum": 0,
          "maximum": 5
        },
        "drop_unsupported_params": {
          "type": "boolean",
          "default": true,
          "description": "Controls behaviour when Chat Completions parameters not supported by the Responses API are present in the request. Only applies to models that use the Responses API (responsesApiOnly: true in the model registry). When true (default): unsupported params are silently dropped and reported in the X-Orchestration-Dropped-Model-Params response header. When false: any unsupported parameter causes a 400 error with an actionable message.\n"
        }
      }
    },
    "LastMessagesTargetSelector": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "last_messages"
      ],
      "properties": {
        "last_messages": {
          "type": "integer",
          "minimum": 1,
          "description": "Number of messages from the end of the combined message list to include in filtering. Must be >= 1 (0 is not allowed and returns 400 Bad Request). If specified value is larger than the combined message list length, all messages are filtered.\n"
        }
      }
    },
    "LlamaGuard38b": {
      "deprecated": true,
      "description": "Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20.",
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "violent_crimes": {
          "type": "boolean"
        },
        "non_violent_crimes": {
          "type": "boolean"
        },
        "sex_crimes": {
          "type": "boolean"
        },
        "child_exploitation": {
          "type": "boolean"
        },
        "defamation": {
          "type": "boolean"
        },
        "specialized_advice": {
          "type": "boolean"
        },
        "privacy": {
          "type": "boolean"
        },
        "intellectual_property": {
          "type": "boolean"
        },
        "indiscriminate_weapons": {
          "type": "boolean"
        },
        "hate": {
          "type": "boolean"
        },
        "self_harm": {
          "type": "boolean"
        },
        "sexual_content": {
          "type": "boolean"
        },
        "elections": {
          "type": "boolean"
        },
        "code_interpreter_abuse": {
          "type": "boolean"
        }
      }
    },
    "LlamaGuard38bFilterConfig": {
      "deprecated": true,
      "description": "Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20.",
      "type": "object",
      "required": [
        "type",
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Name of the filter provider type",
          "type": "string",
          "enum": [
            "llama_guard_3_8b"
          ]
        },
        "config": {
          "$ref": "#/$defs/LlamaGuard38b"
        },
        "target_selector": {
          "$ref": "#/$defs/InputFilterTargetSelector"
        }
      }
    },
    "MaskingModuleConfig": {
      "oneOf": [
        {
          "type": "object",
          "title": "MaskingModuleConfigProviders",
          "properties": {
            "providers": {
              "description": "List of masking service providers",
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/MaskingProviderConfig"
              }
            }
          },
          "required": [
            "providers"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "title": "MaskingModuleConfigMaskingProviders",
          "properties": {
            "masking_providers": {
              "deprecated": true,
              "description": "List of masking service providers. **DEPRECATED**:  will be removed March 20, 2027. Use `providers` property instead.",
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/MaskingProviderConfig"
              }
            }
          },
          "required": [
            "masking_providers"
          ],
          "additionalProperties": false
        }
      ]
    },
    "MaskingProviderConfig": {
      "oneOf": [
        {
          "$ref": "#/$defs/DPIConfig"
        }
      ]
    },
    "MessageToolCall": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the tool call."
        },
        "type": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "type": "object",
          "description": "The function that the model called.",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the function to call."
            },
            "arguments": {
              "type": "string",
              "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
            }
          },
          "required": [
            "name",
            "arguments"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "function"
      ]
    },
    "MessageToolCalls": {
      "type": "array",
      "description": "The tool calls generated by the model, such as function calls.",
      "items": {
        "$ref": "#/$defs/MessageToolCall"
      }
    },
    "ModuleConfigs": {
      "type": "object",
      "required": [
        "prompt_templating"
      ],
      "additionalProperties": false,
      "properties": {
        "prompt_templating": {
          "$ref": "#/$defs/PromptTemplatingModuleConfig"
        },
        "filtering": {
          "$ref": "#/$defs/FilteringModuleConfig"
        },
        "masking": {
          "$ref": "#/$defs/MaskingModuleConfig"
        },
        "grounding": {
          "$ref": "#/$defs/GroundingModuleConfig"
        },
        "translation": {
          "$ref": "#/$defs/TranslationModuleConfig"
        }
      }
    },
    "ModuleConfigsList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModuleConfigs"
      },
      "minItems": 1,
      "description": "A list of module configurations. The first configuration in the list that succeeds will be used.\n"
    },
    "OrchestrationConfig": {
      "type": "object",
      "required": [
        "modules"
      ],
      "additionalProperties": false,
      "properties": {
        "modules": {
          "oneOf": [
            {
              "$ref": "#/$defs/ModuleConfigs"
            },
            {
              "$ref": "#/$defs/ModuleConfigsList"
            }
          ]
        },
        "stream": {
          "$ref": "#/$defs/GlobalStreamOptions"
        }
      }
    },
    "OutputFilterConfig": {
      "oneOf": [
        {
          "$ref": "#/$defs/AzureContentSafetyOutputFilterConfig"
        },
        {
          "$ref": "#/$defs/LlamaGuard38bFilterConfig"
        },
        {
          "$ref": "#/$defs/GraniteGuardianFilterConfig"
        }
      ]
    },
    "OutputFilteringConfig": {
      "type": "object",
      "required": [
        "filters"
      ],
      "additionalProperties": false,
      "properties": {
        "filters": {
          "description": "Configuration for content filtering services that should be used for the given filtering step (output filtering).",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/OutputFilterConfig"
          }
        },
        "stream_options": {
          "$ref": "#/$defs/FilteringStreamOptions"
        }
      }
    },
    "PartialModuleConfigs": {
      "description": "Partial module configuration for use with config_ref overrides. All fields are optional so that only the modules that should be overridden need to be specified. The remaining configuration is taken from the referenced orchestration config.\n",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "prompt_templating": {
          "$ref": "#/$defs/PartialPromptTemplatingModuleConfig"
        },
        "filtering": {
          "$ref": "#/$defs/FilteringModuleConfig"
        },
        "masking": {
          "$ref": "#/$defs/MaskingModuleConfig"
        },
        "grounding": {
          "$ref": "#/$defs/GroundingModuleConfig"
        },
        "translation": {
          "$ref": "#/$defs/TranslationModuleConfig"
        }
      }
    },
    "PartialOrchestrationConfig": {
      "description": "Partial orchestration configuration for use with config_ref overrides. All fields are optional so that only the parts that should be overridden need to be specified. The remaining configuration is taken from the referenced orchestration config.\n",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "modules": {
          "$ref": "#/$defs/PartialModuleConfigs"
        },
        "stream": {
          "$ref": "#/$defs/GlobalStreamOptions"
        }
      }
    },
    "PartialPromptTemplatingModuleConfig": {
      "description": "Partial prompt templating configuration for use with config_ref overrides. model is optional so that only the prompt can be overridden without repeating the model config.\n",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "prompt": {
          "description": "The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry. If omitted, messages_history must be provided in the request body.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/Template"
            },
            {
              "$ref": "#/$defs/TemplateRef"
            }
          ]
        },
        "model": {
          "$ref": "#/$defs/LLMModelDetails"
        }
      }
    },
    "PromptTemplatingModuleConfig": {
      "type": "object",
      "required": [
        "model"
      ],
      "additionalProperties": false,
      "properties": {
        "prompt": {
          "description": "The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry. If omitted, messages_history must be provided in the request body.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/Template"
            },
            {
              "$ref": "#/$defs/TemplateRef"
            }
          ]
        },
        "model": {
          "$ref": "#/$defs/LLMModelDetails"
        }
      }
    },
    "ReasoningBlock": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "content": {
          "type": "string",
          "default": ""
        },
        "signature": {
          "type": "string",
          "default": ""
        }
      }
    },
    "ResponseFormatJsonObject": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `json_object`",
          "enum": [
            "json_object"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "ResponseFormatJsonSchema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `json_schema`",
          "enum": [
            "json_schema"
          ]
        },
        "json_schema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "description": {
              "type": "string",
              "description": "A description of what the response format is for, used by the model to determine how to respond in the format."
            },
            "name": {
              "type": "string",
              "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
              "pattern": "^[a-zA-Z0-9-_]+$",
              "maxLength": 64
            },
            "schema": {
              "$ref": "#/$defs/ResponseFormatJsonSchemaSchema"
            },
            "strict": {
              "type": [
                "boolean",
                "null"
              ],
              "default": false,
              "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs)."
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "required": [
        "type",
        "json_schema"
      ]
    },
    "ResponseFormatJsonSchemaSchema": {
      "type": "object",
      "description": "The schema for the response format, described as a JSON Schema object.",
      "additionalProperties": true
    },
    "ResponseFormatText": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `text`",
          "enum": [
            "text"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "SAPDocumentTranslationApplyToSelector": {
      "type": "object",
      "description": "This selector allows you to define the scope of translation, such as specific placeholders or messages with specific roles. For example, `{\"category\": \"placeholders\", \"items\": [\"user_input\"], \"source_language\": \"de-DE\"}` targets the value of \"user_input\" in `placeholder_values` specified in the request payload; and considers the value to be in German.\n",
      "required": [
        "category",
        "items"
      ],
      "additionalProperties": false,
      "properties": {
        "category": {
          "type": "string",
          "description": "Category to apply translation to.",
          "enum": [
            "placeholders",
            "template_roles"
          ]
        },
        "items": {
          "type": "array",
          "description": "List of placeholders or roles to apply translation to",
          "items": {
            "type": "string"
          }
        },
        "source_language": {
          "type": "string",
          "description": "Language of the text to be translated."
        }
      }
    },
    "SAPDocumentTranslationInput": {
      "type": "object",
      "required": [
        "type",
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Type of document translation provider",
          "type": "string",
          "enum": [
            "sap_document_translation"
          ]
        },
        "translate_messages_history": {
          "type": "boolean",
          "description": "If true, the messages history will be translated as well.",
          "default": true
        },
        "config": {
          "description": "Configuration for `sap_document_translation` translation provider.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "target_language"
          ],
          "properties": {
            "source_language": {
              "type": "string",
              "description": "Language of the text to be translated."
            },
            "apply_to": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/SAPDocumentTranslationApplyToSelector"
              }
            },
            "target_language": {
              "type": "string",
              "description": "Language to which the text should be translated."
            }
          }
        }
      }
    },
    "SAPDocumentTranslationOutput": {
      "type": "object",
      "required": [
        "type",
        "config"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "description": "Configuration for `sap_document_translation` translation provider.",
          "type": "string",
          "enum": [
            "sap_document_translation"
          ]
        },
        "config": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "target_language"
          ],
          "properties": {
            "source_language": {
              "type": "string",
              "description": "Language of the text to be translated."
            },
            "target_language": {
              "$ref": "#/$defs/SAPDocumentTranslationOutputTargetLanguage"
            }
          }
        }
      }
    },
    "SAPDocumentTranslationOutputTargetLanguage": {
      "oneOf": [
        {
          "type": "string",
          "description": "Language to which the text should be translated."
        },
        {
          "$ref": "#/$defs/SAPDocumentTranslationApplyToSelector"
        }
      ]
    },
    "SearchDocumentKeyValueListPair": {
      "additionalProperties": false,
      "properties": {
        "key": {
          "type": "string",
          "maxLength": 1024,
          "title": "Key"
        },
        "value": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1024
          },
          "title": "Value"
        },
        "select_mode": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SearchSelectOptionEnum"
          },
          "title": "Selectmode",
          "description": "Select mode for search filters"
        }
      },
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "title": "SearchDocumentKeyValueListPair"
    },
    "SearchSelectOptionEnum": {
      "type": "string",
      "enum": [
        "ignoreIfKeyAbsent"
      ],
      "title": "SearchSelectOptionEnum"
    },
    "SystemChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "system"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content"
      ]
    },
    "Template": {
      "type": "object",
      "required": [
        "template"
      ],
      "additionalProperties": false,
      "properties": {
        "template": {
          "allOf": [
            {
              "$ref": "#/$defs/TemplatingChatMessage"
            }
          ],
          "description": "A chat message array to be formatted with values from placeholder_values. Both role and content can be templated. If messages_history is provided, the templated messages will be appended."
        },
        "defaults": {
          "description": "Optional default values for the template. If a parameter has no default it is required.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "response_format": {
          "description": "Response format that the model output should adhere to. This is the same as the OpenAI definition.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ResponseFormatText"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonObject"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonSchema"
            }
          ]
        },
        "tools": {
          "type": "array",
          "description": "A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.\n",
          "items": {
            "$ref": "#/$defs/ChatCompletionTool"
          }
        }
      }
    },
    "TemplateRef": {
      "type": "object",
      "required": [
        "template_ref"
      ],
      "additionalProperties": false,
      "properties": {
        "template_ref": {
          "description": "Reference to a template in the prompt registry by ID or by scenario, name and version",
          "oneOf": [
            {
              "$ref": "#/$defs/TemplateRefByID"
            },
            {
              "$ref": "#/$defs/TemplateRefByScenarioNameVersion"
            }
          ]
        }
      }
    },
    "TemplateRefByID": {
      "type": "object",
      "required": [
        "id"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the template in prompt registry"
        },
        "scope": {
          "type": "string",
          "description": "Defines the scope that is searched for the referenced template.  'tenant' indicates the template is shared across all resource groups within the tenant,  while 'resource_group' indicates the template is only accessible within the specific resource group.\n",
          "enum": [
            "resource_group",
            "tenant"
          ],
          "default": "tenant"
        }
      }
    },
    "TemplateRefByScenarioNameVersion": {
      "type": "object",
      "required": [
        "scenario",
        "name",
        "version"
      ],
      "additionalProperties": false,
      "properties": {
        "scenario": {
          "type": "string",
          "description": "Scenario name"
        },
        "name": {
          "type": "string",
          "description": "Name of the template"
        },
        "version": {
          "type": "string",
          "description": "Version of the template"
        },
        "scope": {
          "type": "string",
          "description": "Defines the scope that is searched for the referenced template.  'tenant' indicates the template is shared across all resource groups within the tenant,  while 'resource_group' indicates the template is only accessible within the specific resource group.\n",
          "enum": [
            "resource_group",
            "tenant"
          ],
          "default": "tenant"
        }
      }
    },
    "TemplatingChatMessage": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/ChatMessage"
      }
    },
    "TextContent": {
      "type": "object",
      "required": [
        "type",
        "text"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ]
        },
        "text": {
          "type": "string"
        },
        "cache_control": {
          "$ref": "#/$defs/CacheControl"
        }
      }
    },
    "ToolChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "tool"
          ]
        },
        "tool_call_id": {
          "type": "string"
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content",
        "tool_call_id"
      ]
    },
    "TranslationModuleConfig": {
      "type": "object",
      "description": "Configuration for translation module",
      "additionalProperties": false,
      "properties": {
        "input": {
          "description": "Configuration for input translation",
          "oneOf": [
            {
              "$ref": "#/$defs/SAPDocumentTranslationInput"
            }
          ]
        },
        "output": {
          "description": "Configuration for output translation",
          "oneOf": [
            {
              "$ref": "#/$defs/SAPDocumentTranslationOutput"
            }
          ]
        }
      }
    },
    "UserChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "content": {
          "$ref": "#/$defs/UserChatMessageContent"
        },
        "role": {
          "type": "string",
          "enum": [
            "user"
          ]
        }
      },
      "required": [
        "content",
        "role"
      ]
    },
    "UserChatMessageContent": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserChatMessageContentItem"
          },
          "minItems": 1
        }
      ]
    },
    "UserChatMessageContentItem": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text",
            "image_url",
            "file"
          ]
        },
        "text": {
          "type": "string"
        },
        "image_url": {
          "$ref": "#/$defs/ImageContentUrl"
        },
        "file": {
          "$ref": "#/$defs/FileContent"
        },
        "cache_control": {
          "$ref": "#/$defs/CacheControl"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}