diff --git a/docs/models/agents.json b/docs/models/agents.json index abe4b8446..68d4a2315 100644 --- a/docs/models/agents.json +++ b/docs/models/agents.json @@ -161,6 +161,8 @@ "properties": { "doc_url": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "description": "URL of the referenced document", diff --git a/docs/models/common.json b/docs/models/common.json index fec4c9f5e..3a280dfd8 100644 --- a/docs/models/common.json +++ b/docs/models/common.json @@ -435,6 +435,7 @@ }, "input_schema": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "title": "Input Schema" @@ -586,6 +587,9 @@ }, "referenced_documents": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`ReferencedDocument" + }, "nullable": true, "default": null, "description": "List of documents referenced in the response (assistant messages only)", @@ -1030,6 +1034,9 @@ }, "logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITokenLogProb" + }, "nullable": true, "default": null, "title": "Logprobs" @@ -1067,6 +1074,9 @@ }, "results": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFileSearchToolCallResults" + }, "nullable": true, "default": null, "title": "Results" @@ -1284,6 +1294,9 @@ }, "content": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningContent" + }, "nullable": true, "default": null, "description": "The reasoning content from the model.", @@ -1291,6 +1304,11 @@ }, "status": { "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], "nullable": true, "default": null, "description": "The status of the reasoning output.", @@ -1379,6 +1397,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -1391,6 +1412,9 @@ }, "top_logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITopLogProb" + }, "nullable": true, "default": null, "description": "The top log probabilities for the token.", @@ -1414,6 +1438,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -1493,6 +1520,7 @@ }, "attributes": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Document metadata from the RAG provider (e.g., url, title, author)", @@ -1539,6 +1567,8 @@ "properties": { "doc_url": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "description": "URL of the referenced document", @@ -1634,6 +1664,12 @@ "properties": { "mode": { "type": "string", + "enum": [ + "semantic", + "hybrid", + "lexical", + "keyword" + ], "nullable": true, "default": null, "description": "Solr vector_io search mode. When omitted, the configured OKP default is used; otherwise 'hybrid' applies. 'keyword' and 'lexical' both use BM25 text search.", @@ -1647,6 +1683,7 @@ }, "filters": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Solr provider filter payload passed through as params['solr']. Supports structured metadata filters (eq, ne, in, nin comparison operators). Legacy filter-only objects (e.g. fq) are still accepted.", @@ -1768,6 +1805,7 @@ }, "input_schema": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "JSON schema for the tool input", @@ -2099,12 +2137,18 @@ }, "queries": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Queries" }, "sources": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`WebSearchSource" + }, "nullable": true, "default": null, "title": "Sources" diff --git a/docs/models/common_responses.json b/docs/models/common_responses.json new file mode 100644 index 000000000..5d580f80f --- /dev/null +++ b/docs/models/common_responses.json @@ -0,0 +1,2111 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Lightspeed Core Stack", + "version": "0.3.0" + }, + "components": { + "schemas": { + "AllowedToolsFilter": { + "description": "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed", + "properties": { + "tool_names": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "title": "Tool Names" + } + }, + "title": "AllowedToolsFilter", + "type": "object" + }, + "ApprovalFilter": { + "description": "Filter configuration for MCP tool approval requirements.\n\n:param always: (Optional) List of tool names that always require approval\n:param never: (Optional) List of tool names that never require approval", + "properties": { + "always": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "title": "Always" + }, + "never": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "title": "Never" + } + }, + "title": "ApprovalFilter", + "type": "object" + }, + "IncludeParameter": { + "enum": [ + "web_search_call.action.sources", + "code_interpreter_call.outputs", + "computer_call_output.output.image_url", + "file_search_call.results", + "message.input_image.image_url", + "message.output_text.logprobs" + ], + "type": "string" + }, + "InputToolMCP": { + "description": "MCP input tool with authorization included when serializing request bodies.", + "properties": { + "type": { + "const": "mcp", + "default": "mcp", + "title": "Type", + "type": "string" + }, + "server_label": { + "title": "Server Label", + "type": "string" + }, + "connector_id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Connector Id" + }, + "server_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Server Url" + }, + "headers": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "title": "Headers" + }, + "authorization": { + "type": "string", + "nullable": true, + "default": null, + "title": "Authorization" + }, + "require_approval": { + "anyOf": [ + { + "const": "always", + "type": "string" + }, + { + "const": "never", + "type": "string" + }, + { + "$ref": "`#/components/schemas/`ApprovalFilter" + } + ], + "default": "never", + "title": "Require Approval" + }, + "allowed_tools": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "`#/components/schemas/`AllowedToolsFilter" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Allowed Tools" + } + }, + "required": [ + "server_label" + ], + "title": "InputToolMCP", + "type": "object" + }, + "MCPListToolsTool": { + "description": "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does", + "properties": { + "input_schema": { + "additionalProperties": true, + "title": "Input Schema", + "type": "object" + }, + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "type": "string", + "nullable": true, + "default": null, + "title": "Description" + } + }, + "required": [ + "input_schema", + "name" + ], + "title": "MCPListToolsTool", + "type": "object" + }, + "OpenAIResponseAnnotationCitation": { + "description": "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource", + "properties": { + "type": { + "const": "url_citation", + "default": "url_citation", + "title": "Type", + "type": "string" + }, + "end_index": { + "title": "End Index", + "type": "integer" + }, + "start_index": { + "title": "Start Index", + "type": "integer" + }, + "title": { + "title": "Title", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "end_index", + "start_index", + "title", + "url" + ], + "title": "OpenAIResponseAnnotationCitation", + "type": "object" + }, + "OpenAIResponseAnnotationContainerFileCitation": { + "description": "Container file citation annotation referencing a file within a container.", + "properties": { + "type": { + "const": "container_file_citation", + "default": "container_file_citation", + "title": "Type", + "type": "string" + }, + "container_id": { + "title": "Container Id", + "type": "string" + }, + "end_index": { + "title": "End Index", + "type": "integer" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "filename": { + "title": "Filename", + "type": "string" + }, + "start_index": { + "title": "Start Index", + "type": "integer" + } + }, + "required": [ + "container_id", + "end_index", + "file_id", + "filename", + "start_index" + ], + "title": "OpenAIResponseAnnotationContainerFileCitation", + "type": "object" + }, + "OpenAIResponseAnnotationFileCitation": { + "description": "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content", + "properties": { + "type": { + "const": "file_citation", + "default": "file_citation", + "title": "Type", + "type": "string" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "filename": { + "title": "Filename", + "type": "string" + }, + "index": { + "title": "Index", + "type": "integer" + } + }, + "required": [ + "file_id", + "filename", + "index" + ], + "title": "OpenAIResponseAnnotationFileCitation", + "type": "object" + }, + "OpenAIResponseAnnotationFilePath": { + "description": "File path annotation referencing a generated file in response content.", + "properties": { + "type": { + "const": "file_path", + "default": "file_path", + "title": "Type", + "type": "string" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "index": { + "title": "Index", + "type": "integer" + } + }, + "required": [ + "file_id", + "index" + ], + "title": "OpenAIResponseAnnotationFilePath", + "type": "object" + }, + "OpenAIResponseContentPartRefusal": { + "description": "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model", + "properties": { + "type": { + "const": "refusal", + "default": "refusal", + "title": "Type", + "type": "string" + }, + "refusal": { + "title": "Refusal", + "type": "string" + } + }, + "required": [ + "refusal" + ], + "title": "OpenAIResponseContentPartRefusal", + "type": "object" + }, + "OpenAIResponseInputFunctionToolCallOutput": { + "description": "This represents the output of a function call that gets passed back to the model.", + "properties": { + "call_id": { + "title": "Call Id", + "type": "string" + }, + "output": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "discriminator": { + "mapping": { + "input_file": "`#/components/schemas/`OpenAIResponseInputMessageContentFile", + "input_image": "`#/components/schemas/`OpenAIResponseInputMessageContentImage", + "input_text": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentImage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentFile" + } + ] + }, + "type": "array" + } + ], + "title": "Output" + }, + "type": { + "const": "function_call_output", + "default": "function_call_output", + "title": "Type", + "type": "string" + }, + "id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Id" + }, + "status": { + "type": "string", + "nullable": true, + "default": null, + "title": "Status" + } + }, + "required": [ + "call_id", + "output" + ], + "title": "OpenAIResponseInputFunctionToolCallOutput", + "type": "object" + }, + "OpenAIResponseInputMessageContentFile": { + "description": "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model.", + "properties": { + "type": { + "const": "input_file", + "default": "input_file", + "title": "Type", + "type": "string" + }, + "file_data": { + "type": "string", + "nullable": true, + "default": null, + "title": "File Data" + }, + "file_id": { + "type": "string", + "nullable": true, + "default": null, + "title": "File Id" + }, + "file_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "File Url" + }, + "filename": { + "type": "string", + "nullable": true, + "default": null, + "title": "Filename" + } + }, + "title": "OpenAIResponseInputMessageContentFile", + "type": "object" + }, + "OpenAIResponseInputMessageContentImage": { + "description": "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content", + "properties": { + "detail": { + "anyOf": [ + { + "const": "low", + "type": "string" + }, + { + "const": "high", + "type": "string" + }, + { + "const": "auto", + "type": "string" + } + ], + "default": "auto", + "title": "Detail" + }, + "type": { + "const": "input_image", + "default": "input_image", + "title": "Type", + "type": "string" + }, + "file_id": { + "type": "string", + "nullable": true, + "default": null, + "title": "File Id" + }, + "image_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Image Url" + } + }, + "title": "OpenAIResponseInputMessageContentImage", + "type": "object" + }, + "OpenAIResponseInputMessageContentText": { + "description": "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\"", + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "input_text", + "default": "input_text", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "OpenAIResponseInputMessageContentText", + "type": "object" + }, + "OpenAIResponseInputToolChoiceAllowedTools": { + "description": "Constrains the tools available to the model to a pre-defined set.\n\n:param mode: Constrains the tools available to the model to a pre-defined set\n:param tools: A list of tool definitions that the model should be allowed to call\n:param type: Tool choice type identifier, always \"allowed_tools\"", + "properties": { + "mode": { + "default": "auto", + "enum": [ + "auto", + "required" + ], + "title": "Mode", + "type": "string" + }, + "tools": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "title": "Tools", + "type": "array" + }, + "type": { + "const": "allowed_tools", + "default": "allowed_tools", + "title": "Type", + "type": "string" + } + }, + "required": [ + "tools" + ], + "title": "OpenAIResponseInputToolChoiceAllowedTools", + "type": "object" + }, + "OpenAIResponseInputToolChoiceCustomTool": { + "description": "Forces the model to call a custom tool.\n\n:param type: Tool choice type identifier, always \"custom\"\n:param name: The name of the custom tool to call.", + "properties": { + "type": { + "const": "custom", + "default": "custom", + "title": "Type", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "OpenAIResponseInputToolChoiceCustomTool", + "type": "object" + }, + "OpenAIResponseInputToolChoiceFileSearch": { + "description": "Indicates that the model should use file search to generate a response.\n\n:param type: Tool choice type identifier, always \"file_search\"", + "properties": { + "type": { + "const": "file_search", + "default": "file_search", + "title": "Type", + "type": "string" + } + }, + "title": "OpenAIResponseInputToolChoiceFileSearch", + "type": "object" + }, + "OpenAIResponseInputToolChoiceFunctionTool": { + "description": "Forces the model to call a specific function.\n\n:param name: The name of the function to call\n:param type: Tool choice type identifier, always \"function\"", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "type": { + "const": "function", + "default": "function", + "title": "Type", + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "OpenAIResponseInputToolChoiceFunctionTool", + "type": "object" + }, + "OpenAIResponseInputToolChoiceMCPTool": { + "description": "Forces the model to call a specific tool on a remote MCP server\n\n:param server_label: The label of the MCP server to use.\n:param type: Tool choice type identifier, always \"mcp\"\n:param name: (Optional) The name of the tool to call on the server.", + "properties": { + "server_label": { + "title": "Server Label", + "type": "string" + }, + "type": { + "const": "mcp", + "default": "mcp", + "title": "Type", + "type": "string" + }, + "name": { + "type": "string", + "nullable": true, + "default": null, + "title": "Name" + } + }, + "required": [ + "server_label" + ], + "title": "OpenAIResponseInputToolChoiceMCPTool", + "type": "object" + }, + "OpenAIResponseInputToolChoiceMode": { + "description": "Enumeration of simple tool choice modes for response generation.", + "enum": [ + "auto", + "required", + "none" + ], + "title": "OpenAIResponseInputToolChoiceMode", + "type": "string" + }, + "OpenAIResponseInputToolChoiceWebSearch": { + "description": "Indicates that the model should use web search to generate a response\n\n:param type: Web search tool type variant to use", + "properties": { + "type": { + "anyOf": [ + { + "const": "web_search", + "type": "string" + }, + { + "const": "web_search_preview", + "type": "string" + }, + { + "const": "web_search_preview_2025_03_11", + "type": "string" + }, + { + "const": "web_search_2025_08_26", + "type": "string" + } + ], + "default": "web_search", + "title": "Type" + } + }, + "title": "OpenAIResponseInputToolChoiceWebSearch", + "type": "object" + }, + "OpenAIResponseInputToolFileSearch": { + "description": "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results", + "properties": { + "type": { + "const": "file_search", + "default": "file_search", + "title": "Type", + "type": "string" + }, + "vector_store_ids": { + "items": { + "type": "string" + }, + "title": "Vector Store Ids", + "type": "array" + }, + "filters": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "title": "Filters" + }, + "max_num_results": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "nullable": true, + "default": 10, + "title": "Max Num Results" + }, + "ranking_options": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SearchRankingOptions" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "vector_store_ids" + ], + "title": "OpenAIResponseInputToolFileSearch", + "type": "object" + }, + "OpenAIResponseInputToolFunction": { + "description": "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation", + "properties": { + "type": { + "const": "function", + "default": "function", + "title": "Type", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "description": { + "type": "string", + "nullable": true, + "default": null, + "title": "Description" + }, + "parameters": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "title": "Parameters" + }, + "strict": { + "type": "boolean", + "nullable": true, + "default": null, + "title": "Strict" + } + }, + "required": [ + "name", + "parameters" + ], + "title": "OpenAIResponseInputToolFunction", + "type": "object" + }, + "OpenAIResponseInputToolWebSearch": { + "description": "Web search tool configuration for OpenAI response inputs.", + "properties": { + "type": { + "anyOf": [ + { + "const": "web_search", + "type": "string" + }, + { + "const": "web_search_preview", + "type": "string" + }, + { + "const": "web_search_preview_2025_03_11", + "type": "string" + }, + { + "const": "web_search_2025_08_26", + "type": "string" + } + ], + "default": "web_search", + "title": "Type" + }, + "search_context_size": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ], + "nullable": true, + "default": null, + "title": "Search Context Size" + }, + "filters": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`WebSearchFilters" + }, + { + "type": "null" + } + ], + "default": null + }, + "user_location": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`WebSearchUserLocation" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "title": "OpenAIResponseInputToolWebSearch", + "type": "object" + }, + "OpenAIResponseMCPApprovalRequest": { + "description": "A request for human approval of a tool invocation.", + "properties": { + "arguments": { + "title": "Arguments", + "type": "string" + }, + "id": { + "title": "Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "server_label": { + "title": "Server Label", + "type": "string" + }, + "type": { + "const": "mcp_approval_request", + "default": "mcp_approval_request", + "title": "Type", + "type": "string" + } + }, + "required": [ + "arguments", + "id", + "name", + "server_label" + ], + "title": "OpenAIResponseMCPApprovalRequest", + "type": "object" + }, + "OpenAIResponseMCPApprovalResponse": { + "description": "A response to an MCP approval request.", + "properties": { + "approval_request_id": { + "title": "Approval Request Id", + "type": "string" + }, + "approve": { + "title": "Approve", + "type": "boolean" + }, + "type": { + "const": "mcp_approval_response", + "default": "mcp_approval_response", + "title": "Type", + "type": "string" + }, + "id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Id" + }, + "reason": { + "type": "string", + "nullable": true, + "default": null, + "title": "Reason" + } + }, + "required": [ + "approval_request_id", + "approve" + ], + "title": "OpenAIResponseMCPApprovalResponse", + "type": "object" + }, + "OpenAIResponseMessage": { + "description": "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios.", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "discriminator": { + "mapping": { + "input_file": "`#/components/schemas/`OpenAIResponseInputMessageContentFile", + "input_image": "`#/components/schemas/`OpenAIResponseInputMessageContentImage", + "input_text": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentImage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentFile" + } + ] + }, + "type": "array" + }, + { + "items": { + "discriminator": { + "mapping": { + "output_text": "`#/components/schemas/`OpenAIResponseOutputMessageContentOutputText", + "refusal": "`#/components/schemas/`OpenAIResponseContentPartRefusal" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageContentOutputText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseContentPartRefusal" + } + ] + }, + "type": "array" + } + ], + "title": "Content" + }, + "role": { + "anyOf": [ + { + "const": "system", + "type": "string" + }, + { + "const": "developer", + "type": "string" + }, + { + "const": "user", + "type": "string" + }, + { + "const": "assistant", + "type": "string" + } + ], + "title": "Role" + }, + "type": { + "const": "message", + "default": "message", + "title": "Type", + "type": "string" + }, + "id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Id" + }, + "status": { + "type": "string", + "nullable": true, + "default": null, + "title": "Status" + } + }, + "required": [ + "content", + "role" + ], + "title": "OpenAIResponseMessage", + "type": "object" + }, + "OpenAIResponseOutputMessageContentOutputText": { + "description": "Text content within an output message of an OpenAI response.", + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "type": { + "const": "output_text", + "default": "output_text", + "title": "Type", + "type": "string" + }, + "annotations": { + "items": { + "discriminator": { + "mapping": { + "container_file_citation": "`#/components/schemas/`OpenAIResponseAnnotationContainerFileCitation", + "file_citation": "`#/components/schemas/`OpenAIResponseAnnotationFileCitation", + "file_path": "`#/components/schemas/`OpenAIResponseAnnotationFilePath", + "url_citation": "`#/components/schemas/`OpenAIResponseAnnotationCitation" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseAnnotationFileCitation" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseAnnotationCitation" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseAnnotationContainerFileCitation" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseAnnotationFilePath" + } + ] + }, + "title": "Annotations", + "type": "array" + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITokenLogProb" + }, + "nullable": true, + "default": null, + "title": "Logprobs" + } + }, + "required": [ + "text" + ], + "title": "OpenAIResponseOutputMessageContentOutputText", + "type": "object" + }, + "OpenAIResponseOutputMessageFileSearchToolCall": { + "description": "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "queries": { + "items": { + "type": "string" + }, + "title": "Queries", + "type": "array" + }, + "status": { + "title": "Status", + "type": "string" + }, + "type": { + "const": "file_search_call", + "default": "file_search_call", + "title": "Type", + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFileSearchToolCallResults" + }, + "nullable": true, + "default": null, + "title": "Results" + } + }, + "required": [ + "id", + "queries", + "status" + ], + "title": "OpenAIResponseOutputMessageFileSearchToolCall", + "type": "object" + }, + "OpenAIResponseOutputMessageFileSearchToolCallResults": { + "description": "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result", + "properties": { + "attributes": { + "additionalProperties": true, + "title": "Attributes", + "type": "object" + }, + "file_id": { + "title": "File Id", + "type": "string" + }, + "filename": { + "title": "Filename", + "type": "string" + }, + "score": { + "title": "Score", + "type": "number" + }, + "text": { + "title": "Text", + "type": "string" + } + }, + "required": [ + "attributes", + "file_id", + "filename", + "score", + "text" + ], + "title": "OpenAIResponseOutputMessageFileSearchToolCallResults", + "type": "object" + }, + "OpenAIResponseOutputMessageFunctionToolCall": { + "description": "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution", + "properties": { + "call_id": { + "title": "Call Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "arguments": { + "title": "Arguments", + "type": "string" + }, + "type": { + "const": "function_call", + "default": "function_call", + "title": "Type", + "type": "string" + }, + "id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Id" + }, + "status": { + "type": "string", + "nullable": true, + "default": null, + "title": "Status" + } + }, + "required": [ + "call_id", + "name", + "arguments" + ], + "title": "OpenAIResponseOutputMessageFunctionToolCall", + "type": "object" + }, + "OpenAIResponseOutputMessageMCPCall": { + "description": "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "type": { + "const": "mcp_call", + "default": "mcp_call", + "title": "Type", + "type": "string" + }, + "arguments": { + "title": "Arguments", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "server_label": { + "title": "Server Label", + "type": "string" + }, + "error": { + "type": "string", + "nullable": true, + "default": null, + "title": "Error" + }, + "output": { + "type": "string", + "nullable": true, + "default": null, + "title": "Output" + } + }, + "required": [ + "id", + "arguments", + "name", + "server_label" + ], + "title": "OpenAIResponseOutputMessageMCPCall", + "type": "object" + }, + "OpenAIResponseOutputMessageMCPListTools": { + "description": "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "type": { + "const": "mcp_list_tools", + "default": "mcp_list_tools", + "title": "Type", + "type": "string" + }, + "server_label": { + "title": "Server Label", + "type": "string" + }, + "tools": { + "items": { + "$ref": "`#/components/schemas/`MCPListToolsTool" + }, + "title": "Tools", + "type": "array" + } + }, + "required": [ + "id", + "server_label", + "tools" + ], + "title": "OpenAIResponseOutputMessageMCPListTools", + "type": "object" + }, + "OpenAIResponseOutputMessageReasoningContent": { + "description": "Reasoning text from the model.", + "properties": { + "text": { + "description": "The reasoning text content from the model.", + "title": "Text", + "type": "string" + }, + "type": { + "const": "reasoning_text", + "default": "reasoning_text", + "description": "The type identifier, always 'reasoning_text'.", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "OpenAIResponseOutputMessageReasoningContent", + "type": "object" + }, + "OpenAIResponseOutputMessageReasoningItem": { + "description": "Reasoning output from the model, representing the model's thinking process.", + "properties": { + "id": { + "description": "Unique identifier for the reasoning output item.", + "title": "Id", + "type": "string" + }, + "summary": { + "description": "Summary of the reasoning output.", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningSummary" + }, + "title": "Summary", + "type": "array" + }, + "type": { + "const": "reasoning", + "default": "reasoning", + "description": "The type identifier, always 'reasoning'.", + "title": "Type", + "type": "string" + }, + "content": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningContent" + }, + "nullable": true, + "default": null, + "description": "The reasoning content from the model.", + "title": "Content" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true, + "default": null, + "description": "The status of the reasoning output.", + "title": "Status" + } + }, + "required": [ + "id", + "summary" + ], + "title": "OpenAIResponseOutputMessageReasoningItem", + "type": "object" + }, + "OpenAIResponseOutputMessageReasoningSummary": { + "description": "A summary of reasoning output from the model.", + "properties": { + "text": { + "description": "The summary text of the reasoning output.", + "title": "Text", + "type": "string" + }, + "type": { + "const": "summary_text", + "default": "summary_text", + "description": "The type identifier, always 'summary_text'.", + "title": "Type", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "OpenAIResponseOutputMessageReasoningSummary", + "type": "object" + }, + "OpenAIResponseOutputMessageWebSearchToolCall": { + "description": "Web search tool call output message for OpenAI responses.", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "status": { + "title": "Status", + "type": "string" + }, + "type": { + "const": "web_search_call", + "default": "web_search_call", + "title": "Type", + "type": "string" + }, + "action": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`WebSearchActionSearch" + }, + { + "$ref": "`#/components/schemas/`WebSearchActionOpenPage" + }, + { + "$ref": "`#/components/schemas/`WebSearchActionFind" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Action" + } + }, + "required": [ + "id", + "status" + ], + "title": "OpenAIResponseOutputMessageWebSearchToolCall", + "type": "object" + }, + "OpenAIResponsePrompt": { + "description": "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "discriminator": { + "mapping": { + "input_file": "`#/components/schemas/`OpenAIResponseInputMessageContentFile", + "input_image": "`#/components/schemas/`OpenAIResponseInputMessageContentImage", + "input_text": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentImage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentFile" + } + ] + }, + "nullable": true, + "default": null, + "title": "Variables" + }, + "version": { + "type": "string", + "nullable": true, + "default": null, + "title": "Version" + } + }, + "required": [ + "id" + ], + "title": "OpenAIResponsePrompt", + "type": "object" + }, + "OpenAIResponseReasoning": { + "description": "Configuration for reasoning effort in OpenAI responses.\n\nControls how much reasoning the model performs before generating a response.\n\n:param effort: The effort level for reasoning. \"low\" favors speed and economical token usage,\n \"high\" favors more complete reasoning, \"medium\" is a balance between the two.", + "properties": { + "effort": { + "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], + "nullable": true, + "default": null, + "title": "Effort" + }, + "generate_summary": { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], + "nullable": true, + "default": null, + "deprecated": true, + "description": "Deprecated: use 'summary' instead.", + "title": "Generate Summary" + }, + "summary": { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], + "nullable": true, + "default": null, + "description": "Summary mode for reasoning output. One of 'auto', 'concise', or 'detailed'.", + "title": "Summary" + } + }, + "title": "OpenAIResponseReasoning", + "type": "object" + }, + "OpenAIResponseText": { + "description": "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements\n:param verbosity: (Optional) Controls response verbosity level", + "properties": { + "format": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseTextFormat" + }, + { + "type": "null" + } + ], + "default": null + }, + "verbosity": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ], + "nullable": true, + "default": "medium", + "title": "Verbosity" + } + }, + "title": "OpenAIResponseText", + "type": "object" + }, + "OpenAIResponseTextFormat": { + "description": "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema.", + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "const": "json_schema", + "type": "string" + }, + { + "const": "json_object", + "type": "string" + } + ], + "title": "Type" + }, + "name": { + "type": "string", + "nullable": true, + "title": "Name" + }, + "schema": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "title": "Schema" + }, + "description": { + "type": "string", + "nullable": true, + "title": "Description" + }, + "strict": { + "type": "boolean", + "nullable": true, + "title": "Strict" + } + }, + "title": "OpenAIResponseTextFormat", + "type": "object" + }, + "OpenAITokenLogProb": { + "description": "The log probability for a token from an OpenAI-compatible chat completion response.", + "properties": { + "token": { + "description": "The token.", + "title": "Token", + "type": "string" + }, + "bytes": { + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true, + "default": null, + "description": "The bytes for the token.", + "title": "Bytes" + }, + "logprob": { + "description": "The log probability of the token.", + "title": "Logprob", + "type": "number" + }, + "top_logprobs": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITopLogProb" + }, + "nullable": true, + "default": null, + "description": "The top log probabilities for the token.", + "title": "Top Logprobs" + } + }, + "required": [ + "token", + "logprob" + ], + "title": "OpenAITokenLogProb", + "type": "object" + }, + "OpenAITopLogProb": { + "description": "The top log probability for a token from an OpenAI-compatible chat completion response.", + "properties": { + "token": { + "description": "The token.", + "title": "Token", + "type": "string" + }, + "bytes": { + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true, + "default": null, + "description": "The bytes for the token.", + "title": "Bytes" + }, + "logprob": { + "description": "The log probability of the token.", + "title": "Logprob", + "type": "number" + } + }, + "required": [ + "token", + "logprob" + ], + "title": "OpenAITopLogProb", + "type": "object" + }, + "ResponseInput": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "`#/components/schemas/`ResponseItem" + }, + "type": "array" + } + ] + }, + "ResponseItem": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseMessage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageWebSearchToolCall" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFileSearchToolCall" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputFunctionToolCallOutput" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageMCPCall" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageMCPListTools" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseMCPApprovalRequest" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFunctionToolCall" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseMCPApprovalResponse" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningItem" + } + ] + }, + "ResponsesApiParams": { + "description": "Parameters for an OGX Responses API request.\n\nAll fields accepted by the OGX client responses.create() body are\nincluded so that dumped model can be passed directly to response create.", + "properties": { + "input": { + "$ref": "`#/components/schemas/`ResponseInput", + "description": "The input text or structured input items" + }, + "model": { + "description": "The full model ID in format \"provider/model\"", + "title": "Model", + "type": "string" + }, + "conversation": { + "description": "The conversation ID in OGX format", + "title": "Conversation", + "type": "string" + }, + "include": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`IncludeParameter" + }, + "nullable": true, + "default": null, + "description": "Output item types to include in the response", + "title": "Include" + }, + "instructions": { + "type": "string", + "nullable": true, + "default": null, + "description": "The resolved system prompt", + "title": "Instructions" + }, + "max_infer_iters": { + "type": "integer", + "nullable": true, + "default": null, + "description": "Maximum number of inference iterations", + "title": "Max Infer Iters" + }, + "max_output_tokens": { + "type": "integer", + "nullable": true, + "default": null, + "description": "Maximum number of tokens allowed in the response", + "title": "Max Output Tokens" + }, + "max_tool_calls": { + "type": "integer", + "nullable": true, + "default": null, + "description": "Maximum tool calls allowed in a single response", + "title": "Max Tool Calls" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "default": null, + "description": "Custom metadata for tracking or logging", + "title": "Metadata" + }, + "parallel_tool_calls": { + "type": "boolean", + "nullable": true, + "default": null, + "description": "Whether the model can make multiple tool calls in parallel", + "title": "Parallel Tool Calls" + }, + "previous_response_id": { + "type": "string", + "nullable": true, + "default": null, + "description": "Identifier of the previous response in a multi-turn conversation", + "title": "Previous Response Id" + }, + "prompt_cache_key": { + "type": "string", + "nullable": true, + "default": null, + "description": "Prompt cache key used by providers that support prompt caching", + "title": "Prompt Cache Key" + }, + "prompt": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponsePrompt" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Prompt template with variables for dynamic substitution" + }, + "reasoning": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseReasoning" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Reasoning configuration for the response" + }, + "safety_identifier": { + "type": "string", + "nullable": true, + "default": null, + "description": "Stable identifier for safety monitoring and abuse detection", + "title": "Safety Identifier" + }, + "store": { + "description": "Whether to store the response", + "title": "Store", + "type": "boolean" + }, + "stream": { + "description": "Whether to stream the response", + "title": "Stream", + "type": "boolean" + }, + "temperature": { + "type": "number", + "nullable": true, + "default": null, + "description": "Sampling temperature (e.g. 0.0-2.0)", + "title": "Temperature" + }, + "text": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseText" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Text response configuration (format constraints)" + }, + "tool_choice": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceMode" + }, + { + "discriminator": { + "mapping": { + "allowed_tools": "`#/components/schemas/`OpenAIResponseInputToolChoiceAllowedTools", + "custom": "`#/components/schemas/`OpenAIResponseInputToolChoiceCustomTool", + "file_search": "`#/components/schemas/`OpenAIResponseInputToolChoiceFileSearch", + "function": "`#/components/schemas/`OpenAIResponseInputToolChoiceFunctionTool", + "mcp": "`#/components/schemas/`OpenAIResponseInputToolChoiceMCPTool", + "web_search": "`#/components/schemas/`OpenAIResponseInputToolChoiceWebSearch", + "web_search_2025_08_26": "`#/components/schemas/`OpenAIResponseInputToolChoiceWebSearch", + "web_search_preview": "`#/components/schemas/`OpenAIResponseInputToolChoiceWebSearch", + "web_search_preview_2025_03_11": "`#/components/schemas/`OpenAIResponseInputToolChoiceWebSearch" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceAllowedTools" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceFileSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceWebSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceFunctionTool" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceMCPTool" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolChoiceCustomTool" + } + ] + }, + { + "type": "null" + } + ], + "default": null, + "description": "Tool selection strategy", + "title": "Tool Choice" + }, + "tools": { + "type": "array", + "items": { + "discriminator": { + "mapping": { + "file_search": "`#/components/schemas/`OpenAIResponseInputToolFileSearch", + "function": "`#/components/schemas/`OpenAIResponseInputToolFunction", + "mcp": "`#/components/schemas/`InputToolMCP", + "web_search": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_2025_08_26": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview_2025_03_11": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFileSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFunction" + }, + { + "$ref": "`#/components/schemas/`InputToolMCP" + } + ] + }, + "nullable": true, + "default": null, + "description": "Prepared tool groups for Responses API (same type as ResponsesRequest.tools)", + "title": "Tools" + }, + "extra_headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "default": null, + "description": "Extra HTTP headers to send with the request (e.g. X-OGX-Provider-Data)", + "title": "Extra Headers" + }, + "omit_conversation": { + "default": false, + "description": "When True, the conversation parameter is dropped from the request body while remaining on the object for identity. Set by conversation compaction (LCORE-1572): once a conversation is compacted, lightspeed-stack supplies explicit input and must not let OGX reload the full history via the conversation parameter.", + "title": "Omit Conversation", + "type": "boolean" + } + }, + "required": [ + "input", + "model", + "conversation", + "store", + "stream" + ], + "title": "ResponsesApiParams", + "type": "object" + }, + "SearchRankingOptions": { + "description": "Options for ranking and filtering search results.\n\nThis class configures how search results are ranked and filtered. You can use algorithm-based\nrerankers (weighted, RRF) or neural rerankers. Defaults from VectorStoresConfig are\nused when parameters are not provided.\n\nExamples:\n # Weighted ranker with custom alpha\n SearchRankingOptions(ranker=\"weighted\", alpha=0.7)\n\n # RRF ranker with custom impact factor\n SearchRankingOptions(ranker=\"rrf\", impact_factor=50.0)\n\n # Use config defaults (just specify ranker type)\n SearchRankingOptions(ranker=\"weighted\") # Uses alpha from VectorStoresConfig\n\n # Score threshold filtering\n SearchRankingOptions(ranker=\"weighted\", score_threshold=0.5)\n\n:param ranker: (Optional) Name of the ranking algorithm to use. Supported values:\n - \"weighted\": Weighted combination of vector and keyword scores\n - \"rrf\": Reciprocal Rank Fusion algorithm\n - \"neural\": Neural reranking model (requires model parameter)\n Note: For OpenAI API compatibility, any string value is accepted, but only the above values are supported.\n:param score_threshold: (Optional) Minimum relevance score threshold for results. Default: 0.0\n:param alpha: (Optional) Weight factor for weighted ranker (0-1).\n - 0.0 = keyword only\n - 0.5 = equal weight (default)\n - 1.0 = vector only\n Only used when ranker=\"weighted\" and weights is not provided.\n Falls back to VectorStoresConfig.chunk_retrieval_params.weighted_search_alpha if not provided.\n:param impact_factor: (Optional) Impact factor (k) for RRF algorithm.\n Lower values emphasize higher-ranked results. Default: 60.0 (optimal from research).\n Only used when ranker=\"rrf\".\n Falls back to VectorStoresConfig.chunk_retrieval_params.rrf_impact_factor if not provided.\n:param weights: (Optional) Dictionary of weights for combining different signal types.\n Keys can be \"vector\", \"keyword\", \"neural\". Values should sum to 1.0.\n Used when combining algorithm-based reranking with neural reranking.\n Example: {\"vector\": 0.3, \"keyword\": 0.3, \"neural\": 0.4}\n:param model: (Optional) Model identifier for neural reranker\n (e.g., \"sentence-transformers/Qwen/Qwen3-Reranker-0.6B\"). Required when ranker=\"neural\" or when\n weights contains \"neural\".", + "properties": { + "ranker": { + "type": "string", + "nullable": true, + "default": null, + "title": "Ranker" + }, + "score_threshold": { + "type": "number", + "nullable": true, + "default": 0.0, + "title": "Score Threshold" + }, + "alpha": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "nullable": true, + "default": null, + "description": "Weight factor for weighted ranker", + "title": "Alpha" + }, + "impact_factor": { + "type": "number", + "minimum": 0.0, + "exclusiveMinimum": true, + "nullable": true, + "default": null, + "description": "Impact factor for RRF algorithm", + "title": "Impact Factor" + }, + "weights": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "nullable": true, + "default": null, + "description": "Weights for combining vector, keyword, and neural scores. Keys: 'vector', 'keyword', 'neural'", + "title": "Weights" + }, + "model": { + "type": "string", + "nullable": true, + "default": null, + "description": "Model identifier for neural reranker", + "title": "Model" + } + }, + "title": "SearchRankingOptions", + "type": "object" + }, + "WebSearchActionFind": { + "description": "Web search action: searches for a pattern within a loaded page.", + "properties": { + "type": { + "const": "find_in_page", + "default": "find_in_page", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "pattern": { + "title": "Pattern", + "type": "string" + } + }, + "required": [ + "url", + "pattern" + ], + "title": "WebSearchActionFind", + "type": "object" + }, + "WebSearchActionOpenPage": { + "description": "Web search action: opens a specific URL from search results.", + "properties": { + "type": { + "const": "open_page", + "default": "open_page", + "title": "Type", + "type": "string" + }, + "url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Url" + } + }, + "title": "WebSearchActionOpenPage", + "type": "object" + }, + "WebSearchActionSearch": { + "description": "Web search action: performs a search query.", + "properties": { + "type": { + "const": "search", + "default": "search", + "title": "Type", + "type": "string" + }, + "query": { + "title": "Query", + "type": "string" + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "title": "Queries" + }, + "sources": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`WebSearchSource" + }, + "nullable": true, + "default": null, + "title": "Sources" + } + }, + "required": [ + "query" + ], + "title": "WebSearchActionSearch", + "type": "object" + }, + "WebSearchFilters": { + "description": "Domain filters for web search results.", + "properties": { + "allowed_domains": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "title": "Allowed Domains" + } + }, + "title": "WebSearchFilters", + "type": "object" + }, + "WebSearchSource": { + "description": "A source URL returned by a web search action.", + "properties": { + "type": { + "const": "url", + "default": "url", + "title": "Type", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "WebSearchSource", + "type": "object" + }, + "WebSearchUserLocation": { + "description": "Approximate user location to refine web search results.", + "properties": { + "type": { + "const": "approximate", + "default": "approximate", + "title": "Type", + "type": "string" + }, + "city": { + "type": "string", + "nullable": true, + "default": null, + "title": "City" + }, + "country": { + "type": "string", + "nullable": true, + "default": null, + "title": "Country" + }, + "region": { + "type": "string", + "nullable": true, + "default": null, + "title": "Region" + }, + "timezone": { + "type": "string", + "nullable": true, + "default": null, + "title": "Timezone" + } + }, + "title": "WebSearchUserLocation", + "type": "object" + } + } + }, + "paths": {} +} \ No newline at end of file diff --git a/docs/models/conversation_summary.json b/docs/models/conversation_summary.json index bf22405eb..2ff91be26 100644 --- a/docs/models/conversation_summary.json +++ b/docs/models/conversation_summary.json @@ -23,6 +23,7 @@ "token_count": { "description": "Number of tokens in summary_text.", "minimum": 0, + "exclusiveMinimum": true, "title": "Token count", "type": "integer" }, diff --git a/docs/models/requests.json b/docs/models/requests.json index f196b2022..d21b06606 100644 --- a/docs/models/requests.json +++ b/docs/models/requests.json @@ -11,6 +11,9 @@ "properties": { "tool_names": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Tool Names" @@ -24,12 +27,18 @@ "properties": { "always": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Always" }, "never": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Never" @@ -214,6 +223,7 @@ }, "user_feedback": { "type": "string", + "maxLength": 4096, "nullable": true, "default": null, "description": "Feedback on the LLM response.", @@ -224,6 +234,16 @@ }, "categories": { "type": "array", + "items": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`FeedbackCategory" + }, + { + "$ref": "`#/components/schemas/`PositiveFeedbackCategory" + } + ] + }, "nullable": true, "default": null, "description": "List of positive or negative feedback categories.", @@ -305,6 +325,7 @@ }, "headers": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "title": "Headers" @@ -448,6 +469,9 @@ }, "authorization_headers": { "type": "object", + "additionalProperties": { + "type": "string" + }, "nullable": true, "default": null, "description": "Headers to send to the MCP server. Values must be one of the supported token resolution keywords: 'client' - forward the caller's token provided via MCP-HEADERS, 'kubernetes' - use the authenticated user's Kubernetes token, 'oauth' - use an OAuth token provided via MCP-HEADERS. File-path based secrets (used in static YAML config) are not supported for dynamically registered servers.", @@ -466,6 +490,9 @@ }, "headers": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "List of HTTP header names to forward from incoming requests", @@ -478,6 +505,8 @@ }, "timeout": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Request timeout in seconds for the MCP server", @@ -999,12 +1028,15 @@ }, "filters": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "title": "Filters" }, "max_num_results": { "type": "integer", + "maximum": 50, + "minimum": 1, "nullable": true, "default": 10, "title": "Max Num Results" @@ -1048,6 +1080,7 @@ }, "parameters": { "type": "object", + "additionalProperties": true, "nullable": true, "title": "Parameters" }, @@ -1092,6 +1125,11 @@ }, "search_context_size": { "type": "string", + "enum": [ + "low", + "medium", + "high" + ], "nullable": true, "default": null, "title": "Search Context Size" @@ -1340,6 +1378,9 @@ }, "logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITokenLogProb" + }, "nullable": true, "default": null, "title": "Logprobs" @@ -1377,6 +1418,9 @@ }, "results": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFileSearchToolCallResults" + }, "nullable": true, "default": null, "title": "Results" @@ -1594,6 +1638,9 @@ }, "content": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningContent" + }, "nullable": true, "default": null, "description": "The reasoning content from the model.", @@ -1601,6 +1648,11 @@ }, "status": { "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], "nullable": true, "default": null, "description": "The status of the reasoning output.", @@ -1688,6 +1740,27 @@ }, "variables": { "type": "object", + "additionalProperties": { + "discriminator": { + "mapping": { + "input_file": "`#/components/schemas/`OpenAIResponseInputMessageContentFile", + "input_image": "`#/components/schemas/`OpenAIResponseInputMessageContentImage", + "input_text": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentImage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentFile" + } + ] + }, "nullable": true, "default": null, "title": "Variables" @@ -1710,12 +1783,25 @@ "properties": { "effort": { "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], "nullable": true, "default": null, "title": "Effort" }, "generate_summary": { "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], "nullable": true, "default": null, "deprecated": true, @@ -1724,6 +1810,11 @@ }, "summary": { "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], "nullable": true, "default": null, "description": "Summary mode for reasoning output. One of 'auto', 'concise', or 'detailed'.", @@ -1749,6 +1840,11 @@ }, "verbosity": { "type": "string", + "enum": [ + "low", + "medium", + "high" + ], "nullable": true, "default": "medium", "title": "Verbosity" @@ -1784,6 +1880,7 @@ }, "schema": { "type": "object", + "additionalProperties": true, "nullable": true, "title": "Schema" }, @@ -1811,6 +1908,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -1823,6 +1923,9 @@ }, "top_logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITopLogProb" + }, "nullable": true, "default": null, "description": "The top log probabilities for the token.", @@ -1846,6 +1949,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -1900,6 +2006,9 @@ }, "variables": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "Variable names allowed in the template", @@ -1946,6 +2055,7 @@ 1 ], "minimum": 0, + "exclusiveMinimum": true, "title": "Version", "type": "integer" }, @@ -1961,6 +2071,9 @@ }, "variables": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "Updated allowed variable names", @@ -2067,6 +2180,9 @@ }, "attachments": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`Attachment" + }, "nullable": true, "default": null, "description": "The optional list of attachments.", @@ -2124,6 +2240,9 @@ }, "vector_store_ids": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "Optional list of specific vector store IDs to query for RAG. If not provided, all available vector stores will be queried.", @@ -2136,6 +2255,9 @@ }, "shield_ids": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "Optional list of configured shield names to apply. If None, all configured shields are used.", @@ -2261,6 +2383,9 @@ }, "include": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`IncludeParameter" + }, "nullable": true, "default": null, "title": "Include" @@ -2291,6 +2416,9 @@ }, "metadata": { "type": "object", + "additionalProperties": { + "type": "string" + }, "nullable": true, "default": null, "title": "Metadata" @@ -2418,6 +2546,34 @@ }, "tools": { "type": "array", + "items": { + "discriminator": { + "mapping": { + "file_search": "`#/components/schemas/`OpenAIResponseInputToolFileSearch", + "function": "`#/components/schemas/`OpenAIResponseInputToolFunction", + "mcp": "`#/components/schemas/`InputToolMCP", + "web_search": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_2025_08_26": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview_2025_03_11": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFileSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFunction" + }, + { + "$ref": "`#/components/schemas/`InputToolMCP" + } + ] + }, "nullable": true, "default": null, "title": "Tools" @@ -2430,6 +2586,9 @@ }, "shield_ids": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Shield Ids" @@ -2708,6 +2867,8 @@ }, "alpha": { "type": "number", + "maximum": 1.0, + "minimum": 0.0, "nullable": true, "default": null, "description": "Weight factor for weighted ranker", @@ -2715,6 +2876,8 @@ }, "impact_factor": { "type": "number", + "minimum": 0.0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Impact factor for RRF algorithm", @@ -2722,6 +2885,9 @@ }, "weights": { "type": "object", + "additionalProperties": { + "type": "number" + }, "nullable": true, "default": null, "description": "Weights for combining vector, keyword, and neural scores. Keys: 'vector', 'keyword', 'neural'", @@ -2744,6 +2910,12 @@ "properties": { "mode": { "type": "string", + "enum": [ + "semantic", + "hybrid", + "lexical", + "keyword" + ], "nullable": true, "default": null, "description": "Solr vector_io search mode. When omitted, the configured OKP default is used; otherwise 'hybrid' applies. 'keyword' and 'lexical' both use BM25 text search.", @@ -2757,6 +2929,7 @@ }, "filters": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Solr provider filter payload passed through as params['solr']. Supports structured metadata filters (eq, ne, in, nin comparison operators). Legacy filter-only objects (e.g. fq) are still accepted.", @@ -2862,6 +3035,8 @@ }, "embedding_dimension": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Dimension of the embedding vectors", @@ -2872,6 +3047,7 @@ }, "chunking_strategy": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Chunking strategy configuration", @@ -2896,6 +3072,7 @@ }, "metadata": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Metadata dictionary for storing session information", @@ -2941,6 +3118,19 @@ }, "attributes": { "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, "nullable": true, "default": null, "description": "Set of up to 16 key-value pairs for storing additional information. Keys: strings (max 64 chars). Values: strings (max 512 chars), booleans, or numbers.", @@ -2954,6 +3144,7 @@ }, "chunking_strategy": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Chunking strategy configuration for this file", @@ -2988,6 +3179,8 @@ "properties": { "name": { "type": "string", + "maxLength": 256, + "minLength": 1, "nullable": true, "default": null, "description": "New name for the vector store", @@ -2998,6 +3191,8 @@ }, "expires_at": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Unix timestamp when the vector store should expire", @@ -3008,6 +3203,7 @@ }, "metadata": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Metadata dictionary for storing session information", @@ -3082,12 +3278,18 @@ }, "queries": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Queries" }, "sources": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`WebSearchSource" + }, "nullable": true, "default": null, "title": "Sources" @@ -3104,6 +3306,9 @@ "properties": { "allowed_domains": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Allowed Domains" diff --git a/docs/models/successful_responses.json b/docs/models/successful_responses.json index 14cd641c0..27c79683f 100644 --- a/docs/models/successful_responses.json +++ b/docs/models/successful_responses.json @@ -173,6 +173,11 @@ }, "model_type": { "type": "string", + "enum": [ + "llm", + "embedding", + "rerank" + ], "nullable": true, "default": null, "description": "Optional capability override (llm, embedding, or rerank).", @@ -197,6 +202,9 @@ "properties": { "tool_names": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Tool Names" @@ -237,6 +245,7 @@ "default": 300, "description": "Seconds before pending approval requests expire", "minimum": 0, + "exclusiveMinimum": true, "title": "Approval timeout", "type": "integer" }, @@ -244,6 +253,7 @@ "default": 30, "description": "Days to retain decided approvals before cleanup", "minimum": 0, + "exclusiveMinimum": true, "title": "Retention period", "type": "integer" } @@ -279,12 +289,15 @@ }, "k8s_cluster_api": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "title": "K8S Cluster Api" }, "k8s_ca_cert_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "K8S Ca Cert Path" @@ -447,6 +460,8 @@ }, "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "title": "API key" @@ -496,6 +511,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -509,6 +525,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -551,6 +568,8 @@ }, "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "description": "Optional Bedrock bearer token (alternative to SigV4).", @@ -582,6 +601,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -595,6 +615,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -627,6 +648,7 @@ "default": 10, "description": "Maximum total number of chunks returned across all BYOK stores.", "minimum": 0, + "exclusiveMinimum": true, "title": "Max BYOK chunks", "type": "integer" }, @@ -917,6 +939,10 @@ }, "config_format_version": { "type": "string", + "enum": [ + "legacy", + "unified" + ], "nullable": true, "default": null, "description": "Optional explicit marker of the configuration format. When set, it must agree with the shape detected from the configuration body: 'unified' requires a synthesis input (a non-empty inference.providers, a non-empty vector_store.providers, or an ogx.config block), 'legacy' requires no synthesis input. Reserved as the lever for a future breaking change of the unified schema (R11).", @@ -1411,6 +1437,12 @@ "properties": { "type": { "type": "string", + "enum": [ + "noop", + "memory", + "sqlite", + "postgres" + ], "nullable": true, "default": null, "description": "Type of database where the conversation history is to be stored.", @@ -1757,6 +1789,7 @@ }, "system_prompt_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "System Prompt Path" @@ -1769,12 +1802,14 @@ }, "agent_card_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Agent Card Path" }, "agent_card_config": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "title": "Agent Card Config" @@ -1853,6 +1888,7 @@ "embedding_dimension": { "description": "Dimensionality of embedding vectors for this provider.", "minimum": 0, + "exclusiveMinimum": true, "title": "Embedding dimension", "type": "integer" }, @@ -2016,6 +2052,8 @@ }, "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "description": "API key for the inference", @@ -2025,6 +2063,7 @@ "default": 2, "description": "Maximun number of retries", "minimum": 0, + "exclusiveMinimum": true, "maximum": 5, "title": "Max retries", "type": "integer" @@ -2033,6 +2072,7 @@ "default": 30, "description": "Request timeout in seconds", "minimum": 5, + "exclusiveMinimum": true, "maximum": 300, "title": "Timeout", "type": "integer" @@ -2077,6 +2117,7 @@ "default": 50, "description": "For risks with `output` in `points`, re-check the response against those risks approximately every N generated output tokens while streaming, plus once more over any remaining text once generation completes. Ignored when no configured risk targets the `output` point.", "minimum": 0, + "exclusiveMinimum": true, "title": "Streaming output check interval (tokens)", "type": "integer" } @@ -2138,6 +2179,7 @@ "max_entries": { "description": "Maximum number of entries stored in the in-memory cache", "minimum": 0, + "exclusiveMinimum": true, "title": "Max entries", "type": "integer" } @@ -2169,6 +2211,7 @@ "context_windows": { "additionalProperties": { "minimum": 0, + "exclusiveMinimum": true, "type": "integer" }, "description": "Deprecated: set metadata.context_window on the model's inference.providers[].allowed_models entry instead. Map of fully-qualified model identifier (e.g., \"openai/gpt-5.6-luna\") to context window size in tokens, used by conversation compaction when the model's catalog metadata has no context_window.", @@ -2219,6 +2262,8 @@ }, "max_infer_iters": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": 10, "description": "Server-side default for the maximum number of inference iterations a model can perform in a single request. Prevents small models from looping indefinitely on tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", @@ -2226,6 +2271,8 @@ }, "max_tool_calls": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": 30, "description": "Server-side default for the maximum number of tool calls allowed in a single response. Prevents small models from exhausting the context window with repeated tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", @@ -2683,6 +2730,9 @@ }, "referenced_documents": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`ReferencedDocument" + }, "nullable": true, "default": null, "description": "List of documents referenced in the response (assistant messages only)", @@ -2751,6 +2801,8 @@ }, "timeout": { "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Timeout in seconds for requests to the MCP server. If not specified, the default timeout from OGX will be used. Note: This field is reserved for future use when OGX adds timeout support.", @@ -2819,6 +2871,8 @@ "properties": { "url": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "description": "URL to OGX service; used when library mode is disabled. Must be a valid HTTP or HTTPS URL.", @@ -2826,6 +2880,8 @@ }, "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "description": "API key to access OGX service", @@ -2849,6 +2905,7 @@ "default": 180, "description": "Timeout in seconds for requests to OGX service. Default is 180 seconds (3 minutes) to accommodate long-running RAG queries.", "minimum": 0, + "exclusiveMinimum": true, "title": "Request timeout", "type": "integer" }, @@ -2856,6 +2913,7 @@ "default": 5, "description": "Maximum number of connection attempts before giving up. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", "minimum": 0, + "exclusiveMinimum": true, "title": "Maximum number of connection attempts before giving up", "type": "integer" }, @@ -2863,6 +2921,7 @@ "default": 2, "description": "Delay in seconds between retry attempts. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", "minimum": 0, + "exclusiveMinimum": true, "title": "Delay in seconds between retry attempts", "type": "integer" }, @@ -2896,6 +2955,8 @@ "properties": { "rhokp_url": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "description": "Base URL for the OKP server (http or https). Set to `${env.RH_SERVER_OKP}` in YAML to use the environment variable. When unset, the default from constants is used.", @@ -2916,6 +2977,11 @@ }, "search_mode": { "type": "string", + "enum": [ + "semantic", + "hybrid", + "keyword" + ], "nullable": true, "default": null, "description": "Default Solr search mode for OKP queries. 'keyword' uses BM25 text search (no embedding model needed). 'hybrid' combines vector + keyword search. 'semantic' uses pure vector search. When unset, falls back to the global default ('hybrid').", @@ -2925,6 +2991,7 @@ "default": 5, "description": "Maximum number of chunks fetched from OKP.", "minimum": 0, + "exclusiveMinimum": true, "title": "Max OKP chunks", "type": "integer" } @@ -2938,6 +3005,8 @@ "properties": { "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "title": "API key" @@ -2974,6 +3043,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -2987,6 +3057,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -3451,12 +3522,15 @@ }, "filters": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "title": "Filters" }, "max_num_results": { "type": "integer", + "maximum": 50, + "minimum": 1, "nullable": true, "default": 10, "title": "Max Num Results" @@ -3500,6 +3574,7 @@ }, "parameters": { "type": "object", + "additionalProperties": true, "nullable": true, "title": "Parameters" }, @@ -3544,6 +3619,11 @@ }, "search_context_size": { "type": "string", + "enum": [ + "low", + "medium", + "high" + ], "nullable": true, "default": null, "title": "Search Context Size" @@ -3755,6 +3835,9 @@ }, "logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITokenLogProb" + }, "nullable": true, "default": null, "title": "Logprobs" @@ -3792,6 +3875,9 @@ }, "results": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageFileSearchToolCallResults" + }, "nullable": true, "default": null, "title": "Results" @@ -4009,6 +4095,9 @@ }, "content": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAIResponseOutputMessageReasoningContent" + }, "nullable": true, "default": null, "description": "The reasoning content from the model.", @@ -4016,6 +4105,11 @@ }, "status": { "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], "nullable": true, "default": null, "description": "The status of the reasoning output.", @@ -4103,6 +4197,27 @@ }, "variables": { "type": "object", + "additionalProperties": { + "discriminator": { + "mapping": { + "input_file": "`#/components/schemas/`OpenAIResponseInputMessageContentFile", + "input_image": "`#/components/schemas/`OpenAIResponseInputMessageContentImage", + "input_text": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentText" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentImage" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputMessageContentFile" + } + ] + }, "nullable": true, "default": null, "title": "Variables" @@ -4125,12 +4240,25 @@ "properties": { "effort": { "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], "nullable": true, "default": null, "title": "Effort" }, "generate_summary": { "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], "nullable": true, "default": null, "deprecated": true, @@ -4139,6 +4267,11 @@ }, "summary": { "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], "nullable": true, "default": null, "description": "Summary mode for reasoning output. One of 'auto', 'concise', or 'detailed'.", @@ -4164,6 +4297,11 @@ }, "verbosity": { "type": "string", + "enum": [ + "low", + "medium", + "high" + ], "nullable": true, "default": "medium", "title": "Verbosity" @@ -4199,6 +4337,7 @@ }, "schema": { "type": "object", + "additionalProperties": true, "nullable": true, "title": "Schema" }, @@ -4324,6 +4463,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -4336,6 +4478,9 @@ }, "top_logprobs": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`OpenAITopLogProb" + }, "nullable": true, "default": null, "description": "The top log probabilities for the token.", @@ -4359,6 +4504,9 @@ }, "bytes": { "type": "array", + "items": { + "type": "integer" + }, "nullable": true, "default": null, "description": "The bytes for the token.", @@ -4396,6 +4544,7 @@ "embedding_dimension": { "description": "Dimensionality of embedding vectors for this provider.", "minimum": 0, + "exclusiveMinimum": true, "title": "Embedding dimension", "type": "integer" }, @@ -4464,6 +4613,8 @@ }, "password": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "description": "PostgreSQL password. Defaults to ${env.POSTGRES_PASSWORD}.", @@ -4487,6 +4638,7 @@ "default": 5432, "description": "Database server port", "minimum": 0, + "exclusiveMinimum": true, "title": "Port", "type": "integer" }, @@ -4509,6 +4661,7 @@ }, "namespace": { "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", "nullable": true, "default": "public", "description": "Database namespace", @@ -4541,6 +4694,7 @@ }, "ca_cert_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "description": "Path to CA certificate", @@ -4642,6 +4796,9 @@ }, "variables": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "Variable names used in the template", @@ -5146,6 +5303,7 @@ "default": 1, "description": "Quota scheduler period specified in seconds", "minimum": 0, + "exclusiveMinimum": true, "title": "Period", "type": "integer" }, @@ -5153,6 +5311,7 @@ "default": 10, "description": "Database reconnection count on startup. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", "minimum": 0, + "exclusiveMinimum": true, "title": "Database reconnection count on startup", "type": "integer" }, @@ -5160,6 +5319,7 @@ "default": 1, "description": "Database reconnection delay specified in seconds. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", "minimum": 0, + "exclusiveMinimum": true, "title": "Database reconnection delay", "type": "integer" } @@ -5191,6 +5351,7 @@ }, "attributes": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Document metadata from the RAG provider (e.g., url, title, author)", @@ -5336,6 +5497,9 @@ "properties": { "required_entitlements": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "List of all required entitlements.", @@ -5345,6 +5509,7 @@ "default": 8192, "description": "Maximum allowed size in bytes for the base64-encoded x-rh-identity header. Headers exceeding this size are rejected before decoding.", "minimum": 0, + "exclusiveMinimum": true, "title": "Maximum header size", "type": "integer" } @@ -5403,6 +5568,7 @@ "default": 768, "description": "Dimensionality of embedding vectors.", "minimum": 0, + "exclusiveMinimum": true, "title": "Embedding dimension", "type": "integer" }, @@ -5423,6 +5589,7 @@ "default": 1.0, "description": "Multiplier applied to relevance scores from this vector store. Used to weight results when querying multiple knowledge sources. Values > 1 boost this store's results; values < 1 reduce them.", "minimum": 0, + "exclusiveMinimum": true, "title": "Score multiplier", "type": "number" }, @@ -5430,6 +5597,7 @@ "default": 0.3, "description": "Minimum raw similarity score to consider a result relevant. Results with a similarity score below this threshold are not returned.", "minimum": 0, + "exclusiveMinimum": true, "title": "Relevance cutoff score", "type": "number" }, @@ -5472,6 +5640,8 @@ }, "password": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "description": "PostgreSQL password for pgvector backend. Defaults to ${env.POSTGRES_PASSWORD} when backend is pgvector.", @@ -5536,6 +5706,9 @@ }, "impacts": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "description": "List of functional impacts when service is degraded or unhealthy", @@ -5652,6 +5825,8 @@ "properties": { "doc_url": { "type": "string", + "format": "uri", + "minLength": 1, "nullable": true, "default": null, "description": "URL of the referenced document", @@ -5890,6 +6065,34 @@ }, "tools": { "type": "array", + "items": { + "discriminator": { + "mapping": { + "file_search": "`#/components/schemas/`OpenAIResponseInputToolFileSearch", + "function": "`#/components/schemas/`OpenAIResponseInputToolFunction", + "mcp": "`#/components/schemas/`OpenAIResponseToolMCP", + "web_search": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_2025_08_26": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview": "`#/components/schemas/`OpenAIResponseInputToolWebSearch", + "web_search_preview_2025_03_11": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolWebSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFileSearch" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseInputToolFunction" + }, + { + "$ref": "`#/components/schemas/`OpenAIResponseToolMCP" + } + ] + }, "nullable": true, "default": null, "title": "Tools" @@ -5996,6 +6199,9 @@ }, "metadata": { "type": "object", + "additionalProperties": { + "type": "string" + }, "nullable": true, "default": null, "title": "Metadata" @@ -6071,6 +6277,7 @@ "default": 10, "description": "Maximum number of chunks returned by this retrieval strategy.", "minimum": 0, + "exclusiveMinimum": true, "title": "Max chunks", "type": "integer" }, @@ -6166,6 +6373,11 @@ }, "quota_subject": { "type": "string", + "enum": [ + "user_id", + "org_id", + "system_id" + ], "nullable": true, "default": null, "description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.", @@ -6199,6 +6411,9 @@ }, "tool_calls": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`ToolCallSummary" + }, "nullable": true, "default": null, "description": "Tool calls made during inference (requires include_metadata=true)", @@ -6206,6 +6421,9 @@ }, "tool_results": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`ToolResultSummary" + }, "nullable": true, "default": null, "description": "Results from tool calls (requires include_metadata=true)", @@ -6213,6 +6431,9 @@ }, "rag_chunks": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`RAGChunk" + }, "nullable": true, "default": null, "description": "Retrieved RAG documentation chunks (requires include_metadata=true)", @@ -6220,6 +6441,9 @@ }, "referenced_documents": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`ReferencedDocument" + }, "nullable": true, "default": null, "description": "Source documents referenced in answer (requires include_metadata=true)", @@ -6449,6 +6673,7 @@ "default": 50, "description": "Maximum number of saved prompts a user can create. Defaults to 50. Cannot exceed 200.", "minimum": 0, + "exclusiveMinimum": true, "maximum": 200, "title": "Max prompts per user", "type": "integer" @@ -6457,6 +6682,7 @@ "default": 255, "description": "Maximum character length for prompt display name (title). Defaults to 255. Cannot exceed 255.", "minimum": 0, + "exclusiveMinimum": true, "maximum": 255, "title": "Max display name length", "type": "integer" @@ -6465,6 +6691,7 @@ "default": 10000, "description": "Maximum character length for the prompt content body. Defaults to 10000. Cannot exceed 30000.", "minimum": 0, + "exclusiveMinimum": true, "maximum": 30000, "title": "Max content length", "type": "integer" @@ -6525,6 +6752,8 @@ }, "alpha": { "type": "number", + "maximum": 1.0, + "minimum": 0.0, "nullable": true, "default": null, "description": "Weight factor for weighted ranker", @@ -6532,6 +6761,8 @@ }, "impact_factor": { "type": "number", + "minimum": 0.0, + "exclusiveMinimum": true, "nullable": true, "default": null, "description": "Impact factor for RRF algorithm", @@ -6539,6 +6770,9 @@ }, "weights": { "type": "object", + "additionalProperties": { + "type": "number" + }, "nullable": true, "default": null, "description": "Weights for combining vector, keyword, and neural scores. Keys: 'vector', 'keyword', 'neural'", @@ -6597,6 +6831,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -6610,6 +6845,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -6648,6 +6884,7 @@ "default": 8080, "description": "Service port", "minimum": 0, + "exclusiveMinimum": true, "title": "Port", "type": "integer" }, @@ -6668,6 +6905,7 @@ "default": 1, "description": "Number of Uvicorn worker processes to start", "minimum": 0, + "exclusiveMinimum": true, "title": "Number of workers", "type": "integer" }, @@ -6675,6 +6913,7 @@ "default": 5, "description": "Maximum number of file uploads (POST /v1/files) processed concurrently per worker. Each in-flight upload can hold up to the configured maximum file size in memory, so this bounds worst-case memory usage from concurrent uploads. Additional uploads are rejected with 429 until a slot frees up.", "minimum": 0, + "exclusiveMinimum": true, "title": "Maximum concurrent file uploads", "type": "integer" }, @@ -6682,6 +6921,7 @@ "default": 5, "description": "Maximum number of vector store file attachments (POST /v1/vector-stores/{id}/files) processed concurrently per worker. Each in-flight attachment re-reads and chunks the source file, so this bounds worst-case memory usage independently of max_concurrent_file_uploads. Additional attachments are rejected with 429 until a slot frees up.", "minimum": 0, + "exclusiveMinimum": true, "title": "Maximum concurrent vector store file attachments", "type": "integer" }, @@ -6861,6 +7101,7 @@ }, "token_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "description": "Path to file containing the Splunk HEC authentication token.", @@ -6883,6 +7124,7 @@ "default": 5, "description": "HTTP timeout in seconds for HEC requests.", "minimum": 0, + "exclusiveMinimum": true, "title": "Timeout", "type": "integer" }, @@ -6992,6 +7234,7 @@ "properties": { "tls_certificate_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "description": "SSL/TLS certificate file path for HTTPS support.", @@ -6999,6 +7242,7 @@ }, "tls_key_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "description": "SSL/TLS private key file path for HTTPS support.", @@ -7006,6 +7250,7 @@ }, "tls_key_password": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "description": "Path to file containing the password to decrypt the SSL/TLS private key.", @@ -7140,6 +7385,9 @@ }, "allowed_service_accounts": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`TrustedProxyServiceAccount" + }, "nullable": true, "default": null, "description": "Optional allowlist of Kubernetes ServiceAccount identities permitted to act as trusted proxies. When set to null/omitted, any ServiceAccount with a valid token is accepted. When set to a non-empty list, only the listed ServiceAccounts are allowed. An empty list behaves the same as null (no restriction).", @@ -7400,6 +7648,7 @@ }, "attributes": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Set of up to 16 key-value pairs for storing additional information. Keys: strings (max 64 chars). Values: strings (max 512 chars), booleans, or numbers.", @@ -7538,6 +7787,7 @@ }, "metadata": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Metadata dictionary for storing session information", @@ -7655,6 +7905,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -7668,6 +7919,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -7704,6 +7956,8 @@ }, "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "title": "API key" @@ -7734,6 +7988,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -7747,6 +8002,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -7777,6 +8033,8 @@ "properties": { "api_key": { "type": "string", + "format": "password", + "writeOnly": true, "nullable": true, "default": null, "title": "API key" @@ -7819,6 +8077,7 @@ }, "model_profiles_path": { "type": "string", + "format": "file-path", "nullable": true, "default": null, "title": "Model profiles path" @@ -7832,6 +8091,7 @@ }, "extra": { "type": "object", + "additionalProperties": true, "nullable": true, "default": null, "description": "Deprecated escape hatch for unmodeled provider knobs.", @@ -7915,12 +8175,18 @@ }, "queries": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Queries" }, "sources": { "type": "array", + "items": { + "$ref": "`#/components/schemas/`WebSearchSource" + }, "nullable": true, "default": null, "title": "Sources" @@ -7937,6 +8203,9 @@ "properties": { "allowed_domains": { "type": "array", + "items": { + "type": "string" + }, "nullable": true, "default": null, "title": "Allowed Domains" diff --git a/docs/user_doc/config.json b/docs/user_doc/config.json index 2bef6d4e7..5b12109dc 100644 --- a/docs/user_doc/config.json +++ b/docs/user_doc/config.json @@ -1,3167 +1,3283 @@ { - "openapi": "3.0.0", - "info": { - "title": "Lightspeed Core Stack", - "version": "0.3.0" - }, - "components": { - "schemas": { - "A2AStateConfiguration": { - "additionalProperties": false, - "description": "A2A protocol persistent state configuration.\n\nConfigures how A2A task state and context-to-conversation mappings are\nstored. For multi-worker deployments, use SQLite or PostgreSQL to ensure\nstate is shared across all workers.\n\nIf no configuration is provided, in-memory storage is used (default).\nThis is suitable for single-worker deployments but state will be lost\non restarts and not shared across workers.\n\nAttributes:\n sqlite: SQLite database configuration for A2A state storage.\n postgres: PostgreSQL database configuration for A2A state storage.", - "properties": { - "sqlite": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "SQLite database configuration for A2A state storage.", - "title": "SQLite configuration" - }, - "postgres": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL database configuration for A2A state storage.", - "title": "PostgreSQL configuration" - } - }, - "title": "A2AStateConfiguration", - "type": "object" - }, - "APIKeyTokenConfiguration": { - "additionalProperties": false, - "description": "API Key Token configuration.", - "properties": { - "api_key": { - "examples": [ - "some-api-key" - ], - "format": "password", - "minLength": 1, - "title": "API key", - "type": "string", - "writeOnly": true - } - }, - "required": [ - "api_key" - ], - "title": "APIKeyTokenConfiguration", - "type": "object" - }, - "AccessRule": { - "additionalProperties": false, - "description": "Rule defining what actions a role can perform.", - "properties": { - "role": { - "description": "Name of the role", - "title": "Role name", - "type": "string" - }, - "actions": { - "description": "Allowed actions for this role", - "items": { - "$ref": "`#/components/schemas/`Action" - }, - "title": "Allowed actions", - "type": "array" - } - }, - "required": [ - "role", - "actions" - ], - "title": "AccessRule", - "type": "object" - }, - "Action": { - "description": "Available actions in the system.\n\nNote: this is not a real model, just an enumeration of all action names.", - "enum": [ - "admin", - "list_other_conversations", - "read_other_conversations", - "query_other_conversations", - "delete_other_conversations", - "query", - "responses", - "streaming_query", - "get_conversation", - "list_conversations", - "delete_conversation", - "update_conversation", - "feedback", - "get_models", - "get_tools", - "get_skills", - "get_shields", - "list_providers", - "get_provider", - "list_rags", - "get_rag", - "get_metrics", - "get_config", - "info", - "model_override", - "rlsapi_v1_infer", - "register_mcp_server", - "list_mcp_servers", - "delete_mcp_server", - "a2a_agent_card", - "a2a_task_execution", - "a2a_message", - "a2a_jsonrpc", - "manage_vector_stores", - "read_vector_stores", - "manage_files", - "manage_prompts", - "read_prompts", - "manage_saved_prompts" - ], - "title": "Action", - "type": "string" - }, - "AllowedModel": { - "additionalProperties": false, - "description": "Configuration for an allowed inference model.\n\nAccepts string IDs or dictionaries. String IDs populate both `name` and\n`provider_model_id`; dictionary inputs default `name` to `provider_model_id`.", - "properties": { - "name": { - "minLength": 1, - "title": "Local model name", - "type": "string" - }, - "provider_model_id": { - "minLength": 1, - "title": "Backend model id", - "type": "string" - }, - "model_type": { - "type": "string", - "nullable": true, - "default": null, - "description": "Optional capability override (llm, embedding, or rerank).", - "title": "Model type" - }, - "metadata": { - "additionalProperties": true, - "description": "Optional catalog metadata. context_window: the model's context window in tokens, used by conversation compaction.", - "title": "Model metadata", - "type": "object" - } - }, - "required": [ - "name", - "provider_model_id" - ], - "title": "AllowedModel", - "type": "object" - }, - "ApprovalFilter": { - "additionalProperties": false, - "description": "Granular approval control for specific MCP tools.\n\nAttributes:\n always: Tool names that always require human approval before execution.\n never: Tool names that never require approval (pre-approved).", - "properties": { - "always": { - "description": "List of tool names that always require human approval", - "items": { - "type": "string" - }, - "title": "Always require approval", - "type": "array" - }, - "never": { - "description": "List of tool names that never require approval", - "items": { - "type": "string" - }, - "title": "Never require approval", - "type": "array" - } - }, - "title": "ApprovalFilter", - "type": "object" - }, - "ApprovalsConfiguration": { - "additionalProperties": false, - "description": "Configuration for human-in-the-loop approvals.\n\nAttributes:\n approval_timeout_seconds: How long approval requests remain pending\n before expiring.\n approval_retention_days: How long to retain decided approvals for audit\n purposes before cleanup.", - "properties": { - "approval_timeout_seconds": { - "default": 300, - "description": "Seconds before pending approval requests expire", - "minimum": 0, - "title": "Approval timeout", - "type": "integer" - }, - "approval_retention_days": { - "default": 30, - "description": "Days to retain decided approvals before cleanup", - "minimum": 0, - "title": "Retention period", - "type": "integer" - } - }, - "title": "ApprovalsConfiguration", - "type": "object" - }, - "AuthenticationConfiguration": { - "additionalProperties": false, - "description": "Authentication configuration.", - "properties": { - "module": { - "default": "noop", - "title": "Module", - "type": "string" - }, - "skip_tls_verification": { - "default": false, - "title": "Skip Tls Verification", - "type": "boolean" - }, - "skip_for_health_probes": { - "default": false, - "description": "Skip authorization for readiness and liveness probes", - "title": "Skip authorization for probes", - "type": "boolean" - }, - "skip_for_metrics": { - "default": false, - "description": "Skip authorization for the /metrics endpoint", - "title": "Skip authorization for metrics", - "type": "boolean" - }, - "k8s_cluster_api": { - "type": "string", - "nullable": true, - "default": null, - "title": "K8S Cluster Api" - }, - "k8s_ca_cert_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "K8S Ca Cert Path" - }, - "jwk_config": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`JwkConfiguration" - }, - { - "type": "null" - } - ], - "default": null - }, - "api_key_config": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`APIKeyTokenConfiguration" - }, - { - "type": "null" - } - ], - "default": null - }, - "rh_identity_config": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`RHIdentityConfiguration" - }, - { - "type": "null" - } - ], - "default": null - }, - "trusted_proxy_config": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`TrustedProxyConfiguration" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "title": "AuthenticationConfiguration", - "type": "object" - }, - "AuthorizationConfiguration": { - "additionalProperties": false, - "description": "Authorization configuration.", - "properties": { - "access_rules": { - "description": "Rules for role-based access control", - "items": { - "$ref": "`#/components/schemas/`AccessRule" - }, - "title": "Access rules", - "type": "array" - } - }, - "title": "AuthorizationConfiguration", - "type": "object" - }, - "AzureEntraIdConfiguration": { - "additionalProperties": false, - "description": "Microsoft Entra ID authentication attributes for Azure.", - "properties": { - "tenant_id": { - "format": "password", - "title": "Tenant ID", - "type": "string", - "writeOnly": true - }, - "client_id": { - "format": "password", - "title": "Client ID", - "type": "string", - "writeOnly": true - }, - "client_secret": { - "format": "password", - "title": "Client secret", - "type": "string", - "writeOnly": true - }, - "scope": { - "default": "https://cognitiveservices.azure.com/.default", - "description": "Azure Cognitive Services scope for token requests. Override only if using a different Azure service.", - "title": "Token scope", - "type": "string" - } - }, - "required": [ - "tenant_id", - "client_id", - "client_secret" - ], - "title": "AzureEntraIdConfiguration", - "type": "object" - }, - "AzureInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for an Azure OpenAI inference provider.", - "properties": { - "base_url": { - "type": "string", - "nullable": true, - "default": null, - "title": "Azure OpenAI endpoint" - }, - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "title": "API key" - }, - "api_version": { - "type": "string", - "nullable": true, - "default": null, - "title": "API version" - }, - "entra_id": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`AzureEntraIdConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Preferred Entra ID auth for this provider. Takes precedence over the legacy top-level Azure Entra ID settings.", - "title": "Entra ID" - } - }, - "title": "AzureInferenceProviderConfig", - "type": "object" - }, - "AzureInferenceProviderEntry": { - "additionalProperties": false, - "description": "Azure OpenAI inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "azure", - "default": "azure", - "description": "Azure OpenAI remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`AzureInferenceProviderConfig", - "description": "Endpoint, API key or Entra ID, and API version.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "AzureInferenceProviderEntry", - "type": "object" - }, - "BedrockInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for an AWS Bedrock inference provider.", - "properties": { - "region": { - "type": "string", - "nullable": true, - "default": null, - "title": "AWS region" - }, - "profile_name": { - "type": "string", - "nullable": true, - "default": null, - "title": "AWS profile" - }, - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "description": "Optional Bedrock bearer token (alternative to SigV4).", - "title": "Bearer token" - } - }, - "title": "BedrockInferenceProviderConfig", - "type": "object" - }, - "BedrockInferenceProviderEntry": { - "additionalProperties": false, - "description": "AWS Bedrock inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "bedrock", - "default": "bedrock", - "description": "AWS Bedrock remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`BedrockInferenceProviderConfig", - "description": "AWS region, optional profile, and optional bearer token.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "BedrockInferenceProviderEntry", - "type": "object" - }, - "ByokConfiguration": { - "additionalProperties": false, - "description": "BYOK (Bring Your Own Knowledge) configuration.", - "properties": { - "max_chunks": { - "default": 10, - "description": "Maximum total number of chunks returned across all BYOK stores.", - "minimum": 0, - "title": "Max BYOK chunks", - "type": "integer" - }, - "stores": { - "description": "List of BYOK RAG store configurations.", - "items": { - "$ref": "`#/components/schemas/`RagStore" - }, - "title": "BYOK RAG stores", - "type": "array" - } - }, - "title": "ByokConfiguration", - "type": "object" - }, - "CORSConfiguration": { - "additionalProperties": false, - "description": "CORS configuration.\n\nCORS or 'Cross-Origin Resource Sharing' refers to the situations when a\nfrontend running in a browser has JavaScript code that communicates with a\nbackend, and the backend is in a different 'origin' than the frontend.\n\nUseful resources:\n\n - [CORS in FastAPI](https://fastapi.tiangolo.com/tutorial/cors/)\n - [Wikipedia article](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n - [What is CORS?](https://dev.to/akshay_chauhan/what-is-cors-explained-8f1)", - "properties": { - "allow_origins": { - "default": [ - "*" - ], - "description": "A list of origins allowed for cross-origin requests. An origin is the combination of protocol (http, https), domain (myapp.com, localhost, localhost.tiangolo.com), and port (80, 443, 8080). Use ['*'] to allow all origins.", - "items": { - "type": "string" - }, - "title": "Allow origins", - "type": "array" - }, - "allow_credentials": { - "default": false, - "description": "Indicate that cookies should be supported for cross-origin requests", - "title": "Allow credentials", - "type": "boolean" - }, - "allow_methods": { - "default": [ - "*" - ], - "description": "A list of HTTP methods that should be allowed for cross-origin requests. You can use ['*'] to allow all standard methods.", - "items": { - "type": "string" - }, - "title": "Allow methods", - "type": "array" - }, - "allow_headers": { - "default": [ - "*" - ], - "description": "A list of HTTP request headers that should be supported for cross-origin requests. You can use ['*'] to allow all headers. The Accept, Accept-Language, Content-Language and Content-Type headers are always allowed for simple CORS requests.", - "items": { - "type": "string" - }, - "title": "Allow headers", - "type": "array" - } - }, - "title": "CORSConfiguration", - "type": "object" - }, - "CompactionConfiguration": { - "additionalProperties": false, - "description": "Configuration for conversation history compaction.\n\nCompaction summarizes older conversation turns when their estimated\ntoken count approaches the context window limit, keeping the\nconversation usable instead of failing with HTTP 413. The\nconfiguration here controls when compaction triggers and how much\nrecent context is preserved verbatim.\n\nAttributes:\n enabled: Master switch. When False, compaction never triggers\n and other fields are inert.\n threshold_ratio: Trigger compaction when estimated input tokens\n exceed this fraction of the model's context window\n (clamped to 0.0..1.0).\n token_floor: Minimum estimated token count before compaction\n can trigger, regardless of threshold_ratio. Prevents\n triggering on very small context windows.\n buffer_turns: Initial number of recent turns to keep verbatim.\n The runtime applies a degrading guard — if these turns\n exceed the available budget, it reduces buffer_turns by\n one repeatedly until the budget fits, down to zero.\n buffer_max_ratio: Hard cap on the fraction of the context\n window the buffer zone may occupy, regardless of\n buffer_turns.", - "properties": { - "enabled": { - "default": false, - "description": "When true, older conversation turns are summarized when estimated tokens approach the context window limit.", - "title": "Enable compaction", - "type": "boolean" - }, - "threshold_ratio": { - "default": 0.7, - "description": "Trigger compaction when estimated tokens exceed this fraction of the model's context window (0.0-1.0).", - "title": "Threshold ratio", - "type": "number" - }, - "token_floor": { - "default": 4096, - "description": "Minimum token count before compaction can trigger. Prevents triggering on very small context windows.", - "minimum": 0, - "title": "Token floor", - "type": "integer" - }, - "buffer_turns": { - "default": 4, - "description": "Number of recent turns to keep verbatim.", - "minimum": 0, - "title": "Buffer turns", - "type": "integer" - }, - "buffer_max_ratio": { - "default": 0.3, - "description": "Maximum fraction of context window the buffer zone can occupy, regardless of buffer_turns.", - "title": "Buffer max ratio", - "type": "number" - } - }, - "title": "CompactionConfiguration", - "type": "object" - }, - "Configuration": { - "additionalProperties": false, - "description": "Global service configuration.", - "properties": { - "name": { - "description": "Name of the service. That value will be used in REST API endpoints.", - "title": "Service name", - "type": "string" - }, - "config_format_version": { - "type": "string", - "nullable": true, - "default": null, - "description": "Optional explicit marker of the configuration format. When set, it must agree with the shape detected from the configuration body: 'unified' requires a synthesis input (a non-empty inference.providers, a non-empty vector_store.providers, or an ogx.config block), 'legacy' requires no synthesis input. Reserved as the lever for a future breaking change of the unified schema (R11).", - "title": "Configuration format version" - }, - "service": { - "$ref": "`#/components/schemas/`ServiceConfiguration", - "description": "This section contains Lightspeed Core Stack service configuration.", - "title": "Service configuration" - }, - "ogx": { - "$ref": "`#/components/schemas/`OgxConfiguration", - "description": "This section contains OGX configuration. Lightspeed Core Stack service can call OGX in library mode or in server mode.", - "title": "OGX configuration" - }, - "user_data_collection": { - "$ref": "`#/components/schemas/`UserDataCollection", - "description": "This section contains configuration for subsystem that collects user data(transcription history and feedbacks).", - "title": "User data collection configuration" - }, - "database": { - "$ref": "`#/components/schemas/`DatabaseConfiguration", - "description": "Configuration for database to store conversation IDs and other runtime data", - "title": "Database Configuration" - }, - "mcp_servers": { - "description": "MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in this section. Only MCP servers defined in the lightspeed-stack.yaml configuration are available to the agents. Tools configured in the OGX run.yaml are not accessible to lightspeed-core agents.", - "items": { - "$ref": "`#/components/schemas/`ModelContextProtocolServer" - }, - "title": "Model Context Protocol Server and tools configuration", - "type": "array" - }, - "authentication": { - "$ref": "`#/components/schemas/`AuthenticationConfiguration", - "description": "Authentication configuration", - "title": "Authentication configuration" - }, - "authorization": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`AuthorizationConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Lightspeed Core Stack implements a modular authentication and authorization system with multiple authentication methods. Authorization is configurable through role-based access control. Authentication is handled through selectable modules configured via the module field in the authentication configuration.", - "title": "Authorization configuration" - }, - "customization": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`Customization" - }, - { - "type": "null" - } - ], - "default": null, - "description": "It is possible to customize Lightspeed Core Stack via this section. System prompt can be customized and also different parts of the service can be replaced by custom Python modules.", - "title": "Custom profile configuration" - }, - "inference": { - "$ref": "`#/components/schemas/`InferenceConfiguration", - "description": "One LLM provider and one its model might be selected as default ones. When no provider+model pair is specified in REST API calls (query endpoints), the default provider and model are used.", - "title": "Inference configuration" - }, - "conversation_cache": { - "$ref": "`#/components/schemas/`ConversationHistoryConfiguration", - "title": "Conversation history configuration" - }, - "compaction": { - "$ref": "`#/components/schemas/`CompactionConfiguration", - "description": "Controls when conversation history is summarized to keep the model's input below the context window limit. Disabled by default — when disabled, requests that exceed the window continue to surface as HTTP 413.", - "title": "Conversation compaction configuration" - }, - "approvals": { - "$ref": "`#/components/schemas/`ApprovalsConfiguration", - "description": "Settings for human-in-the-loop approval of MCP tool invocations", - "title": "Approvals configuration" - }, - "vector_store": { - "$ref": "`#/components/schemas/`VectorStoreConfiguration", - "description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as rag.byok.stores (static registered corpora). When providers is non-empty, default_provider is required and must match one of providers[].id. Applied in unified synthesis only.", - "title": "Vector store configuration" - }, - "a2a_state": { - "$ref": "`#/components/schemas/`A2AStateConfiguration", - "description": "Configuration for A2A protocol persistent state storage.", - "title": "A2A state configuration" - }, - "quota_handlers": { - "$ref": "`#/components/schemas/`QuotaHandlersConfiguration", - "description": "Quota handlers configuration", - "title": "Quota handlers" - }, - "azure_entra_id": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`AzureEntraIdConfiguration" - }, - { - "type": "null" - } - ], - "default": null - }, - "rlsapi_v1": { - "$ref": "`#/components/schemas/`RlsapiV1Configuration", - "description": "Configuration for the rlsapi v1 /infer endpoint used by the RHEL Lightspeed Command Line Assistant (CLA).", - "title": "rlsapi v1 configuration" - }, - "splunk": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SplunkConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Splunk HEC configuration for sending telemetry events.", - "title": "Splunk configuration" - }, - "observability": { - "$ref": "`#/components/schemas/`ObservabilityConfiguration", - "description": "OpenTelemetry and observability configuration collected from OTEL_* environment variables.", - "title": "Observability configuration" - }, - "deployment_environment": { - "default": "development", - "description": "Deployment environment name (e.g., 'development', 'staging', 'production'). Used in telemetry events.", - "title": "Deployment environment", - "type": "string" - }, - "rag": { - "$ref": "`#/components/schemas/`RagConfiguration", - "description": "Unified RAG configuration: BYOK stores, OKP provider, and retrieval strategies (inline and tool-based).", - "title": "RAG configuration" - }, - "skills": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SkillsConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Agent skills configuration. Specifies paths to skill directories.", - "title": "Agent skills" - }, - "saved_prompts": { - "$ref": "`#/components/schemas/`SavedPromptsConfiguration", - "description": "Configuration for saved prompts feature limits including maximum prompts per user, display name length, and content length.", - "title": "Saved prompts configuration" - }, - "shields": { - "description": "List of pydantic-ai-lightspeed agent guardrail shields (question validity and PII redaction). Each entry has a unique 'name', a 'provider_id' ('question_validity' or 'redaction'), and a type-specific 'config'.", - "items": { - "discriminator": { - "mapping": { - "granite_guardian": "`#/components/schemas/`GraniteGuardianShieldConfiguration", - "question_validity": "`#/components/schemas/`QuestionValidityShieldConfiguration", - "redaction": "`#/components/schemas/`RedactionShieldConfiguration" - }, - "propertyName": "provider_id" - }, - "oneOf": [ - { - "$ref": "`#/components/schemas/`QuestionValidityShieldConfiguration" - }, - { - "$ref": "`#/components/schemas/`RedactionShieldConfiguration" - }, - { - "$ref": "`#/components/schemas/`GraniteGuardianShieldConfiguration" - } - ] - }, - "title": "Shields configuration", - "type": "array" - } - }, - "required": [ - "name", - "service", - "ogx", - "user_data_collection" - ], - "title": "Configuration", - "type": "object" - }, - "ConversationHistoryConfiguration": { - "additionalProperties": false, - "description": "Conversation history configuration.", - "properties": { - "type": { - "type": "string", - "nullable": true, - "default": null, - "description": "Type of database where the conversation history is to be stored.", - "title": "Conversation history database type" - }, - "memory": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`InMemoryCacheConfig" - }, - { - "type": "null" - } - ], - "default": null, - "description": "In-memory cache configuration", - "title": "In-memory cache configuration" - }, - "sqlite": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "SQLite database configuration", - "title": "SQLite configuration" - }, - "postgres": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL database configuration", - "title": "PostgreSQL configuration" - } - }, - "title": "ConversationHistoryConfiguration", - "type": "object" - }, - "CustomProfile": { - "description": "Custom profile customization for prompts and validation.", - "properties": { - "path": { - "description": "Path to Python modules containing custom profile.", - "title": "Path to custom profile", - "type": "string" - }, - "prompts": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Dictionary containing map of system prompts", - "title": "System prompts", - "type": "object" - } - }, - "required": [ - "path" - ], - "title": "CustomProfile", - "type": "object" - }, - "Customization": { - "additionalProperties": false, - "description": "Service customization.", - "properties": { - "profile_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Profile Path" - }, - "disable_query_system_prompt": { - "default": false, - "title": "Disable Query System Prompt", - "type": "boolean" - }, - "disable_shield_ids_override": { - "default": false, - "title": "Disable Shield Ids Override", - "type": "boolean" - }, - "system_prompt_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "System Prompt Path" - }, - "system_prompt": { - "type": "string", - "nullable": true, - "default": null, - "title": "System Prompt" - }, - "agent_card_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Agent Card Path" - }, - "agent_card_config": { - "type": "object", - "nullable": true, - "default": null, - "title": "Agent Card Config" - }, - "custom_profile": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`CustomProfile" - }, - { - "type": "null" - } - ], - "default": null - }, - "responses_request_max_size": { - "default": 131072, - "description": "Maximum character length for the serialized /v1/response responses request body", - "title": "Maximum character length for the serialized responses request body", - "type": "integer" - } - }, - "title": "Customization", - "type": "object" - }, - "DatabaseConfiguration": { - "additionalProperties": false, - "description": "Database configuration.", - "properties": { - "sqlite": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "SQLite database configuration", - "title": "SQLite configuration" - }, - "postgres": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL database configuration", - "title": "PostgreSQL configuration" - } - }, - "title": "DatabaseConfiguration", - "type": "object" - }, - "FaissVectorStoreProvider": { - "additionalProperties": false, - "description": "Dynamic FAISS vector-store provider (runtime create capacity).", - "properties": { - "id": { - "description": "OGX vector_io provider_id. Surrounding whitespace is stripped before validation and emission.", - "minLength": 1, - "title": "Provider ID", - "type": "string" - }, - "embedding_model": { - "description": "Embedding model identification used for stores created against this provider.", - "minLength": 1, - "title": "Embedding model", - "type": "string" - }, - "embedding_dimension": { - "description": "Dimensionality of embedding vectors for this provider.", - "minimum": 0, - "title": "Embedding dimension", - "type": "integer" - }, - "type": { - "const": "faiss", - "default": "faiss", - "description": "Product type for this dynamic vector-store provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`FaissVectorStoreProviderConfig", - "description": "FAISS storage settings for this provider.", - "title": "Storage config" - } - }, - "required": [ - "id", - "embedding_model", - "embedding_dimension", - "config" - ], - "title": "FaissVectorStoreProvider", - "type": "object" - }, - "FaissVectorStoreProviderConfig": { - "additionalProperties": false, - "description": "Storage config for a FAISS dynamic vector-store provider.", - "properties": { - "path": { - "description": "On-disk FAISS/SQLite path for this provider.", - "minLength": 1, - "title": "DB path", - "type": "string" - } - }, - "required": [ - "path" - ], - "title": "FaissVectorStoreProviderConfig", - "type": "object" - }, - "GraniteGuardianConfig": { - "additionalProperties": false, - "description": "Configuration for the Granite Guardian moderation guardrail.", - "properties": { - "url": { - "description": "Base URL of the OpenAI-compatible inference endpoint.", - "title": "Base URL", - "type": "string" - }, - "model_id": { - "default": "ibm-granite/granite-guardian-4.1-8b", - "description": "Model name sent to the inference server. Override when the server registers the model under a different name (e.g. an Ollama tag). The prompt template is built for the 4.1 format.", - "title": "Model name", - "type": "string" - }, - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "description": "API key for the inference", - "title": "Granite Guardian API key" - }, - "max_retries": { - "default": 2, - "description": "Maximun number of retries", - "minimum": 0, - "maximum": 5, - "title": "Max retries", - "type": "integer" - }, - "timeout": { - "default": 30, - "description": "Request timeout in seconds", - "minimum": 5, - "maximum": 300, - "title": "Timeout", - "type": "integer" - }, - "verify_ssl": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ], - "default": true, - "description": "SSL certificate verification. Can be:\n - True: Verify using system CA bundle (default, recommended)\n - False: Disable verification (insecure, for dev only)\n - str: Path to custom CA bundle file (for internal PKI)", - "title": "Verify SSL" - }, - "parallel": { - "anyOf": [ - { - "type": "boolean" - }, - { - "maximum": 10, - "minimum": 1, - "type": "integer" - } - ], - "default": 3, - "description": "True to run all risk checks in parallel, False to run sequentially, or an integer 1-10 for explicit batch size.", - "title": "Parallel execution" - }, - "risks": { - "description": "Risks to be considered while applying this guardrail", - "items": { - "$ref": "`#/components/schemas/`RiskDefinition" - }, - "title": "Defined risks", - "type": "array" - }, - "streaming_output_check_interval_tokens": { - "default": 50, - "description": "For risks with `output` in `points`, re-check the response against those risks approximately every N generated output tokens while streaming, plus once more over any remaining text once generation completes. Ignored when no configured risk targets the `output` point.", - "minimum": 0, - "title": "Streaming output check interval (tokens)", - "type": "integer" - } - }, - "required": [ - "url", - "risks" - ], - "title": "GraniteGuardianConfig", - "type": "object" - }, - "GraniteGuardianShieldConfiguration": { - "additionalProperties": false, - "description": "Configuration for a named Granite Guardian guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a granite-guardian shield.\n config: Granite-guardian-specific configuration.", - "properties": { - "name": { - "description": "Unique, user-facing name identifying this shield instance.", - "title": "Shield name", - "type": "string" - }, - "provider_id": { - "const": "granite_guardian", - "description": "Discriminator identifying this as a granite-guardian shield.", - "title": "Shield provider id", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`GraniteGuardianConfig", - "description": "Granite-guardian-specific configuration for this shield", - "title": "Shield configuration" - } - }, - "required": [ - "name", - "provider_id", - "config" - ], - "title": "GraniteGuardianShieldConfiguration", - "type": "object" - }, - "InMemoryCacheConfig": { - "additionalProperties": false, - "description": "In-memory cache configuration.", - "properties": { - "max_entries": { - "description": "Maximum number of entries stored in the in-memory cache", - "minimum": 0, - "title": "Max entries", - "type": "integer" - } - }, - "required": [ - "max_entries" - ], - "title": "InMemoryCacheConfig", - "type": "object" - }, - "InferenceConfiguration": { - "additionalProperties": false, - "description": "Inference configuration.", - "properties": { - "default_model": { - "type": "string", - "nullable": true, - "default": null, - "description": "Identification of default model used when no other model is specified.", - "title": "Default model" - }, - "default_provider": { - "type": "string", - "nullable": true, - "default": null, - "description": "Identification of default provider used when no other model is specified.", - "title": "Default provider" - }, - "context_windows": { - "additionalProperties": { - "minimum": 0, - "type": "integer" - }, - "description": "Deprecated: set metadata.context_window on the model's inference.providers[].allowed_models entry instead. Map of fully-qualified model identifier (e.g., \"openai/gpt-5.6-luna\") to context window size in tokens, used by conversation compaction when the model's catalog metadata has no context_window.", - "title": "Per-model context window sizes (tokens, deprecated)", - "type": "object" - }, - "providers": { - "description": "Discriminated list of inference providers. Empty by default. The sibling default_model / default_provider keep their query-time routing meaning and are independent of this list.", - "items": { - "discriminator": { - "mapping": { - "azure": "`#/components/schemas/`AzureInferenceProviderEntry", - "bedrock": "`#/components/schemas/`BedrockInferenceProviderEntry", - "openai": "`#/components/schemas/`OpenAIInferenceProviderEntry", - "sentence_transformers": "`#/components/schemas/`SentenceTransformersInferenceProviderEntry", - "vertexai": "`#/components/schemas/`VertexAIInferenceProviderEntry", - "vllm": "`#/components/schemas/`VllmInferenceProviderEntry", - "watsonx": "`#/components/schemas/`WatsonxInferenceProviderEntry" - }, - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "`#/components/schemas/`OpenAIInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`AzureInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`VertexAIInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`BedrockInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`VllmInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`WatsonxInferenceProviderEntry" - }, - { - "$ref": "`#/components/schemas/`SentenceTransformersInferenceProviderEntry" - } - ] - }, - "title": "Inference providers", - "type": "array" - }, - "max_infer_iters": { - "type": "integer", - "nullable": true, - "default": 10, - "description": "Server-side default for the maximum number of inference iterations a model can perform in a single request. Prevents small models from looping indefinitely on tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", - "title": "Default max inference iterations" - }, - "max_tool_calls": { - "type": "integer", - "nullable": true, - "default": 30, - "description": "Server-side default for the maximum number of tool calls allowed in a single response. Prevents small models from exhausting the context window with repeated tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", - "title": "Default max tool calls" - } - }, - "title": "InferenceConfiguration", - "type": "object" - }, - "JsonPathOperator": { - "description": "Supported operators for JSONPath evaluation.\n\nNote: this is not a real model, just an enumeration of all supported JSONPath operators.", - "enum": [ - "equals", - "contains", - "in", - "match" - ], - "title": "JsonPathOperator", - "type": "string" - }, - "JwkConfiguration": { - "additionalProperties": false, - "description": "JWK (JSON Web Key) configuration.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure\nthat represents a cryptographic key.\n\nUseful resources:\n\n - [JSON Web Key](https://openid.net/specs/draft-jones-json-web-key-03.html)\n - [RFC 7517](https://www.rfc-editor.org/rfc/rfc7517)", - "properties": { - "url": { - "description": "HTTPS URL of the JWK (JSON Web Key) set used to validate JWTs.", - "format": "uri", - "minLength": 1, - "title": "URL", - "type": "string" - }, - "jwt_configuration": { - "$ref": "`#/components/schemas/`JwtConfiguration", - "description": "JWT (JSON Web Token) configuration", - "title": "JWT configuration" - } - }, - "required": [ - "url" - ], - "title": "JwkConfiguration", - "type": "object" - }, - "JwtConfiguration": { - "additionalProperties": false, - "description": "JWT (JSON Web Token) configuration.\n\nJSON Web Token (JWT) is a compact, URL-safe means of representing\nclaims to be transferred between two parties. The claims in a JWT\nare encoded as a JSON object that is used as the payload of a JSON\nWeb Signature (JWS) structure or as the plaintext of a JSON Web\nEncryption (JWE) structure, enabling the claims to be digitally\nsigned or integrity protected with a Message Authentication Code\n(MAC) and/or encrypted.\n\nUseful resources:\n\n - [JSON Web Token](https://en.wikipedia.org/wiki/JSON_Web_Token)\n - [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519)\n - [JSON Web Tokens](https://auth0.com/docs/secure/tokens/json-web-tokens)", - "properties": { - "user_id_claim": { - "default": "user_id", - "description": "JWT claim name that uniquely identifies the user (subject ID).", - "title": "User ID claim", - "type": "string" - }, - "username_claim": { - "default": "username", - "description": "JWT claim name that provides the human-readable username.", - "title": "Username claim", - "type": "string" - }, - "role_rules": { - "description": "Rules for extracting roles from JWT claims", - "items": { - "$ref": "`#/components/schemas/`JwtRoleRule" - }, - "title": "Role rules", - "type": "array" - } - }, - "title": "JwtConfiguration", - "type": "object" - }, - "JwtRoleRule": { - "additionalProperties": false, - "description": "Rule for extracting roles from JWT claims.", - "properties": { - "jsonpath": { - "description": "JSONPath expression to evaluate against the JWT payload", - "title": "JSON path", - "type": "string" - }, - "operator": { - "$ref": "`#/components/schemas/`JsonPathOperator", - "description": "JSON path comparison operator", - "title": "Operator" - }, - "negate": { - "default": false, - "description": "If set to true, the meaning of the rule is negated", - "title": "Negate rule", - "type": "boolean" - }, - "value": { - "description": "Value to compare against", - "title": "Value" - }, - "roles": { - "description": "Roles to be assigned if the rule matches", - "items": { - "type": "string" - }, - "title": "List of roles", - "type": "array" - } - }, - "required": [ - "jsonpath", - "operator", - "value", - "roles" - ], - "title": "JwtRoleRule", - "type": "object" - }, - "ModelContextProtocolServer": { - "additionalProperties": false, - "description": "Model context protocol server configuration.\n\nMCP (Model Context Protocol) servers provide tools and capabilities to the\nAI agents. These are configured by this structure. Only MCP servers\ndefined in the lightspeed-stack.yaml configuration are available to the\nagents. Tools configured in the OGX run.yaml are not accessible to\nlightspeed-core agents.\n\nUseful resources:\n\n- [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)\n- [MCP FAQs](https://modelcontextprotocol.io/faqs)\n- [Wikipedia article](https://en.wikipedia.org/wiki/Model_Context_Protocol)", - "properties": { - "name": { - "description": "MCP server name that must be unique", - "title": "MCP name", - "type": "string" - }, - "provider_id": { - "default": "model-context-protocol", - "description": "MCP provider identification", - "title": "Provider ID", - "type": "string" - }, - "url": { - "description": "URL of the MCP server", - "title": "MCP server URL", - "type": "string" - }, - "authorization_headers": { - "additionalProperties": { - "type": "string" - }, - "description": "Headers to send to the MCP server. The map contains the header name and the path to a file containing the header value (secret). There are 3 special cases: 1. Usage of the kubernetes token in the header. To specify this use a string 'kubernetes' instead of the file path. 2. Usage of the client-provided token in the header. To specify this use a string 'client' instead of the file path. 3. Usage of the oauth token in the header. To specify this use a string 'oauth' instead of the file path. ", - "title": "Authorization headers", - "type": "object" - }, - "headers": { - "description": "List of HTTP header names to automatically forward from the incoming request to this MCP server. Headers listed here are extracted from the original client request and included when calling the MCP server. This is useful when infrastructure components (e.g. API gateways) inject headers that MCP servers need, such as x-rh-identity in HCC. Header matching is case-insensitive. These headers are additive with authorization_headers and MCP-HEADERS.", - "items": { - "type": "string" - }, - "title": "Propagated headers", - "type": "array" - }, - "require_approval": { - "anyOf": [ - { + "openapi": "3.0.0", + "info": { + "title": "Lightspeed Core Stack", + "version": "0.3.0" + }, + "components": { + "schemas": { + "A2AStateConfiguration": { + "additionalProperties": false, + "description": "A2A protocol persistent state configuration.\n\nConfigures how A2A task state and context-to-conversation mappings are\nstored. For multi-worker deployments, use SQLite or PostgreSQL to ensure\nstate is shared across all workers.\n\nIf no configuration is provided, in-memory storage is used (default).\nThis is suitable for single-worker deployments but state will be lost\non restarts and not shared across workers.\n\nAttributes:\n sqlite: SQLite database configuration for A2A state storage.\n postgres: PostgreSQL database configuration for A2A state storage.", + "properties": { + "sqlite": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SQLite database configuration for A2A state storage.", + "title": "SQLite configuration" + }, + "postgres": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL database configuration for A2A state storage.", + "title": "PostgreSQL configuration" + } + }, + "title": "A2AStateConfiguration", + "type": "object" + }, + "APIKeyTokenConfiguration": { + "additionalProperties": false, + "description": "API Key Token configuration.", + "properties": { + "api_key": { + "examples": [ + "some-api-key" + ], + "format": "password", + "minLength": 1, + "title": "API key", + "type": "string", + "writeOnly": true + } + }, + "required": [ + "api_key" + ], + "title": "APIKeyTokenConfiguration", + "type": "object" + }, + "AccessRule": { + "additionalProperties": false, + "description": "Rule defining what actions a role can perform.", + "properties": { + "role": { + "description": "Name of the role", + "title": "Role name", + "type": "string" + }, + "actions": { + "description": "Allowed actions for this role", + "items": { + "$ref": "`#/components/schemas/`Action" + }, + "title": "Allowed actions", + "type": "array" + } + }, + "required": [ + "role", + "actions" + ], + "title": "AccessRule", + "type": "object" + }, + "Action": { + "description": "Available actions in the system.\n\nNote: this is not a real model, just an enumeration of all action names.", "enum": [ - "always", - "never" + "admin", + "list_other_conversations", + "read_other_conversations", + "query_other_conversations", + "delete_other_conversations", + "query", + "responses", + "streaming_query", + "get_conversation", + "list_conversations", + "delete_conversation", + "update_conversation", + "feedback", + "get_models", + "get_tools", + "get_skills", + "get_shields", + "list_providers", + "get_provider", + "list_rags", + "get_rag", + "get_metrics", + "get_config", + "info", + "model_override", + "rlsapi_v1_infer", + "register_mcp_server", + "list_mcp_servers", + "delete_mcp_server", + "a2a_agent_card", + "a2a_task_execution", + "a2a_message", + "a2a_jsonrpc", + "manage_vector_stores", + "read_vector_stores", + "manage_files", + "manage_prompts", + "read_prompts", + "manage_saved_prompts" ], + "title": "Action", "type": "string" - }, - { - "$ref": "`#/components/schemas/`ApprovalFilter" - } - ], - "default": "never", - "description": "When to require human approval for tool invocations. 'always' requires approval for all tools, 'never' auto-approves, or use ApprovalFilter for granular control.", - "title": "Approval requirement" - }, - "timeout": { - "type": "integer", - "nullable": true, - "default": null, - "description": "Timeout in seconds for requests to the MCP server. If not specified, the default timeout from OGX will be used. Note: This field is reserved for future use when OGX adds timeout support.", - "title": "Request timeout" - } - }, - "required": [ - "name", - "url" - ], - "title": "ModelContextProtocolServer", - "type": "object" - }, - "ObservabilityConfiguration": { - "additionalProperties": false, - "description": "OpenTelemetry observability configuration.\n\nThis configuration is automatically populated from OTEL_* environment variables\nto provide visibility into the active tracing setup.\n\nAttributes:\n otel: Dictionary of OTEL_* environment variables with secrets redacted.", - "properties": { - "otel": { - "additionalProperties": { - "type": "string" - }, - "description": "Active OpenTelemetry configuration from OTEL_* environment variables", - "title": "OpenTelemetry configuration", - "type": "object" - } - }, - "title": "ObservabilityConfiguration", - "type": "object" - }, - "OgxConfiguration": { - "additionalProperties": false, - "description": "OGX configuration.\n\nOGX is a comprehensive system that provides a uniform set of tools\nfor building, scaling, and deploying generative AI applications, enabling\ndevelopers to create, integrate, and orchestrate multiple AI services and\ncapabilities into an adaptable setup.\n\nUseful resources:\n\n - [OGX](https://ogx-ai.github.io/)\n - [Python OGX client](https://github.com/ogx-ai/ogx-client-python)\n - [Build AI Applications with OGX](https://ogx-ai.github.io/docs/building_applications)", - "properties": { - "url": { - "type": "string", - "nullable": true, - "default": null, - "description": "URL to OGX service; used when library mode is disabled. Must be a valid HTTP or HTTPS URL.", - "title": "OGX URL" - }, - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "description": "API key to access OGX service", - "title": "API key" - }, - "use_as_library_client": { - "type": "boolean", - "nullable": true, - "default": null, - "description": "When set to true OGX will be used in library mode, not in server mode (default)", - "title": "Use as library" - }, - "library_client_config_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to configuration file used when OGX is run in library mode. DEPRECATED legacy two-file setup: logs a startup warning since 0.6 and is removed in 0.8 — use unified mode instead (the config block below, and/or the root-level inference.providers section); migrate with lightspeed-stack --migrate-config.", - "title": "OGX configuration path (legacy, deprecated)" - }, - "timeout": { - "default": 180, - "description": "Timeout in seconds for requests to OGX service. Default is 180 seconds (3 minutes) to accommodate long-running RAG queries.", - "minimum": 0, - "title": "Request timeout", - "type": "integer" - }, - "max_retries": { - "default": 5, - "description": "Maximum number of connection attempts before giving up. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", - "minimum": 0, - "title": "Maximum number of connection attempts before giving up", - "type": "integer" - }, - "retry_delay": { - "default": 2, - "description": "Delay in seconds between retry attempts. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", - "minimum": 0, - "title": "Delay in seconds between retry attempts", - "type": "integer" - }, - "allow_degraded_mode": { - "type": "boolean", - "nullable": true, - "default": false, - "description": "If enabled, Lightspeed Core can be started even when OGX is not accessible (valid for server mode only)", - "title": "Allow degraded mode" - }, - "config": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`UnifiedOgxConfig" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Backend-specific knobs for unified mode, where LCORE synthesizes the OGX run.yaml instead of reading an external file. Holds the baseline selector, an optional profile path, and a raw native_override escape hatch. Backend-agnostic high-level sections (e.g. inference.providers) live at the configuration root, not here. Mutually exclusive with library_client_config_path; that cross-field check lives on the root Configuration model. When set in library mode, library_client_config_path is not required.", - "title": "Unified OGX configuration" - } - }, - "title": "OgxConfiguration", - "type": "object" - }, - "OkpConfiguration": { - "additionalProperties": false, - "description": "OKP (Offline Knowledge Portal) provider configuration.\n\nControls provider-specific behaviour for the OKP vector store.\nOnly relevant when ``\"okp\"`` is listed in ``rag.retrieval.inline.sources``\nor ``rag.retrieval.tool.sources``.", - "properties": { - "rhokp_url": { - "type": "string", - "nullable": true, - "default": null, - "description": "Base URL for the OKP server (http or https). Set to `${env.RH_SERVER_OKP}` in YAML to use the environment variable. When unset, the default from constants is used.", - "title": "OKP base URL" - }, - "offline": { - "default": true, - "description": "When True, use parent_id for OKP chunk source URLs. When False, use reference_url for chunk source URLs.", - "title": "OKP offline mode", - "type": "boolean" - }, - "chunk_filter_query": { - "type": "string", - "nullable": true, - "default": null, - "description": "Additional OKP filter query applied to every OKP search request. Use Solr boolean syntax, e.g. 'product:ansible AND product:*openshift*'.", - "title": "OKP chunk filter query" - }, - "search_mode": { - "type": "string", - "nullable": true, - "default": null, - "description": "Default Solr search mode for OKP queries. 'keyword' uses BM25 text search (no embedding model needed). 'hybrid' combines vector + keyword search. 'semantic' uses pure vector search. When unset, falls back to the global default ('hybrid').", - "title": "OKP search mode" - }, - "max_chunks": { - "default": 5, - "description": "Maximum number of chunks fetched from OKP.", - "minimum": 0, - "title": "Max OKP chunks", - "type": "integer" - } - }, - "title": "OkpConfiguration", - "type": "object" - }, - "OpenAIInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for an OpenAI inference provider.", - "properties": { - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "title": "API key" - }, - "base_url": { - "type": "string", - "nullable": true, - "default": null, - "title": "Base URL" - } - }, - "title": "OpenAIInferenceProviderConfig", - "type": "object" - }, - "OpenAIInferenceProviderEntry": { - "additionalProperties": false, - "description": "OpenAI inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "openai", - "default": "openai", - "description": "OpenAI remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`OpenAIInferenceProviderConfig", - "description": "API key and optional base URL.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "OpenAIInferenceProviderEntry", - "type": "object" - }, - "PgvectorVectorStoreProvider": { - "additionalProperties": false, - "description": "Dynamic pgvector vector-store provider (runtime create capacity).", - "properties": { - "id": { - "description": "OGX vector_io provider_id. Surrounding whitespace is stripped before validation and emission.", - "minLength": 1, - "title": "Provider ID", - "type": "string" - }, - "embedding_model": { - "description": "Embedding model identification used for stores created against this provider.", - "minLength": 1, - "title": "Embedding model", - "type": "string" - }, - "embedding_dimension": { - "description": "Dimensionality of embedding vectors for this provider.", - "minimum": 0, - "title": "Embedding dimension", - "type": "integer" - }, - "type": { - "const": "pgvector", - "default": "pgvector", - "description": "Product type for this dynamic vector-store provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`PgvectorVectorStoreProviderConfig", - "description": "pgvector connection settings for this provider.", - "title": "Storage config" - } - }, - "required": [ - "id", - "embedding_model", - "embedding_dimension", - "config" - ], - "title": "PgvectorVectorStoreProvider", - "type": "object" - }, - "PgvectorVectorStoreProviderConfig": { - "additionalProperties": false, - "description": "Storage config for a pgvector dynamic vector-store provider.", - "properties": { - "host": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL host. Defaults to ${env.POSTGRES_HOST}.", - "title": "PostgreSQL host" - }, - "port": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL port. Defaults to ${env.POSTGRES_PORT}. Accepts string placeholders and integer values.", - "title": "PostgreSQL port" - }, - "db": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL database name. Defaults to ${env.POSTGRES_DATABASE}.", - "title": "PostgreSQL database" - }, - "user": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL user. Defaults to ${env.POSTGRES_USER}.", - "title": "PostgreSQL user" - }, - "password": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL password. Defaults to ${env.POSTGRES_PASSWORD}.", - "title": "PostgreSQL password" - } - }, - "title": "PgvectorVectorStoreProviderConfig", - "type": "object" - }, - "PostgreSQLDatabaseConfiguration": { - "additionalProperties": false, - "description": "PostgreSQL database configuration.\n\nPostgreSQL database is used by Lightspeed Core Stack service for storing\ninformation about conversation IDs. It can also be leveraged to store\nconversation history and information about quota usage.\n\nUseful resources:\n\n- [Psycopg: connection classes](https://www.psycopg.org/psycopg3/docs/api/connections.html)\n- [PostgreSQL connection strings](https://www.connectionstrings.com/postgresql/)\n- [How to Use PostgreSQL in Python](https://www.freecodecamp.org/news/postgresql-in-python/)", - "properties": { - "host": { - "default": "localhost", - "description": "Database server host or socket directory", - "title": "Hostname", - "type": "string" - }, - "port": { - "default": 5432, - "description": "Database server port", - "minimum": 0, - "title": "Port", - "type": "integer" - }, - "db": { - "description": "Database name to connect to", - "title": "Database name", - "type": "string" - }, - "user": { - "description": "Database user name used to authenticate", - "title": "User name", - "type": "string" - }, - "password": { - "description": "Password used to authenticate", - "format": "password", - "title": "Password", - "type": "string", - "writeOnly": true - }, - "namespace": { - "type": "string", - "nullable": true, - "default": "public", - "description": "Database namespace", - "title": "Name space" - }, - "ssl_mode": { - "default": "prefer", - "description": "SSL mode", - "enum": [ - "disable", - "allow", - "prefer", - "require", - "verify-ca", - "verify-full" - ], - "title": "SSL mode", - "type": "string" - }, - "gss_encmode": { - "default": "prefer", - "description": "This option determines whether or with what priority a secure GSS TCP/IP connection will be negotiated with the server.", - "enum": [ - "disable", - "prefer", - "require" - ], - "title": "GSS encmode", - "type": "string" - }, - "ca_cert_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to CA certificate", - "title": "CA certificate path" - } - }, - "required": [ - "db", - "user", - "password" - ], - "title": "PostgreSQLDatabaseConfiguration", - "type": "object" - }, - "QuestionValidityConfig": { - "additionalProperties": false, - "description": "Configuration for the question validity guardrail.", - "properties": { - "model_id": { - "description": "The model_id to use for the guard", - "title": "Model id", - "type": "string" - }, - "model_prompt": { - "default": "\nInstructions:\n- You are a question classifying tool\n- You are an expert in Kubernetes and OpenShift\n- Your job is to determine where or a user's question is related to Kubernetes and/or OpenShift technologies and to provide a one-word response.\n- If a question appears to be related to Kubernetes or OpenShift technologies, answer with the word ${allowed}, otherwise answer with the word ${rejected}.\n- Do not explain your answer, just provide the one-word response. Do not give any other response.\n- If the given question is an empty string, answer with the word ${rejected}\n\n\nExample Question:\nWhy is the sky blue?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is the grass green?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is sand yellow?\nExample Response:\n${rejected}\n\nExample Question:\nCan you help configure my cluster to automatically scale?\nExample Response:\n${allowed}\n\nQuestion:\n${message}\nResponse:\n", - "description": "The default prompt sent to the LLM used to validate the Users' question.", - "title": "Model prompt", - "type": "string" - }, - "invalid_question_response": { - "default": "\nHi, I'm the OpenShift Lightspeed assistant, I can help you with questions about OpenShift, \nplease ask me a question related to OpenShift.\n", - "description": "The default response when the Users' question is determined to be invalid.", - "title": "Invalid question response", - "type": "string" - } - }, - "required": [ - "model_id" - ], - "title": "QuestionValidityConfig", - "type": "object" - }, - "QuestionValidityShieldConfiguration": { - "additionalProperties": false, - "description": "Configuration for a named question-validity guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a question-validity shield.\n config: Question-validity-specific configuration.", - "properties": { - "name": { - "description": "Unique, user-facing name identifying this shield instance.", - "title": "Shield name", - "type": "string" - }, - "provider_id": { - "const": "question_validity", - "description": "Discriminator identifying this as a question-validity shield.", - "title": "Shield provider id", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`QuestionValidityConfig", - "description": "Question-validity-specific configuration for this shield.", - "title": "Shield configuration" - } - }, - "required": [ - "name", - "provider_id", - "config" - ], - "title": "QuestionValidityShieldConfiguration", - "type": "object" - }, - "QuotaHandlersConfiguration": { - "additionalProperties": false, - "description": "Quota limiter configuration.\n\nIt is possible to limit quota usage per user or per service or services\n(that typically run in one cluster). Each limit is configured as a separate\n_quota limiter_. It can be of type `user_limiter` or `cluster_limiter`\n(which is name that makes sense in OpenShift deployment).", - "properties": { - "sqlite": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "SQLite database configuration", - "title": "SQLite configuration" - }, - "postgres": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL database configuration", - "title": "PostgreSQL configuration" - }, - "limiters": { - "description": "Quota limiters configuration", - "items": { - "$ref": "`#/components/schemas/`QuotaLimiterConfiguration" - }, - "title": "Quota limiters", - "type": "array" - }, - "scheduler": { - "$ref": "`#/components/schemas/`QuotaSchedulerConfiguration", - "description": "Quota scheduler configuration", - "title": "Quota scheduler" - }, - "enable_token_history": { - "default": false, - "description": "Enables storing information about token usage history", - "title": "Enable token history", - "type": "boolean" - } - }, - "title": "QuotaHandlersConfiguration", - "type": "object" - }, - "QuotaLimiterConfiguration": { - "additionalProperties": false, - "description": "Configuration for one quota limiter.\n\nThere are three configuration options for each limiter:\n\n1. ``period`` is specified in a human-readable form, see\n https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT\n for all possible options. When the end of the period is reached, the\n quota is reset or increased. With the SQLite storage the period must be\n a modifier of the SQLite function ``datetime()`` that moves the time\n forward, for example ``7 days``; ``1 week`` is rejected.\n2. ``initial_quota`` is the value set at the beginning of the period.\n3. ``quota_increase`` is the value (if specified) used to increase the\n quota when the period is reached.\n\nThere are two basic use cases:\n\n1. When the quota needs to be reset to a specific value periodically (for\n example on a weekly or monthly basis), set ``initial_quota`` to the\n required value.\n2. When the quota needs to be increased by a specific value periodically\n (for example on a daily basis), set ``quota_increase``.", - "properties": { - "type": { - "description": "Quota limiter type, either user_limiter or cluster_limiter", - "enum": [ - "user_limiter", - "cluster_limiter" - ], - "title": "Quota limiter type", - "type": "string" - }, - "name": { - "description": "Human readable quota limiter name", - "title": "Quota limiter name", - "type": "string" - }, - "initial_quota": { - "description": "Quota set at beginning of the period", - "minimum": 0, - "title": "Initial quota", - "type": "integer" - }, - "quota_increase": { - "description": "Delta value used to increase quota when period is reached", - "minimum": 0, - "title": "Quota increase", - "type": "integer" - }, - "period": { - "description": "Period specified in human readable form", - "title": "Period", - "type": "string" - } - }, - "required": [ - "type", - "name", - "initial_quota", - "quota_increase", - "period" - ], - "title": "QuotaLimiterConfiguration", - "type": "object" - }, - "QuotaSchedulerConfiguration": { - "additionalProperties": false, - "description": "Quota scheduler configuration.", - "properties": { - "period": { - "default": 1, - "description": "Quota scheduler period specified in seconds", - "minimum": 0, - "title": "Period", - "type": "integer" - }, - "database_reconnection_count": { - "default": 10, - "description": "Database reconnection count on startup. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", - "minimum": 0, - "title": "Database reconnection count on startup", - "type": "integer" - }, - "database_reconnection_delay": { - "default": 1, - "description": "Database reconnection delay specified in seconds. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", - "minimum": 0, - "title": "Database reconnection delay", - "type": "integer" - } - }, - "title": "QuotaSchedulerConfiguration", - "type": "object" - }, - "RHIdentityConfiguration": { - "additionalProperties": false, - "description": "Red Hat Identity authentication configuration.", - "properties": { - "required_entitlements": { - "type": "array", - "nullable": true, - "default": null, - "description": "List of all required entitlements.", - "title": "Required entitlements" - }, - "max_header_size": { - "default": 8192, - "description": "Maximum allowed size in bytes for the base64-encoded x-rh-identity header. Headers exceeding this size are rejected before decoding.", - "minimum": 0, - "title": "Maximum header size", - "type": "integer" - } - }, - "title": "RHIdentityConfiguration", - "type": "object" - }, - "RagConfiguration": { - "additionalProperties": false, - "description": "Unified RAG configuration.\n\nGroups all RAG-related settings: BYOK stores, OKP provider, and\nretrieval strategies (inline and tool).", - "properties": { - "byok": { - "$ref": "`#/components/schemas/`ByokConfiguration", - "description": "Bring Your Own Knowledge store configurations and settings.", - "title": "BYOK configuration" - }, - "okp": { - "$ref": "`#/components/schemas/`OkpConfiguration", - "description": "OKP provider settings. Only used when 'okp' is listed in retrieval.inline.sources or retrieval.tool.sources.", - "title": "OKP configuration" - }, - "retrieval": { - "$ref": "`#/components/schemas/`RetrievalConfiguration", - "description": "Inline and tool retrieval strategy settings.", - "title": "Retrieval configuration" - } - }, - "title": "RagConfiguration", - "type": "object" - }, - "RagStore": { - "additionalProperties": false, - "description": "BYOK (Bring Your Own Knowledge) RAG store configuration.", - "properties": { - "rag_id": { - "description": "Unique RAG ID", - "minLength": 1, - "title": "RAG ID", - "type": "string" - }, - "backend": { - "default": "faiss", - "description": "Type of RAG database (e.g. 'faiss', 'pgvector').", - "minLength": 1, - "title": "RAG backend", - "type": "string" - }, - "embedding_model": { - "default": "sentence-transformers/all-mpnet-base-v2", - "description": "Embedding model identification", - "minLength": 1, - "title": "Embedding model", - "type": "string" - }, - "embedding_dimension": { - "default": 768, - "description": "Dimensionality of embedding vectors.", - "minimum": 0, - "title": "Embedding dimension", - "type": "integer" - }, - "vector_db_id": { - "description": "Vector database identification.", - "minLength": 1, - "title": "Vector DB ID", - "type": "string" - }, - "db_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to RAG database. Required for faiss backend.", - "title": "DB path" - }, - "score_multiplier": { - "default": 1.0, - "description": "Multiplier applied to relevance scores from this vector store. Used to weight results when querying multiple knowledge sources. Values > 1 boost this store's results; values < 1 reduce them.", - "minimum": 0, - "title": "Score multiplier", - "type": "number" - }, - "relevance_cutoff_score": { - "default": 0.3, - "description": "Minimum raw similarity score to consider a result relevant. Results with a similarity score below this threshold are not returned.", - "minimum": 0, - "title": "Relevance cutoff score", - "type": "number" - }, - "host": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL host for pgvector backend. Defaults to ${env.POSTGRES_HOST} when backend is pgvector.", - "title": "PostgreSQL host" - }, - "port": { - "anyOf": [ - { + }, + "AllowedModel": { + "additionalProperties": false, + "description": "Configuration for an allowed inference model.\n\nAccepts string IDs or dictionaries. String IDs populate both `name` and\n`provider_model_id`; dictionary inputs default `name` to `provider_model_id`.", + "properties": { + "name": { + "minLength": 1, + "title": "Local model name", + "type": "string" + }, + "provider_model_id": { + "minLength": 1, + "title": "Backend model id", + "type": "string" + }, + "model_type": { + "type": "string", + "enum": [ + "llm", + "embedding", + "rerank" + ], + "nullable": true, + "default": null, + "description": "Optional capability override (llm, embedding, or rerank).", + "title": "Model type" + }, + "metadata": { + "additionalProperties": true, + "description": "Optional catalog metadata. context_window: the model's context window in tokens, used by conversation compaction.", + "title": "Model metadata", + "type": "object" + } + }, + "required": [ + "name", + "provider_model_id" + ], + "title": "AllowedModel", + "type": "object" + }, + "ApprovalFilter": { + "additionalProperties": false, + "description": "Granular approval control for specific MCP tools.\n\nAttributes:\n always: Tool names that always require human approval before execution.\n never: Tool names that never require approval (pre-approved).", + "properties": { + "always": { + "description": "List of tool names that always require human approval", + "items": { + "type": "string" + }, + "title": "Always require approval", + "type": "array" + }, + "never": { + "description": "List of tool names that never require approval", + "items": { + "type": "string" + }, + "title": "Never require approval", + "type": "array" + } + }, + "title": "ApprovalFilter", + "type": "object" + }, + "ApprovalsConfiguration": { + "additionalProperties": false, + "description": "Configuration for human-in-the-loop approvals.\n\nAttributes:\n approval_timeout_seconds: How long approval requests remain pending\n before expiring.\n approval_retention_days: How long to retain decided approvals for audit\n purposes before cleanup.", + "properties": { + "approval_timeout_seconds": { + "default": 300, + "description": "Seconds before pending approval requests expire", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Approval timeout", + "type": "integer" + }, + "approval_retention_days": { + "default": 30, + "description": "Days to retain decided approvals before cleanup", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Retention period", + "type": "integer" + } + }, + "title": "ApprovalsConfiguration", + "type": "object" + }, + "AuthenticationConfiguration": { + "additionalProperties": false, + "description": "Authentication configuration.", + "properties": { + "module": { + "default": "noop", + "title": "Module", + "type": "string" + }, + "skip_tls_verification": { + "default": false, + "title": "Skip Tls Verification", + "type": "boolean" + }, + "skip_for_health_probes": { + "default": false, + "description": "Skip authorization for readiness and liveness probes", + "title": "Skip authorization for probes", + "type": "boolean" + }, + "skip_for_metrics": { + "default": false, + "description": "Skip authorization for the /metrics endpoint", + "title": "Skip authorization for metrics", + "type": "boolean" + }, + "k8s_cluster_api": { + "type": "string", + "format": "uri", + "minLength": 1, + "nullable": true, + "default": null, + "title": "K8S Cluster Api" + }, + "k8s_ca_cert_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "K8S Ca Cert Path" + }, + "jwk_config": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`JwkConfiguration" + }, + { + "type": "null" + } + ], + "default": null + }, + "api_key_config": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`APIKeyTokenConfiguration" + }, + { + "type": "null" + } + ], + "default": null + }, + "rh_identity_config": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`RHIdentityConfiguration" + }, + { + "type": "null" + } + ], + "default": null + }, + "trusted_proxy_config": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`TrustedProxyConfiguration" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "title": "AuthenticationConfiguration", + "type": "object" + }, + "AuthorizationConfiguration": { + "additionalProperties": false, + "description": "Authorization configuration.", + "properties": { + "access_rules": { + "description": "Rules for role-based access control", + "items": { + "$ref": "`#/components/schemas/`AccessRule" + }, + "title": "Access rules", + "type": "array" + } + }, + "title": "AuthorizationConfiguration", + "type": "object" + }, + "AzureEntraIdConfiguration": { + "additionalProperties": false, + "description": "Microsoft Entra ID authentication attributes for Azure.", + "properties": { + "tenant_id": { + "format": "password", + "title": "Tenant ID", + "type": "string", + "writeOnly": true + }, + "client_id": { + "format": "password", + "title": "Client ID", + "type": "string", + "writeOnly": true + }, + "client_secret": { + "format": "password", + "title": "Client secret", + "type": "string", + "writeOnly": true + }, + "scope": { + "default": "https://cognitiveservices.azure.com/.default", + "description": "Azure Cognitive Services scope for token requests. Override only if using a different Azure service.", + "title": "Token scope", + "type": "string" + } + }, + "required": [ + "tenant_id", + "client_id", + "client_secret" + ], + "title": "AzureEntraIdConfiguration", + "type": "object" + }, + "AzureInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for an Azure OpenAI inference provider.", + "properties": { + "base_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Azure OpenAI endpoint" + }, + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "title": "API key" + }, + "api_version": { + "type": "string", + "nullable": true, + "default": null, + "title": "API version" + }, + "entra_id": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`AzureEntraIdConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Preferred Entra ID auth for this provider. Takes precedence over the legacy top-level Azure Entra ID settings.", + "title": "Entra ID" + } + }, + "title": "AzureInferenceProviderConfig", + "type": "object" + }, + "AzureInferenceProviderEntry": { + "additionalProperties": false, + "description": "Azure OpenAI inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "azure", + "default": "azure", + "description": "Azure OpenAI remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`AzureInferenceProviderConfig", + "description": "Endpoint, API key or Entra ID, and API version.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "AzureInferenceProviderEntry", + "type": "object" + }, + "BedrockInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for an AWS Bedrock inference provider.", + "properties": { + "region": { + "type": "string", + "nullable": true, + "default": null, + "title": "AWS region" + }, + "profile_name": { + "type": "string", + "nullable": true, + "default": null, + "title": "AWS profile" + }, + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "description": "Optional Bedrock bearer token (alternative to SigV4).", + "title": "Bearer token" + } + }, + "title": "BedrockInferenceProviderConfig", + "type": "object" + }, + "BedrockInferenceProviderEntry": { + "additionalProperties": false, + "description": "AWS Bedrock inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "bedrock", + "default": "bedrock", + "description": "AWS Bedrock remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`BedrockInferenceProviderConfig", + "description": "AWS region, optional profile, and optional bearer token.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "BedrockInferenceProviderEntry", + "type": "object" + }, + "ByokConfiguration": { + "additionalProperties": false, + "description": "BYOK (Bring Your Own Knowledge) configuration.", + "properties": { + "max_chunks": { + "default": 10, + "description": "Maximum total number of chunks returned across all BYOK stores.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Max BYOK chunks", + "type": "integer" + }, + "stores": { + "description": "List of BYOK RAG store configurations.", + "items": { + "$ref": "`#/components/schemas/`RagStore" + }, + "title": "BYOK RAG stores", + "type": "array" + } + }, + "title": "ByokConfiguration", + "type": "object" + }, + "CORSConfiguration": { + "additionalProperties": false, + "description": "CORS configuration.\n\nCORS or 'Cross-Origin Resource Sharing' refers to the situations when a\nfrontend running in a browser has JavaScript code that communicates with a\nbackend, and the backend is in a different 'origin' than the frontend.\n\nUseful resources:\n\n - [CORS in FastAPI](https://fastapi.tiangolo.com/tutorial/cors/)\n - [Wikipedia article](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n - [What is CORS?](https://dev.to/akshay_chauhan/what-is-cors-explained-8f1)", + "properties": { + "allow_origins": { + "default": [ + "*" + ], + "description": "A list of origins allowed for cross-origin requests. An origin is the combination of protocol (http, https), domain (myapp.com, localhost, localhost.tiangolo.com), and port (80, 443, 8080). Use ['*'] to allow all origins.", + "items": { + "type": "string" + }, + "title": "Allow origins", + "type": "array" + }, + "allow_credentials": { + "default": false, + "description": "Indicate that cookies should be supported for cross-origin requests", + "title": "Allow credentials", + "type": "boolean" + }, + "allow_methods": { + "default": [ + "*" + ], + "description": "A list of HTTP methods that should be allowed for cross-origin requests. You can use ['*'] to allow all standard methods.", + "items": { + "type": "string" + }, + "title": "Allow methods", + "type": "array" + }, + "allow_headers": { + "default": [ + "*" + ], + "description": "A list of HTTP request headers that should be supported for cross-origin requests. You can use ['*'] to allow all headers. The Accept, Accept-Language, Content-Language and Content-Type headers are always allowed for simple CORS requests.", + "items": { + "type": "string" + }, + "title": "Allow headers", + "type": "array" + } + }, + "title": "CORSConfiguration", + "type": "object" + }, + "CompactionConfiguration": { + "additionalProperties": false, + "description": "Configuration for conversation history compaction.\n\nCompaction summarizes older conversation turns when their estimated\ntoken count approaches the context window limit, keeping the\nconversation usable instead of failing with HTTP 413. The\nconfiguration here controls when compaction triggers and how much\nrecent context is preserved verbatim.\n\nAttributes:\n enabled: Master switch. When False, compaction never triggers\n and other fields are inert.\n threshold_ratio: Trigger compaction when estimated input tokens\n exceed this fraction of the model's context window\n (clamped to 0.0..1.0).\n token_floor: Minimum estimated token count before compaction\n can trigger, regardless of threshold_ratio. Prevents\n triggering on very small context windows.\n buffer_turns: Initial number of recent turns to keep verbatim.\n The runtime applies a degrading guard \u2014 if these turns\n exceed the available budget, it reduces buffer_turns by\n one repeatedly until the budget fits, down to zero.\n buffer_max_ratio: Hard cap on the fraction of the context\n window the buffer zone may occupy, regardless of\n buffer_turns.", + "properties": { + "enabled": { + "default": false, + "description": "When true, older conversation turns are summarized when estimated tokens approach the context window limit.", + "title": "Enable compaction", + "type": "boolean" + }, + "threshold_ratio": { + "default": 0.7, + "description": "Trigger compaction when estimated tokens exceed this fraction of the model's context window (0.0-1.0).", + "title": "Threshold ratio", + "type": "number" + }, + "token_floor": { + "default": 4096, + "description": "Minimum token count before compaction can trigger. Prevents triggering on very small context windows.", + "minimum": 0, + "title": "Token floor", + "type": "integer" + }, + "buffer_turns": { + "default": 4, + "description": "Number of recent turns to keep verbatim.", + "minimum": 0, + "title": "Buffer turns", + "type": "integer" + }, + "buffer_max_ratio": { + "default": 0.3, + "description": "Maximum fraction of context window the buffer zone can occupy, regardless of buffer_turns.", + "title": "Buffer max ratio", + "type": "number" + } + }, + "title": "CompactionConfiguration", + "type": "object" + }, + "Configuration": { + "additionalProperties": false, + "description": "Global service configuration.", + "properties": { + "name": { + "description": "Name of the service. That value will be used in REST API endpoints.", + "title": "Service name", + "type": "string" + }, + "config_format_version": { + "type": "string", + "enum": [ + "legacy", + "unified" + ], + "nullable": true, + "default": null, + "description": "Optional explicit marker of the configuration format. When set, it must agree with the shape detected from the configuration body: 'unified' requires a synthesis input (a non-empty inference.providers, a non-empty vector_store.providers, or an ogx.config block), 'legacy' requires no synthesis input. Reserved as the lever for a future breaking change of the unified schema (R11).", + "title": "Configuration format version" + }, + "service": { + "$ref": "`#/components/schemas/`ServiceConfiguration", + "description": "This section contains Lightspeed Core Stack service configuration.", + "title": "Service configuration" + }, + "ogx": { + "$ref": "`#/components/schemas/`OgxConfiguration", + "description": "This section contains OGX configuration. Lightspeed Core Stack service can call OGX in library mode or in server mode.", + "title": "OGX configuration" + }, + "user_data_collection": { + "$ref": "`#/components/schemas/`UserDataCollection", + "description": "This section contains configuration for subsystem that collects user data(transcription history and feedbacks).", + "title": "User data collection configuration" + }, + "database": { + "$ref": "`#/components/schemas/`DatabaseConfiguration", + "description": "Configuration for database to store conversation IDs and other runtime data", + "title": "Database Configuration" + }, + "mcp_servers": { + "description": "MCP (Model Context Protocol) servers provide tools and capabilities to the AI agents. These are configured in this section. Only MCP servers defined in the lightspeed-stack.yaml configuration are available to the agents. Tools configured in the OGX run.yaml are not accessible to lightspeed-core agents.", + "items": { + "$ref": "`#/components/schemas/`ModelContextProtocolServer" + }, + "title": "Model Context Protocol Server and tools configuration", + "type": "array" + }, + "authentication": { + "$ref": "`#/components/schemas/`AuthenticationConfiguration", + "description": "Authentication configuration", + "title": "Authentication configuration" + }, + "authorization": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`AuthorizationConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Lightspeed Core Stack implements a modular authentication and authorization system with multiple authentication methods. Authorization is configurable through role-based access control. Authentication is handled through selectable modules configured via the module field in the authentication configuration.", + "title": "Authorization configuration" + }, + "customization": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`Customization" + }, + { + "type": "null" + } + ], + "default": null, + "description": "It is possible to customize Lightspeed Core Stack via this section. System prompt can be customized and also different parts of the service can be replaced by custom Python modules.", + "title": "Custom profile configuration" + }, + "inference": { + "$ref": "`#/components/schemas/`InferenceConfiguration", + "description": "One LLM provider and one its model might be selected as default ones. When no provider+model pair is specified in REST API calls (query endpoints), the default provider and model are used.", + "title": "Inference configuration" + }, + "conversation_cache": { + "$ref": "`#/components/schemas/`ConversationHistoryConfiguration", + "title": "Conversation history configuration" + }, + "compaction": { + "$ref": "`#/components/schemas/`CompactionConfiguration", + "description": "Controls when conversation history is summarized to keep the model's input below the context window limit. Disabled by default \u2014 when disabled, requests that exceed the window continue to surface as HTTP 413.", + "title": "Conversation compaction configuration" + }, + "approvals": { + "$ref": "`#/components/schemas/`ApprovalsConfiguration", + "description": "Settings for human-in-the-loop approval of MCP tool invocations", + "title": "Approvals configuration" + }, + "vector_store": { + "$ref": "`#/components/schemas/`VectorStoreConfiguration", + "description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as rag.byok.stores (static registered corpora). When providers is non-empty, default_provider is required and must match one of providers[].id. Applied in unified synthesis only.", + "title": "Vector store configuration" + }, + "a2a_state": { + "$ref": "`#/components/schemas/`A2AStateConfiguration", + "description": "Configuration for A2A protocol persistent state storage.", + "title": "A2A state configuration" + }, + "quota_handlers": { + "$ref": "`#/components/schemas/`QuotaHandlersConfiguration", + "description": "Quota handlers configuration", + "title": "Quota handlers" + }, + "azure_entra_id": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`AzureEntraIdConfiguration" + }, + { + "type": "null" + } + ], + "default": null + }, + "rlsapi_v1": { + "$ref": "`#/components/schemas/`RlsapiV1Configuration", + "description": "Configuration for the rlsapi v1 /infer endpoint used by the RHEL Lightspeed Command Line Assistant (CLA).", + "title": "rlsapi v1 configuration" + }, + "splunk": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SplunkConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Splunk HEC configuration for sending telemetry events.", + "title": "Splunk configuration" + }, + "observability": { + "$ref": "`#/components/schemas/`ObservabilityConfiguration", + "description": "OpenTelemetry and observability configuration collected from OTEL_* environment variables.", + "title": "Observability configuration" + }, + "deployment_environment": { + "default": "development", + "description": "Deployment environment name (e.g., 'development', 'staging', 'production'). Used in telemetry events.", + "title": "Deployment environment", + "type": "string" + }, + "rag": { + "$ref": "`#/components/schemas/`RagConfiguration", + "description": "Unified RAG configuration: BYOK stores, OKP provider, and retrieval strategies (inline and tool-based).", + "title": "RAG configuration" + }, + "skills": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SkillsConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Agent skills configuration. Specifies paths to skill directories.", + "title": "Agent skills" + }, + "saved_prompts": { + "$ref": "`#/components/schemas/`SavedPromptsConfiguration", + "description": "Configuration for saved prompts feature limits including maximum prompts per user, display name length, and content length.", + "title": "Saved prompts configuration" + }, + "shields": { + "description": "List of pydantic-ai-lightspeed agent guardrail shields (question validity and PII redaction). Each entry has a unique 'name', a 'provider_id' ('question_validity' or 'redaction'), and a type-specific 'config'.", + "items": { + "discriminator": { + "mapping": { + "granite_guardian": "`#/components/schemas/`GraniteGuardianShieldConfiguration", + "question_validity": "`#/components/schemas/`QuestionValidityShieldConfiguration", + "redaction": "`#/components/schemas/`RedactionShieldConfiguration" + }, + "propertyName": "provider_id" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`QuestionValidityShieldConfiguration" + }, + { + "$ref": "`#/components/schemas/`RedactionShieldConfiguration" + }, + { + "$ref": "`#/components/schemas/`GraniteGuardianShieldConfiguration" + } + ] + }, + "title": "Shields configuration", + "type": "array" + } + }, + "required": [ + "name", + "service", + "ogx", + "user_data_collection" + ], + "title": "Configuration", + "type": "object" + }, + "ConversationHistoryConfiguration": { + "additionalProperties": false, + "description": "Conversation history configuration.", + "properties": { + "type": { + "type": "string", + "enum": [ + "noop", + "memory", + "sqlite", + "postgres" + ], + "nullable": true, + "default": null, + "description": "Type of database where the conversation history is to be stored.", + "title": "Conversation history database type" + }, + "memory": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`InMemoryCacheConfig" + }, + { + "type": "null" + } + ], + "default": null, + "description": "In-memory cache configuration", + "title": "In-memory cache configuration" + }, + "sqlite": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SQLite database configuration", + "title": "SQLite configuration" + }, + "postgres": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL database configuration", + "title": "PostgreSQL configuration" + } + }, + "title": "ConversationHistoryConfiguration", + "type": "object" + }, + "CustomProfile": { + "description": "Custom profile customization for prompts and validation.", + "properties": { + "path": { + "description": "Path to Python modules containing custom profile.", + "title": "Path to custom profile", + "type": "string" + }, + "prompts": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Dictionary containing map of system prompts", + "title": "System prompts", + "type": "object" + } + }, + "required": [ + "path" + ], + "title": "CustomProfile", + "type": "object" + }, + "Customization": { + "additionalProperties": false, + "description": "Service customization.", + "properties": { + "profile_path": { + "type": "string", + "nullable": true, + "default": null, + "title": "Profile Path" + }, + "disable_query_system_prompt": { + "default": false, + "title": "Disable Query System Prompt", + "type": "boolean" + }, + "disable_shield_ids_override": { + "default": false, + "title": "Disable Shield Ids Override", + "type": "boolean" + }, + "system_prompt_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "System Prompt Path" + }, + "system_prompt": { + "type": "string", + "nullable": true, + "default": null, + "title": "System Prompt" + }, + "agent_card_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Agent Card Path" + }, + "agent_card_config": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "title": "Agent Card Config" + }, + "custom_profile": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`CustomProfile" + }, + { + "type": "null" + } + ], + "default": null + }, + "responses_request_max_size": { + "default": 131072, + "description": "Maximum character length for the serialized /v1/response responses request body", + "title": "Maximum character length for the serialized responses request body", + "type": "integer" + } + }, + "title": "Customization", + "type": "object" + }, + "DatabaseConfiguration": { + "additionalProperties": false, + "description": "Database configuration.", + "properties": { + "sqlite": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SQLite database configuration", + "title": "SQLite configuration" + }, + "postgres": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL database configuration", + "title": "PostgreSQL configuration" + } + }, + "title": "DatabaseConfiguration", + "type": "object" + }, + "FaissVectorStoreProvider": { + "additionalProperties": false, + "description": "Dynamic FAISS vector-store provider (runtime create capacity).", + "properties": { + "id": { + "description": "OGX vector_io provider_id. Surrounding whitespace is stripped before validation and emission.", + "minLength": 1, + "title": "Provider ID", + "type": "string" + }, + "embedding_model": { + "description": "Embedding model identification used for stores created against this provider.", + "minLength": 1, + "title": "Embedding model", + "type": "string" + }, + "embedding_dimension": { + "description": "Dimensionality of embedding vectors for this provider.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Embedding dimension", + "type": "integer" + }, + "type": { + "const": "faiss", + "default": "faiss", + "description": "Product type for this dynamic vector-store provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`FaissVectorStoreProviderConfig", + "description": "FAISS storage settings for this provider.", + "title": "Storage config" + } + }, + "required": [ + "id", + "embedding_model", + "embedding_dimension", + "config" + ], + "title": "FaissVectorStoreProvider", + "type": "object" + }, + "FaissVectorStoreProviderConfig": { + "additionalProperties": false, + "description": "Storage config for a FAISS dynamic vector-store provider.", + "properties": { + "path": { + "description": "On-disk FAISS/SQLite path for this provider.", + "minLength": 1, + "title": "DB path", + "type": "string" + } + }, + "required": [ + "path" + ], + "title": "FaissVectorStoreProviderConfig", + "type": "object" + }, + "GraniteGuardianConfig": { + "additionalProperties": false, + "description": "Configuration for the Granite Guardian moderation guardrail.", + "properties": { + "url": { + "description": "Base URL of the OpenAI-compatible inference endpoint.", + "title": "Base URL", + "type": "string" + }, + "model_id": { + "default": "ibm-granite/granite-guardian-4.1-8b", + "description": "Model name sent to the inference server. Override when the server registers the model under a different name (e.g. an Ollama tag). The prompt template is built for the 4.1 format.", + "title": "Model name", + "type": "string" + }, + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "description": "API key for the inference", + "title": "Granite Guardian API key" + }, + "max_retries": { + "default": 2, + "description": "Maximun number of retries", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 5, + "title": "Max retries", + "type": "integer" + }, + "timeout": { + "default": 30, + "description": "Request timeout in seconds", + "minimum": 5, + "exclusiveMinimum": true, + "maximum": 300, + "title": "Timeout", + "type": "integer" + }, + "verify_ssl": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "default": true, + "description": "SSL certificate verification. Can be:\n - True: Verify using system CA bundle (default, recommended)\n - False: Disable verification (insecure, for dev only)\n - str: Path to custom CA bundle file (for internal PKI)", + "title": "Verify SSL" + }, + "parallel": { + "anyOf": [ + { + "type": "boolean" + }, + { + "maximum": 10, + "minimum": 1, + "type": "integer" + } + ], + "default": 3, + "description": "True to run all risk checks in parallel, False to run sequentially, or an integer 1-10 for explicit batch size.", + "title": "Parallel execution" + }, + "risks": { + "description": "Risks to be considered while applying this guardrail", + "items": { + "$ref": "`#/components/schemas/`RiskDefinition" + }, + "title": "Defined risks", + "type": "array" + }, + "streaming_output_check_interval_tokens": { + "default": 50, + "description": "For risks with `output` in `points`, re-check the response against those risks approximately every N generated output tokens while streaming, plus once more over any remaining text once generation completes. Ignored when no configured risk targets the `output` point.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Streaming output check interval (tokens)", + "type": "integer" + } + }, + "required": [ + "url", + "risks" + ], + "title": "GraniteGuardianConfig", + "type": "object" + }, + "GraniteGuardianShieldConfiguration": { + "additionalProperties": false, + "description": "Configuration for a named Granite Guardian guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a granite-guardian shield.\n config: Granite-guardian-specific configuration.", + "properties": { + "name": { + "description": "Unique, user-facing name identifying this shield instance.", + "title": "Shield name", + "type": "string" + }, + "provider_id": { + "const": "granite_guardian", + "description": "Discriminator identifying this as a granite-guardian shield.", + "title": "Shield provider id", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`GraniteGuardianConfig", + "description": "Granite-guardian-specific configuration for this shield", + "title": "Shield configuration" + } + }, + "required": [ + "name", + "provider_id", + "config" + ], + "title": "GraniteGuardianShieldConfiguration", + "type": "object" + }, + "InMemoryCacheConfig": { + "additionalProperties": false, + "description": "In-memory cache configuration.", + "properties": { + "max_entries": { + "description": "Maximum number of entries stored in the in-memory cache", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Max entries", + "type": "integer" + } + }, + "required": [ + "max_entries" + ], + "title": "InMemoryCacheConfig", + "type": "object" + }, + "InferenceConfiguration": { + "additionalProperties": false, + "description": "Inference configuration.", + "properties": { + "default_model": { + "type": "string", + "nullable": true, + "default": null, + "description": "Identification of default model used when no other model is specified.", + "title": "Default model" + }, + "default_provider": { + "type": "string", + "nullable": true, + "default": null, + "description": "Identification of default provider used when no other model is specified.", + "title": "Default provider" + }, + "context_windows": { + "additionalProperties": { + "minimum": 0, + "exclusiveMinimum": true, + "type": "integer" + }, + "description": "Deprecated: set metadata.context_window on the model's inference.providers[].allowed_models entry instead. Map of fully-qualified model identifier (e.g., \"openai/gpt-5.6-luna\") to context window size in tokens, used by conversation compaction when the model's catalog metadata has no context_window.", + "title": "Per-model context window sizes (tokens, deprecated)", + "type": "object" + }, + "providers": { + "description": "Discriminated list of inference providers. Empty by default. The sibling default_model / default_provider keep their query-time routing meaning and are independent of this list.", + "items": { + "discriminator": { + "mapping": { + "azure": "`#/components/schemas/`AzureInferenceProviderEntry", + "bedrock": "`#/components/schemas/`BedrockInferenceProviderEntry", + "openai": "`#/components/schemas/`OpenAIInferenceProviderEntry", + "sentence_transformers": "`#/components/schemas/`SentenceTransformersInferenceProviderEntry", + "vertexai": "`#/components/schemas/`VertexAIInferenceProviderEntry", + "vllm": "`#/components/schemas/`VllmInferenceProviderEntry", + "watsonx": "`#/components/schemas/`WatsonxInferenceProviderEntry" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`OpenAIInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`AzureInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`VertexAIInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`BedrockInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`VllmInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`WatsonxInferenceProviderEntry" + }, + { + "$ref": "`#/components/schemas/`SentenceTransformersInferenceProviderEntry" + } + ] + }, + "title": "Inference providers", + "type": "array" + }, + "max_infer_iters": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "default": 10, + "description": "Server-side default for the maximum number of inference iterations a model can perform in a single request. Prevents small models from looping indefinitely on tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", + "title": "Default max inference iterations" + }, + "max_tool_calls": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "default": 30, + "description": "Server-side default for the maximum number of tool calls allowed in a single response. Prevents small models from exhausting the context window with repeated tool calls. Per-request values take precedence over this default. Set to None to disable the limit.", + "title": "Default max tool calls" + } + }, + "title": "InferenceConfiguration", + "type": "object" + }, + "JsonPathOperator": { + "description": "Supported operators for JSONPath evaluation.\n\nNote: this is not a real model, just an enumeration of all supported JSONPath operators.", + "enum": [ + "equals", + "contains", + "in", + "match" + ], + "title": "JsonPathOperator", "type": "string" - }, - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "description": "PostgreSQL port for pgvector backend. Defaults to ${env.POSTGRES_PORT} when backend is pgvector.", - "title": "PostgreSQL port" - }, - "db": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL database name for pgvector backend. Defaults to ${env.POSTGRES_DATABASE} when backend is pgvector.", - "title": "PostgreSQL database" - }, - "user": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL user for pgvector backend. Defaults to ${env.POSTGRES_USER} when backend is pgvector.", - "title": "PostgreSQL user" - }, - "password": { - "type": "string", - "nullable": true, - "default": null, - "description": "PostgreSQL password for pgvector backend. Defaults to ${env.POSTGRES_PASSWORD} when backend is pgvector.", - "title": "PostgreSQL password" - } - }, - "required": [ - "rag_id", - "vector_db_id" - ], - "title": "RagStore", - "type": "object" - }, - "RedactionConfig": { - "additionalProperties": false, - "description": "Configuration for PII redaction with regex-based rules.\n\nRules are validated and compiled at construction time. Invalid\nregex patterns raise a ``ValueError`` immediately.\n\nAttributes:\n rules: Ordered list of redaction rules applied sequentially.\n case_sensitive: When False, patterns are compiled with\n ``re.IGNORECASE``. Defaults to False.", - "properties": { - "rules": { - "description": "Ordered list of PII redaction rules", - "items": { - "$ref": "`#/components/schemas/`RedactionRule" - }, - "title": "Redaction rules", - "type": "array" - }, - "case_sensitive": { - "default": false, - "description": "When False, patterns are compiled with re.IGNORECASE", - "title": "Case sensitive", - "type": "boolean" - } - }, - "title": "RedactionConfig", - "type": "object" - }, - "RedactionRule": { - "additionalProperties": false, - "description": "A single regex-based redaction rule.\n\nAttributes:\n pattern: Raw regex pattern string to match sensitive data.\n replacement: Text to substitute for each match.\n case_sensitive: Per-rule override for case sensitivity.\n When None, the global ``RedactionConfig.case_sensitive``\n flag applies.", - "properties": { - "pattern": { - "description": "Regex pattern to match sensitive data", - "title": "Pattern", - "type": "string" - }, - "replacement": { - "description": "Replacement string for matched text", - "title": "Replacement", - "type": "string" - }, - "case_sensitive": { - "type": "boolean", - "nullable": true, - "default": null, - "description": "Per-rule case sensitivity override. When None, the global config flag applies.", - "title": "Case sensitive" - } - }, - "required": [ - "pattern", - "replacement" - ], - "title": "RedactionRule", - "type": "object" - }, - "RedactionShieldConfiguration": { - "additionalProperties": false, - "description": "Configuration for a named PII-redaction guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a redaction shield.\n config: Redaction-specific configuration.", - "properties": { - "name": { - "description": "Unique, user-facing name identifying this shield instance.", - "title": "Shield name", - "type": "string" - }, - "provider_id": { - "const": "redaction", - "description": "Discriminator identifying this as a redaction shield.", - "title": "Shield provider id", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`RedactionConfig", - "description": "Redaction-specific configuration for this shield.", - "title": "Shield configuration" - } - }, - "required": [ - "name", - "provider_id", - "config" - ], - "title": "RedactionShieldConfiguration", - "type": "object" - }, - "RerankerConfiguration": { - "additionalProperties": false, - "description": "Reranker configuration for RAG chunk reranking.", - "properties": { - "enabled": { - "default": false, - "description": "When True, reranking applied to RAG chunks. When False, reranking is disabled and original scoring used.", - "title": "Reranker enabled", - "type": "boolean" - }, - "model": { - "default": "cross-encoder/ms-marco-MiniLM-L6-v2", - "description": "Cross-encoder model name for reranking RAG chunks. Defaults to 'cross-encoder/ms-marco-MiniLM-L6-v2' from sentence-transformers.", - "title": "Reranker model", - "type": "string" - } - }, - "title": "RerankerConfiguration", - "type": "object" - }, - "RetrievalConfiguration": { - "additionalProperties": false, - "description": "Configuration for inline and tool retrieval strategies.", - "properties": { - "inline": { - "$ref": "`#/components/schemas/`RetrievalStrategyConfiguration", - "description": "Inline RAG: context injected before the LLM request.", - "title": "Inline retrieval" - }, - "tool": { - "$ref": "`#/components/schemas/`RetrievalStrategyConfiguration", - "description": "Tool RAG: LLM can call file_search on demand.", - "title": "Tool retrieval" - } - }, - "title": "RetrievalConfiguration", - "type": "object" - }, - "RetrievalStrategyConfiguration": { - "additionalProperties": false, - "description": "Configuration for a single retrieval strategy (inline or tool).", - "properties": { - "sources": { - "description": "RAG IDs to use for this retrieval strategy. Use 'okp' to include the OKP vector store.", - "items": { - "type": "string" - }, - "title": "RAG source IDs", - "type": "array" - }, - "max_chunks": { - "default": 10, - "description": "Maximum number of chunks returned by this retrieval strategy.", - "minimum": 0, - "title": "Max chunks", - "type": "integer" - }, - "reranker": { - "anyOf": [ - { - "$ref": "`#/components/schemas/`RerankerConfiguration" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Neural reranking of RAG chunks using cross-encoder. Only applicable to inline retrieval.", - "title": "Reranker configuration" - } - }, - "title": "RetrievalStrategyConfiguration", - "type": "object" - }, - "RiskDefinition": { - "additionalProperties": false, - "description": "Definition for a custom risk category.\n\nCustom risks allow applications to add use-case-specific safety checks\nbeyond the standard harm, jailbreak, leetspeak, amnesia, and\nhistory_politics checks.\nExample:\n liability_risk = RiskDefinition(\n name=\"liability\",\n description=\"Content requesting legal, medical, or financial advice\",\n threshold=0.55,\n points=[\"input\"],\n )\n pii_risk = RiskDefinition(\n name=\"pii_request\",\n description=\"User is asking the AI to reveal personal information\",\n threshold=0.50,\n points=[\"input\", \"tool\"],\n )\nNote:\n To enable think mode (detailed reasoning) for a risk, add the risk name\n to the `thinking_enabled` list in `ModerationConfig`. Do not set\n `enable_thinking` directly - it is managed internally.", - "properties": { - "name": { - "description": "Unique identifier for this risk (e.g., 'liability', 'competitor_mention')", - "title": "Risk name", - "type": "string" - }, - "description": { - "description": "Risk definition text passed to Granite Guardian as custom_criteria", - "title": "Rist description", - "type": "string" - }, - "threshold": { - "default": 0.65, - "description": "Score threshold for flagging (lower = more sensitive)", - "maximum": 1.0, - "minimum": 0.0, - "title": "Risk threshold", - "type": "number" - }, - "enabled": { - "default": true, - "description": "Whether to run this check", - "title": "Risk enabled", - "type": "boolean" - }, - "enable_thinking": { - "default": false, - "description": "Internal field - set via ModerationConfig.thinking_enabled list, not directly. When True, Granite Guardian provides detailed reasoning before scoring.", - "title": "Risk enable thinking", - "type": "boolean" - }, - "points": { - "description": "Where this risk is evaluated: `input` (user message), `output` (model response), or `tool` (tool/MCP content).", - "items": { - "enum": [ - "input", - "output", - "tool" - ], - "type": "string" - }, - "minItems": 1, - "title": "Guardrail points", - "type": "array" - }, - "violation_message": { - "description": "Message to be displayed when this risk is violated", - "title": "Violation message", - "type": "string" - } - }, - "required": [ - "name", - "description", - "points", - "violation_message" - ], - "title": "RiskDefinition", - "type": "object" - }, - "RlsapiV1Configuration": { - "additionalProperties": false, - "description": "Configuration for the rlsapi v1 /infer endpoint.\n\nSettings specific to the RHEL Lightspeed Command Line Assistant (CLA)\nstateless inference endpoint. Kept separate from shared configuration\nsections so that CLA-specific options do not affect other endpoints.", - "properties": { - "allow_verbose_infer": { - "default": false, - "description": "Allow /v1/infer to return extended metadata (tool_calls, rag_chunks, token_usage) when the client sends \"include_metadata\": true. Should NOT be enabled in production. If production use is needed, consider RBAC-based access control via an Action.RLSAPI_V1_INFER authorization rule.", - "title": "Allow verbose infer", - "type": "boolean" - }, - "quota_subject": { - "type": "string", - "nullable": true, - "default": null, - "description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.", - "title": "Quota subject" - } - }, - "title": "RlsapiV1Configuration", - "type": "object" - }, - "SQLiteDatabaseConfiguration": { - "additionalProperties": false, - "description": "SQLite database configuration.", - "properties": { - "db_path": { - "description": "Path to file where SQLite database is stored", - "title": "DB path", - "type": "string" - } - }, - "required": [ - "db_path" - ], - "title": "SQLiteDatabaseConfiguration", - "type": "object" - }, - "SavedPromptsConfiguration": { - "additionalProperties": false, - "description": "Configuration for saved prompts feature limits.\n\nControls the maximum number of prompts a user can save, the maximum\ndisplay name (title) length, and the maximum prompt content length.\nOmitted fields use the defaults defined in constants.\n\nAttributes:\n max_prompts_per_user: Maximum number of saved prompts allowed per user.\n max_display_name_length: Maximum character length for the prompt display name.\n max_content_length: Maximum character length for the prompt content body.", - "properties": { - "max_prompts_per_user": { - "default": 50, - "description": "Maximum number of saved prompts a user can create. Defaults to 50. Cannot exceed 200.", - "minimum": 0, - "maximum": 200, - "title": "Max prompts per user", - "type": "integer" - }, - "max_display_name_length": { - "default": 255, - "description": "Maximum character length for prompt display name (title). Defaults to 255. Cannot exceed 255.", - "minimum": 0, - "maximum": 255, - "title": "Max display name length", - "type": "integer" - }, - "max_content_length": { - "default": 10000, - "description": "Maximum character length for the prompt content body. Defaults to 10000. Cannot exceed 30000.", - "minimum": 0, - "maximum": 30000, - "title": "Max content length", - "type": "integer" - } - }, - "title": "SavedPromptsConfiguration", - "type": "object" - }, - "SentenceTransformersInferenceProviderConfig": { - "additionalProperties": false, - "description": "Settings for the local sentence-transformers inference provider.", - "properties": { - "device": { - "type": "string", - "nullable": true, - "default": null, - "title": "Device" - }, - "cache_dir": { - "type": "string", - "nullable": true, - "default": null, - "title": "Hugging Face cache directory" - } - }, - "title": "SentenceTransformersInferenceProviderConfig", - "type": "object" - }, - "SentenceTransformersInferenceProviderEntry": { - "additionalProperties": false, - "description": "Local sentence-transformers inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "sentence_transformers", - "default": "sentence_transformers", - "description": "Local sentence-transformers embedding and rerank provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`SentenceTransformersInferenceProviderConfig", - "description": "Optional device and Hugging Face cache directory.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "SentenceTransformersInferenceProviderEntry", - "type": "object" - }, - "ServiceConfiguration": { - "additionalProperties": false, - "description": "Service configuration.\n\nLightspeed Core Stack is a REST API service that accepts requests on a\nspecified hostname and port. It is also possible to enable authentication\nand specify the number of Uvicorn workers. When more workers are specified,\nthe service can handle requests concurrently.", - "properties": { - "host": { - "default": "localhost", - "description": "Service hostname", - "title": "Host", - "type": "string" - }, - "port": { - "default": 8080, - "description": "Service port", - "minimum": 0, - "title": "Port", - "type": "integer" - }, - "base_url": { - "type": "string", - "nullable": true, - "default": null, - "description": "Externally reachable base URL for the service; needed for A2A support.", - "title": "Base URL" - }, - "auth_enabled": { - "default": false, - "description": "Enables the authentication subsystem", - "title": "Authentication enabled", - "type": "boolean" - }, - "workers": { - "default": 1, - "description": "Number of Uvicorn worker processes to start", - "minimum": 0, - "title": "Number of workers", - "type": "integer" - }, - "max_concurrent_file_uploads": { - "default": 5, - "description": "Maximum number of file uploads (POST /v1/files) processed concurrently per worker. Each in-flight upload can hold up to the configured maximum file size in memory, so this bounds worst-case memory usage from concurrent uploads. Additional uploads are rejected with 429 until a slot frees up.", - "minimum": 0, - "title": "Maximum concurrent file uploads", - "type": "integer" - }, - "max_concurrent_vector_store_attaches": { - "default": 5, - "description": "Maximum number of vector store file attachments (POST /v1/vector-stores/{id}/files) processed concurrently per worker. Each in-flight attachment re-reads and chunks the source file, so this bounds worst-case memory usage independently of max_concurrent_file_uploads. Additional attachments are rejected with 429 until a slot frees up.", - "minimum": 0, - "title": "Maximum concurrent vector store file attachments", - "type": "integer" - }, - "delete_file_after_vector_store_attach": { - "default": false, - "description": "When true, deletes a file (POST /v1/files) once it has been successfully attached to a vector store, since the vector store keeps its own chunked/embedded copy of the content. Defaults to false to match the OpenAI Files API, where a file remains reusable across multiple vector stores until the caller explicitly deletes it - enabling this makes attached files single-use: re-attaching the same file_id to another vector store will fail once it has been deleted.", - "title": "Delete file after vector store attach", - "type": "boolean" - }, - "color_log": { - "default": true, - "description": "Enables colorized logging", - "title": "Color log", - "type": "boolean" - }, - "access_log": { - "default": true, - "description": "Enables logging of all access information", - "title": "Access log", - "type": "boolean" - }, - "tls_config": { - "$ref": "`#/components/schemas/`TLSConfiguration", - "description": "Transport Layer Security configuration for HTTPS support", - "title": "TLS configuration" - }, - "root_path": { - "default": "", - "description": "ASGI root path for serving behind a reverse proxy on a subpath", - "title": "Root path", - "type": "string" - }, - "cors": { - "$ref": "`#/components/schemas/`CORSConfiguration", - "description": "Cross-Origin Resource Sharing configuration for cross-domain requests", - "title": "CORS configuration" - } - }, - "title": "ServiceConfiguration", - "type": "object" - }, - "SkillsConfiguration": { - "additionalProperties": false, - "description": "Agent skills configuration.\n\nSpecifies paths to skill directories. Skill metadata (name, description)\nis read from SKILL.md frontmatter at startup.\n\nEach path can point to either:\n- A directory containing a SKILL.md file (single skill)\n- A directory containing subdirectories with SKILL.md files (multiple skills)\n\nPaths are validated at startup to ensure they exist and contain valid SKILL.md files.", - "properties": { - "paths": { - "description": "Paths to skill directories or directories containing skill subdirectories.", - "items": { - "format": "path", - "type": "string" - }, - "title": "Skill paths", - "type": "array" - } - }, - "title": "SkillsConfiguration", - "type": "object" - }, - "SplunkConfiguration": { - "additionalProperties": false, - "description": "Splunk HEC (HTTP Event Collector) configuration.\n\nSplunk HEC allows sending events directly to Splunk over HTTP/HTTPS.\nThis configuration is used to send telemetry events for inference\nrequests to the corporate Splunk deployment.\n\nUseful resources:\n\n - [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)\n - [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)", - "properties": { - "enabled": { - "default": false, - "description": "Enable or disable Splunk HEC integration.", - "title": "Enabled", - "type": "boolean" - }, - "url": { - "type": "string", - "nullable": true, - "default": null, - "description": "Splunk HEC endpoint URL.", - "title": "HEC URL" - }, - "token_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to file containing the Splunk HEC authentication token.", - "title": "Token path" - }, - "index": { - "type": "string", - "nullable": true, - "default": null, - "description": "Target Splunk index for events.", - "title": "Index" - }, - "source": { - "default": "lightspeed-stack", - "description": "Event source identifier.", - "title": "Source", - "type": "string" - }, - "timeout": { - "default": 5, - "description": "HTTP timeout in seconds for HEC requests.", - "minimum": 0, - "title": "Timeout", - "type": "integer" - }, - "verify_ssl": { - "default": true, - "description": "Whether to verify SSL certificates for HEC endpoint.", - "title": "Verify SSL", - "type": "boolean" - } - }, - "title": "SplunkConfiguration", - "type": "object" - }, - "TLSConfiguration": { - "additionalProperties": false, - "description": "TLS configuration.\n\nTransport Layer Security (TLS) is a cryptographic protocol designed to\nprovide communications security over a computer network, such as the\nInternet. The protocol is widely used in applications such as email,\ninstant messaging, and voice over IP, but its use in securing HTTPS remains\nthe most publicly visible.\n\nUseful resources:\n\n - [FastAPI HTTPS Deployment](https://fastapi.tiangolo.com/deployment/https/)\n - [Transport Layer Security Overview](https://en.wikipedia.org/wiki/Transport_Layer_Security)\n - [What is TLS](https://www.ssltrust.eu/learning/ssl/transport-layer-security-tls)", - "properties": { - "tls_certificate_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "SSL/TLS certificate file path for HTTPS support.", - "title": "TLS certificate path" - }, - "tls_key_path": { - "type": "string", - "nullable": true, - "default": null, - "description": "SSL/TLS private key file path for HTTPS support.", - "title": "TLS key path" - }, - "tls_key_password": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to file containing the password to decrypt the SSL/TLS private key.", - "title": "SSL/TLS key password path" - } - }, - "title": "TLSConfiguration", - "type": "object" - }, - "TrustedProxyConfiguration": { - "additionalProperties": false, - "description": "Configuration for trusted-proxy auth module.", - "properties": { - "user_header": { - "default": "X-Forwarded-User", - "description": "HTTP header containing the forwarded user identity.", - "title": "User identity header", - "type": "string" - }, - "allowed_service_accounts": { - "type": "array", - "nullable": true, - "default": null, - "description": "Optional allowlist of Kubernetes ServiceAccount identities permitted to act as trusted proxies. When set to null/omitted, any ServiceAccount with a valid token is accepted. When set to a non-empty list, only the listed ServiceAccounts are allowed. An empty list behaves the same as null (no restriction).", - "title": "Allowed service accounts" - } - }, - "title": "TrustedProxyConfiguration", - "type": "object" - }, - "TrustedProxyServiceAccount": { - "additionalProperties": false, - "description": "A Kubernetes ServiceAccount identity for trusted-proxy allowlist.", - "properties": { - "namespace": { - "description": "Kubernetes namespace of the ServiceAccount.", - "title": "Namespace", - "type": "string" - }, - "name": { - "description": "Name of the Kubernetes ServiceAccount.", - "title": "Name", - "type": "string" - } - }, - "required": [ - "namespace", - "name" - ], - "title": "TrustedProxyServiceAccount", - "type": "object" - }, - "UnifiedOgxConfig": { - "additionalProperties": false, - "description": "Backend-specific knobs for unified-mode OGX synthesis.\n\nPer Decision S5 of the design spike, backend-agnostic high-level sections\n(inference, ...) live at the configuration root, not here. This block holds\nonly the OGX-specific synthesis controls: which baseline to start\nfrom, an optional profile file, and a raw native_override escape hatch.\n\nAttributes:\n baseline: Synthesis starting point. \"default\" begins from LCORE's\n built-in baseline (src/data/default_run.yaml) including the\n conditional OpenAI inference provider. \"byo-llm\" begins from the\n same file with that OpenAI row removed. \"empty\" begins from an\n empty dict (used by the migration tool for an exact round-trip).\n Ignored when `profile` is set.\n profile: Optional path to a user-authored run.yaml-shaped file used as\n the synthesis baseline. Relative paths resolve against the directory\n of the loaded lightspeed-stack.yaml.\n native_override: Raw OGX schema deep-merged last (maps merge\n recursively, lists and scalars replace). The escape hatch for\n anything the high-level sections do not express. Note:\n `registered_resources.models` is a list, so a native_override\n that sets it replaces — not merges with — any LLM models LCORE\n auto-registered from `inference.providers[].allowed_models`.", - "properties": { - "baseline": { - "default": "default", - "description": "Synthesis starting point: 'default' uses LCORE's built-in baseline including the conditional OpenAI provider, 'byo-llm' uses the same baseline without that OpenAI row, 'empty' starts from {}. Ignored when 'profile' is set.", - "enum": [ - "default", - "empty", - "byo-llm" - ], - "title": "Baseline selector", - "type": "string" - }, - "profile": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to a run.yaml-shaped baseline file. Relative paths resolve against the directory of the loaded lightspeed-stack.yaml.", - "title": "Profile path" - }, - "native_override": { - "additionalProperties": true, - "description": "Raw OGX schema deep-merged last (maps merge recursively; lists and scalars replace). Note: setting registered_resources.models here replaces, not merges with, any LLM models LCORE auto-registered from inference.providers[].allowed_models.", - "title": "Native override", - "type": "object" - } - }, - "title": "UnifiedOgxConfig", - "type": "object" - }, - "UserDataCollection": { - "additionalProperties": false, - "description": "User data collection configuration.", - "properties": { - "feedback_enabled": { - "default": false, - "description": "When set to true the user feedback is stored and later sent for analysis.", - "title": "Feedback enabled", - "type": "boolean" - }, - "feedback_storage": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to directory where feedback will be saved for further processing.", - "title": "Feedback storage directory" - }, - "transcripts_enabled": { - "default": false, - "description": "When set to true the conversation history is stored and later sent for analysis.", - "title": "Transcripts enabled", - "type": "boolean" - }, - "transcripts_storage": { - "type": "string", - "nullable": true, - "default": null, - "description": "Path to directory where conversation history will be saved for further processing.", - "title": "Transcripts storage directory" - } - }, - "title": "UserDataCollection", - "type": "object" - }, - "VectorStoreConfiguration": { - "additionalProperties": false, - "description": "Configuration for dynamic vector-store providers.\n\nMirrors ``InferenceConfiguration``: a providers list plus a sibling\n``default_provider`` pointer, rather than a per-entry default flag.\n\nAttributes:\n default_provider: Provider id used for vector_stores.default_* in the\n synthesized OGX config. Required when providers is\n non-empty; must match one of providers[].id. Must be omitted when\n providers is empty.\n providers: Dynamic vector-store provider capacity for runtime\n POST /v1/vector-stores creates. Not the same as rag.byok.stores (static\n registered corpora).", - "properties": { - "default_provider": { - "type": "string", - "nullable": true, - "default": null, - "description": "Provider id used for vector_stores.default_* in the synthesized OGX config. Required when providers is non-empty; must match one of providers[].id.", - "title": "Default provider" - }, - "providers": { - "description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as rag.byok.stores (static registered corpora).", - "items": { - "discriminator": { - "mapping": { - "faiss": "`#/components/schemas/`FaissVectorStoreProvider", - "pgvector": "`#/components/schemas/`PgvectorVectorStoreProvider" - }, - "propertyName": "type" - }, - "oneOf": [ - { - "$ref": "`#/components/schemas/`FaissVectorStoreProvider" - }, - { - "$ref": "`#/components/schemas/`PgvectorVectorStoreProvider" - } - ] - }, - "title": "Vector store providers", - "type": "array" - } - }, - "title": "VectorStoreConfiguration", - "type": "object" - }, - "VertexAIInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for a Vertex AI inference provider.\n\nAuthentication uses Google Application Default Credentials. Set\nGOOGLE_APPLICATION_CREDENTIALS in the environment when a credentials file\nis required; there is no credentials path field in config.", - "properties": { - "project": { - "type": "string", - "nullable": true, - "default": null, - "title": "GCP project" - }, - "location": { - "type": "string", - "nullable": true, - "default": null, - "title": "GCP location" - } - }, - "title": "VertexAIInferenceProviderConfig", - "type": "object" - }, - "VertexAIInferenceProviderEntry": { - "additionalProperties": false, - "description": "Vertex AI inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "vertexai", - "default": "vertexai", - "description": "Google Vertex AI remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`VertexAIInferenceProviderConfig", - "description": "GCP project and location.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "VertexAIInferenceProviderEntry", - "type": "object" - }, - "VllmInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for a vLLM inference provider.", - "properties": { - "base_url": { - "type": "string", - "nullable": true, - "default": null, - "title": "Base URL" - }, - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "title": "API key" - } - }, - "title": "VllmInferenceProviderConfig", - "type": "object" - }, - "VllmInferenceProviderEntry": { - "additionalProperties": false, - "description": "vLLM inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "vllm", - "default": "vllm", - "description": "vLLM OpenAI-compatible remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`VllmInferenceProviderConfig", - "description": "Base URL and optional API key.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "VllmInferenceProviderEntry", - "type": "object" - }, - "WatsonxInferenceProviderConfig": { - "additionalProperties": false, - "description": "Connection settings for a WatsonX inference provider.", - "properties": { - "api_key": { - "type": "string", - "nullable": true, - "default": null, - "title": "API key" - }, - "project_id": { - "type": "string", - "nullable": true, - "default": null, - "title": "Project ID" - }, - "base_url": { - "type": "string", - "nullable": true, - "default": null, - "title": "Base URL" - } - }, - "title": "WatsonxInferenceProviderConfig", - "type": "object" - }, - "WatsonxInferenceProviderEntry": { - "additionalProperties": false, - "description": "WatsonX inference provider.", - "properties": { - "id": { - "title": "Provider ID", - "type": "string" - }, - "skip_model_discovery": { - "default": false, - "title": "Skip model discovery", - "type": "boolean" - }, - "allowed_models": { - "items": { - "$ref": "`#/components/schemas/`AllowedModel" - }, - "title": "Allowed models", - "type": "array" - }, - "model_profiles_path": { - "type": "string", - "nullable": true, - "default": null, - "title": "Model profiles path" - }, - "api_key_env": { - "type": "string", - "nullable": true, - "default": null, - "description": "Deprecated: prefer config.api_key with ${env.VAR}.", - "title": "API key environment variable" - }, - "extra": { - "type": "object", - "nullable": true, - "default": null, - "description": "Deprecated escape hatch for unmodeled provider knobs.", - "title": "Extra provider config" - }, - "type": { - "const": "watsonx", - "default": "watsonx", - "description": "IBM WatsonX remote inference provider.", - "title": "Provider type", - "type": "string" - }, - "config": { - "$ref": "`#/components/schemas/`WatsonxInferenceProviderConfig", - "description": "API key, project ID, and base URL.", - "title": "Connection settings" - } - }, - "required": [ - "id" - ], - "title": "WatsonxInferenceProviderEntry", - "type": "object" - } - } - }, - "paths": {} -} + }, + "JwkConfiguration": { + "additionalProperties": false, + "description": "JWK (JSON Web Key) configuration.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure\nthat represents a cryptographic key.\n\nUseful resources:\n\n - [JSON Web Key](https://openid.net/specs/draft-jones-json-web-key-03.html)\n - [RFC 7517](https://www.rfc-editor.org/rfc/rfc7517)", + "properties": { + "url": { + "description": "HTTPS URL of the JWK (JSON Web Key) set used to validate JWTs.", + "format": "uri", + "minLength": 1, + "title": "URL", + "type": "string" + }, + "jwt_configuration": { + "$ref": "`#/components/schemas/`JwtConfiguration", + "description": "JWT (JSON Web Token) configuration", + "title": "JWT configuration" + } + }, + "required": [ + "url" + ], + "title": "JwkConfiguration", + "type": "object" + }, + "JwtConfiguration": { + "additionalProperties": false, + "description": "JWT (JSON Web Token) configuration.\n\nJSON Web Token (JWT) is a compact, URL-safe means of representing\nclaims to be transferred between two parties. The claims in a JWT\nare encoded as a JSON object that is used as the payload of a JSON\nWeb Signature (JWS) structure or as the plaintext of a JSON Web\nEncryption (JWE) structure, enabling the claims to be digitally\nsigned or integrity protected with a Message Authentication Code\n(MAC) and/or encrypted.\n\nUseful resources:\n\n - [JSON Web Token](https://en.wikipedia.org/wiki/JSON_Web_Token)\n - [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519)\n - [JSON Web Tokens](https://auth0.com/docs/secure/tokens/json-web-tokens)", + "properties": { + "user_id_claim": { + "default": "user_id", + "description": "JWT claim name that uniquely identifies the user (subject ID).", + "title": "User ID claim", + "type": "string" + }, + "username_claim": { + "default": "username", + "description": "JWT claim name that provides the human-readable username.", + "title": "Username claim", + "type": "string" + }, + "role_rules": { + "description": "Rules for extracting roles from JWT claims", + "items": { + "$ref": "`#/components/schemas/`JwtRoleRule" + }, + "title": "Role rules", + "type": "array" + } + }, + "title": "JwtConfiguration", + "type": "object" + }, + "JwtRoleRule": { + "additionalProperties": false, + "description": "Rule for extracting roles from JWT claims.", + "properties": { + "jsonpath": { + "description": "JSONPath expression to evaluate against the JWT payload", + "title": "JSON path", + "type": "string" + }, + "operator": { + "$ref": "`#/components/schemas/`JsonPathOperator", + "description": "JSON path comparison operator", + "title": "Operator" + }, + "negate": { + "default": false, + "description": "If set to true, the meaning of the rule is negated", + "title": "Negate rule", + "type": "boolean" + }, + "value": { + "description": "Value to compare against", + "title": "Value" + }, + "roles": { + "description": "Roles to be assigned if the rule matches", + "items": { + "type": "string" + }, + "title": "List of roles", + "type": "array" + } + }, + "required": [ + "jsonpath", + "operator", + "value", + "roles" + ], + "title": "JwtRoleRule", + "type": "object" + }, + "ModelContextProtocolServer": { + "additionalProperties": false, + "description": "Model context protocol server configuration.\n\nMCP (Model Context Protocol) servers provide tools and capabilities to the\nAI agents. These are configured by this structure. Only MCP servers\ndefined in the lightspeed-stack.yaml configuration are available to the\nagents. Tools configured in the OGX run.yaml are not accessible to\nlightspeed-core agents.\n\nUseful resources:\n\n- [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro)\n- [MCP FAQs](https://modelcontextprotocol.io/faqs)\n- [Wikipedia article](https://en.wikipedia.org/wiki/Model_Context_Protocol)", + "properties": { + "name": { + "description": "MCP server name that must be unique", + "title": "MCP name", + "type": "string" + }, + "provider_id": { + "default": "model-context-protocol", + "description": "MCP provider identification", + "title": "Provider ID", + "type": "string" + }, + "url": { + "description": "URL of the MCP server", + "title": "MCP server URL", + "type": "string" + }, + "authorization_headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Headers to send to the MCP server. The map contains the header name and the path to a file containing the header value (secret). There are 3 special cases: 1. Usage of the kubernetes token in the header. To specify this use a string 'kubernetes' instead of the file path. 2. Usage of the client-provided token in the header. To specify this use a string 'client' instead of the file path. 3. Usage of the oauth token in the header. To specify this use a string 'oauth' instead of the file path. ", + "title": "Authorization headers", + "type": "object" + }, + "headers": { + "description": "List of HTTP header names to automatically forward from the incoming request to this MCP server. Headers listed here are extracted from the original client request and included when calling the MCP server. This is useful when infrastructure components (e.g. API gateways) inject headers that MCP servers need, such as x-rh-identity in HCC. Header matching is case-insensitive. These headers are additive with authorization_headers and MCP-HEADERS.", + "items": { + "type": "string" + }, + "title": "Propagated headers", + "type": "array" + }, + "require_approval": { + "anyOf": [ + { + "enum": [ + "always", + "never" + ], + "type": "string" + }, + { + "$ref": "`#/components/schemas/`ApprovalFilter" + } + ], + "default": "never", + "description": "When to require human approval for tool invocations. 'always' requires approval for all tools, 'never' auto-approves, or use ApprovalFilter for granular control.", + "title": "Approval requirement" + }, + "timeout": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "default": null, + "description": "Timeout in seconds for requests to the MCP server. If not specified, the default timeout from OGX will be used. Note: This field is reserved for future use when OGX adds timeout support.", + "title": "Request timeout" + } + }, + "required": [ + "name", + "url" + ], + "title": "ModelContextProtocolServer", + "type": "object" + }, + "ObservabilityConfiguration": { + "additionalProperties": false, + "description": "OpenTelemetry observability configuration.\n\nThis configuration is automatically populated from OTEL_* environment variables\nto provide visibility into the active tracing setup.\n\nAttributes:\n otel: Dictionary of OTEL_* environment variables with secrets redacted.", + "properties": { + "otel": { + "additionalProperties": { + "type": "string" + }, + "description": "Active OpenTelemetry configuration from OTEL_* environment variables", + "title": "OpenTelemetry configuration", + "type": "object" + } + }, + "title": "ObservabilityConfiguration", + "type": "object" + }, + "OgxConfiguration": { + "additionalProperties": false, + "description": "OGX configuration.\n\nOGX is a comprehensive system that provides a uniform set of tools\nfor building, scaling, and deploying generative AI applications, enabling\ndevelopers to create, integrate, and orchestrate multiple AI services and\ncapabilities into an adaptable setup.\n\nUseful resources:\n\n - [OGX](https://ogx-ai.github.io/)\n - [Python OGX client](https://github.com/ogx-ai/ogx-client-python)\n - [Build AI Applications with OGX](https://ogx-ai.github.io/docs/building_applications)", + "properties": { + "url": { + "type": "string", + "format": "uri", + "minLength": 1, + "nullable": true, + "default": null, + "description": "URL to OGX service; used when library mode is disabled. Must be a valid HTTP or HTTPS URL.", + "title": "OGX URL" + }, + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "description": "API key to access OGX service", + "title": "API key" + }, + "use_as_library_client": { + "type": "boolean", + "nullable": true, + "default": null, + "description": "When set to true OGX will be used in library mode, not in server mode (default)", + "title": "Use as library" + }, + "library_client_config_path": { + "type": "string", + "nullable": true, + "default": null, + "description": "Path to configuration file used when OGX is run in library mode. DEPRECATED legacy two-file setup: logs a startup warning since 0.6 and is removed in 0.8 \u2014 use unified mode instead (the config block below, and/or the root-level inference.providers section); migrate with lightspeed-stack --migrate-config.", + "title": "OGX configuration path (legacy, deprecated)" + }, + "timeout": { + "default": 180, + "description": "Timeout in seconds for requests to OGX service. Default is 180 seconds (3 minutes) to accommodate long-running RAG queries.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Request timeout", + "type": "integer" + }, + "max_retries": { + "default": 5, + "description": "Maximum number of connection attempts before giving up. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Maximum number of connection attempts before giving up", + "type": "integer" + }, + "retry_delay": { + "default": 2, + "description": "Delay in seconds between retry attempts. Used on startup to connect to OGX and retrieve its version. Connection attempts are retried with a fixed delay to handle the case where OGX is still starting up (e.g., when running as a sidecar in the same pod).", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Delay in seconds between retry attempts", + "type": "integer" + }, + "allow_degraded_mode": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If enabled, Lightspeed Core can be started even when OGX is not accessible (valid for server mode only)", + "title": "Allow degraded mode" + }, + "config": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`UnifiedOgxConfig" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Backend-specific knobs for unified mode, where LCORE synthesizes the OGX run.yaml instead of reading an external file. Holds the baseline selector, an optional profile path, and a raw native_override escape hatch. Backend-agnostic high-level sections (e.g. inference.providers) live at the configuration root, not here. Mutually exclusive with library_client_config_path; that cross-field check lives on the root Configuration model. When set in library mode, library_client_config_path is not required.", + "title": "Unified OGX configuration" + } + }, + "title": "OgxConfiguration", + "type": "object" + }, + "OkpConfiguration": { + "additionalProperties": false, + "description": "OKP (Offline Knowledge Portal) provider configuration.\n\nControls provider-specific behaviour for the OKP vector store.\nOnly relevant when ``\"okp\"`` is listed in ``rag.retrieval.inline.sources``\nor ``rag.retrieval.tool.sources``.", + "properties": { + "rhokp_url": { + "type": "string", + "format": "uri", + "minLength": 1, + "nullable": true, + "default": null, + "description": "Base URL for the OKP server (http or https). Set to `${env.RH_SERVER_OKP}` in YAML to use the environment variable. When unset, the default from constants is used.", + "title": "OKP base URL" + }, + "offline": { + "default": true, + "description": "When True, use parent_id for OKP chunk source URLs. When False, use reference_url for chunk source URLs.", + "title": "OKP offline mode", + "type": "boolean" + }, + "chunk_filter_query": { + "type": "string", + "nullable": true, + "default": null, + "description": "Additional OKP filter query applied to every OKP search request. Use Solr boolean syntax, e.g. 'product:ansible AND product:*openshift*'.", + "title": "OKP chunk filter query" + }, + "search_mode": { + "type": "string", + "enum": [ + "semantic", + "hybrid", + "keyword" + ], + "nullable": true, + "default": null, + "description": "Default Solr search mode for OKP queries. 'keyword' uses BM25 text search (no embedding model needed). 'hybrid' combines vector + keyword search. 'semantic' uses pure vector search. When unset, falls back to the global default ('hybrid').", + "title": "OKP search mode" + }, + "max_chunks": { + "default": 5, + "description": "Maximum number of chunks fetched from OKP.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Max OKP chunks", + "type": "integer" + } + }, + "title": "OkpConfiguration", + "type": "object" + }, + "OpenAIInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for an OpenAI inference provider.", + "properties": { + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "title": "API key" + }, + "base_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Base URL" + } + }, + "title": "OpenAIInferenceProviderConfig", + "type": "object" + }, + "OpenAIInferenceProviderEntry": { + "additionalProperties": false, + "description": "OpenAI inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "openai", + "default": "openai", + "description": "OpenAI remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`OpenAIInferenceProviderConfig", + "description": "API key and optional base URL.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "OpenAIInferenceProviderEntry", + "type": "object" + }, + "PgvectorVectorStoreProvider": { + "additionalProperties": false, + "description": "Dynamic pgvector vector-store provider (runtime create capacity).", + "properties": { + "id": { + "description": "OGX vector_io provider_id. Surrounding whitespace is stripped before validation and emission.", + "minLength": 1, + "title": "Provider ID", + "type": "string" + }, + "embedding_model": { + "description": "Embedding model identification used for stores created against this provider.", + "minLength": 1, + "title": "Embedding model", + "type": "string" + }, + "embedding_dimension": { + "description": "Dimensionality of embedding vectors for this provider.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Embedding dimension", + "type": "integer" + }, + "type": { + "const": "pgvector", + "default": "pgvector", + "description": "Product type for this dynamic vector-store provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`PgvectorVectorStoreProviderConfig", + "description": "pgvector connection settings for this provider.", + "title": "Storage config" + } + }, + "required": [ + "id", + "embedding_model", + "embedding_dimension", + "config" + ], + "title": "PgvectorVectorStoreProvider", + "type": "object" + }, + "PgvectorVectorStoreProviderConfig": { + "additionalProperties": false, + "description": "Storage config for a pgvector dynamic vector-store provider.", + "properties": { + "host": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL host. Defaults to ${env.POSTGRES_HOST}.", + "title": "PostgreSQL host" + }, + "port": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL port. Defaults to ${env.POSTGRES_PORT}. Accepts string placeholders and integer values.", + "title": "PostgreSQL port" + }, + "db": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL database name. Defaults to ${env.POSTGRES_DATABASE}.", + "title": "PostgreSQL database" + }, + "user": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL user. Defaults to ${env.POSTGRES_USER}.", + "title": "PostgreSQL user" + }, + "password": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "description": "PostgreSQL password. Defaults to ${env.POSTGRES_PASSWORD}.", + "title": "PostgreSQL password" + } + }, + "title": "PgvectorVectorStoreProviderConfig", + "type": "object" + }, + "PostgreSQLDatabaseConfiguration": { + "additionalProperties": false, + "description": "PostgreSQL database configuration.\n\nPostgreSQL database is used by Lightspeed Core Stack service for storing\ninformation about conversation IDs. It can also be leveraged to store\nconversation history and information about quota usage.\n\nUseful resources:\n\n- [Psycopg: connection classes](https://www.psycopg.org/psycopg3/docs/api/connections.html)\n- [PostgreSQL connection strings](https://www.connectionstrings.com/postgresql/)\n- [How to Use PostgreSQL in Python](https://www.freecodecamp.org/news/postgresql-in-python/)", + "properties": { + "host": { + "default": "localhost", + "description": "Database server host or socket directory", + "title": "Hostname", + "type": "string" + }, + "port": { + "default": 5432, + "description": "Database server port", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Port", + "type": "integer" + }, + "db": { + "description": "Database name to connect to", + "title": "Database name", + "type": "string" + }, + "user": { + "description": "Database user name used to authenticate", + "title": "User name", + "type": "string" + }, + "password": { + "description": "Password used to authenticate", + "format": "password", + "title": "Password", + "type": "string", + "writeOnly": true + }, + "namespace": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$", + "nullable": true, + "default": "public", + "description": "Database namespace", + "title": "Name space" + }, + "ssl_mode": { + "default": "prefer", + "description": "SSL mode", + "enum": [ + "disable", + "allow", + "prefer", + "require", + "verify-ca", + "verify-full" + ], + "title": "SSL mode", + "type": "string" + }, + "gss_encmode": { + "default": "prefer", + "description": "This option determines whether or with what priority a secure GSS TCP/IP connection will be negotiated with the server.", + "enum": [ + "disable", + "prefer", + "require" + ], + "title": "GSS encmode", + "type": "string" + }, + "ca_cert_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "description": "Path to CA certificate", + "title": "CA certificate path" + } + }, + "required": [ + "db", + "user", + "password" + ], + "title": "PostgreSQLDatabaseConfiguration", + "type": "object" + }, + "QuestionValidityConfig": { + "additionalProperties": false, + "description": "Configuration for the question validity guardrail.", + "properties": { + "model_id": { + "description": "The model_id to use for the guard", + "title": "Model id", + "type": "string" + }, + "model_prompt": { + "default": "\nInstructions:\n- You are a question classifying tool\n- You are an expert in Kubernetes and OpenShift\n- Your job is to determine where or a user's question is related to Kubernetes and/or OpenShift technologies and to provide a one-word response.\n- If a question appears to be related to Kubernetes or OpenShift technologies, answer with the word ${allowed}, otherwise answer with the word ${rejected}.\n- Do not explain your answer, just provide the one-word response. Do not give any other response.\n- If the given question is an empty string, answer with the word ${rejected}\n\n\nExample Question:\nWhy is the sky blue?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is the grass green?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is sand yellow?\nExample Response:\n${rejected}\n\nExample Question:\nCan you help configure my cluster to automatically scale?\nExample Response:\n${allowed}\n\nQuestion:\n${message}\nResponse:\n", + "description": "The default prompt sent to the LLM used to validate the Users' question.", + "title": "Model prompt", + "type": "string" + }, + "invalid_question_response": { + "default": "\nHi, I'm the OpenShift Lightspeed assistant, I can help you with questions about OpenShift, \nplease ask me a question related to OpenShift.\n", + "description": "The default response when the Users' question is determined to be invalid.", + "title": "Invalid question response", + "type": "string" + } + }, + "required": [ + "model_id" + ], + "title": "QuestionValidityConfig", + "type": "object" + }, + "QuestionValidityShieldConfiguration": { + "additionalProperties": false, + "description": "Configuration for a named question-validity guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a question-validity shield.\n config: Question-validity-specific configuration.", + "properties": { + "name": { + "description": "Unique, user-facing name identifying this shield instance.", + "title": "Shield name", + "type": "string" + }, + "provider_id": { + "const": "question_validity", + "description": "Discriminator identifying this as a question-validity shield.", + "title": "Shield provider id", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`QuestionValidityConfig", + "description": "Question-validity-specific configuration for this shield.", + "title": "Shield configuration" + } + }, + "required": [ + "name", + "provider_id", + "config" + ], + "title": "QuestionValidityShieldConfiguration", + "type": "object" + }, + "QuotaHandlersConfiguration": { + "additionalProperties": false, + "description": "Quota limiter configuration.\n\nIt is possible to limit quota usage per user or per service or services\n(that typically run in one cluster). Each limit is configured as a separate\n_quota limiter_. It can be of type `user_limiter` or `cluster_limiter`\n(which is name that makes sense in OpenShift deployment).", + "properties": { + "sqlite": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`SQLiteDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SQLite database configuration", + "title": "SQLite configuration" + }, + "postgres": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`PostgreSQLDatabaseConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL database configuration", + "title": "PostgreSQL configuration" + }, + "limiters": { + "description": "Quota limiters configuration", + "items": { + "$ref": "`#/components/schemas/`QuotaLimiterConfiguration" + }, + "title": "Quota limiters", + "type": "array" + }, + "scheduler": { + "$ref": "`#/components/schemas/`QuotaSchedulerConfiguration", + "description": "Quota scheduler configuration", + "title": "Quota scheduler" + }, + "enable_token_history": { + "default": false, + "description": "Enables storing information about token usage history", + "title": "Enable token history", + "type": "boolean" + } + }, + "title": "QuotaHandlersConfiguration", + "type": "object" + }, + "QuotaLimiterConfiguration": { + "additionalProperties": false, + "description": "Configuration for one quota limiter.\n\nThere are three configuration options for each limiter:\n\n1. ``period`` is specified in a human-readable form, see\n https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT\n for all possible options. When the end of the period is reached, the\n quota is reset or increased. With the SQLite storage the period must be\n a modifier of the SQLite function ``datetime()`` that moves the time\n forward, for example ``7 days``; ``1 week`` is rejected.\n2. ``initial_quota`` is the value set at the beginning of the period.\n3. ``quota_increase`` is the value (if specified) used to increase the\n quota when the period is reached.\n\nThere are two basic use cases:\n\n1. When the quota needs to be reset to a specific value periodically (for\n example on a weekly or monthly basis), set ``initial_quota`` to the\n required value.\n2. When the quota needs to be increased by a specific value periodically\n (for example on a daily basis), set ``quota_increase``.", + "properties": { + "type": { + "description": "Quota limiter type, either user_limiter or cluster_limiter", + "enum": [ + "user_limiter", + "cluster_limiter" + ], + "title": "Quota limiter type", + "type": "string" + }, + "name": { + "description": "Human readable quota limiter name", + "title": "Quota limiter name", + "type": "string" + }, + "initial_quota": { + "description": "Quota set at beginning of the period", + "minimum": 0, + "title": "Initial quota", + "type": "integer" + }, + "quota_increase": { + "description": "Delta value used to increase quota when period is reached", + "minimum": 0, + "title": "Quota increase", + "type": "integer" + }, + "period": { + "description": "Period specified in human readable form", + "title": "Period", + "type": "string" + } + }, + "required": [ + "type", + "name", + "initial_quota", + "quota_increase", + "period" + ], + "title": "QuotaLimiterConfiguration", + "type": "object" + }, + "QuotaSchedulerConfiguration": { + "additionalProperties": false, + "description": "Quota scheduler configuration.", + "properties": { + "period": { + "default": 1, + "description": "Quota scheduler period specified in seconds", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Period", + "type": "integer" + }, + "database_reconnection_count": { + "default": 10, + "description": "Database reconnection count on startup. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Database reconnection count on startup", + "type": "integer" + }, + "database_reconnection_delay": { + "default": 1, + "description": "Database reconnection delay specified in seconds. When database for quota is not available on startup, the service tries to reconnect N times with specified delay.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Database reconnection delay", + "type": "integer" + } + }, + "title": "QuotaSchedulerConfiguration", + "type": "object" + }, + "RHIdentityConfiguration": { + "additionalProperties": false, + "description": "Red Hat Identity authentication configuration.", + "properties": { + "required_entitlements": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "default": null, + "description": "List of all required entitlements.", + "title": "Required entitlements" + }, + "max_header_size": { + "default": 8192, + "description": "Maximum allowed size in bytes for the base64-encoded x-rh-identity header. Headers exceeding this size are rejected before decoding.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Maximum header size", + "type": "integer" + } + }, + "title": "RHIdentityConfiguration", + "type": "object" + }, + "RagConfiguration": { + "additionalProperties": false, + "description": "Unified RAG configuration.\n\nGroups all RAG-related settings: BYOK stores, OKP provider, and\nretrieval strategies (inline and tool).", + "properties": { + "byok": { + "$ref": "`#/components/schemas/`ByokConfiguration", + "description": "Bring Your Own Knowledge store configurations and settings.", + "title": "BYOK configuration" + }, + "okp": { + "$ref": "`#/components/schemas/`OkpConfiguration", + "description": "OKP provider settings. Only used when 'okp' is listed in retrieval.inline.sources or retrieval.tool.sources.", + "title": "OKP configuration" + }, + "retrieval": { + "$ref": "`#/components/schemas/`RetrievalConfiguration", + "description": "Inline and tool retrieval strategy settings.", + "title": "Retrieval configuration" + } + }, + "title": "RagConfiguration", + "type": "object" + }, + "RagStore": { + "additionalProperties": false, + "description": "BYOK (Bring Your Own Knowledge) RAG store configuration.", + "properties": { + "rag_id": { + "description": "Unique RAG ID", + "minLength": 1, + "title": "RAG ID", + "type": "string" + }, + "backend": { + "default": "faiss", + "description": "Type of RAG database (e.g. 'faiss', 'pgvector').", + "minLength": 1, + "title": "RAG backend", + "type": "string" + }, + "embedding_model": { + "default": "sentence-transformers/all-mpnet-base-v2", + "description": "Embedding model identification", + "minLength": 1, + "title": "Embedding model", + "type": "string" + }, + "embedding_dimension": { + "default": 768, + "description": "Dimensionality of embedding vectors.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Embedding dimension", + "type": "integer" + }, + "vector_db_id": { + "description": "Vector database identification.", + "minLength": 1, + "title": "Vector DB ID", + "type": "string" + }, + "db_path": { + "type": "string", + "nullable": true, + "default": null, + "description": "Path to RAG database. Required for faiss backend.", + "title": "DB path" + }, + "score_multiplier": { + "default": 1.0, + "description": "Multiplier applied to relevance scores from this vector store. Used to weight results when querying multiple knowledge sources. Values > 1 boost this store's results; values < 1 reduce them.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Score multiplier", + "type": "number" + }, + "relevance_cutoff_score": { + "default": 0.3, + "description": "Minimum raw similarity score to consider a result relevant. Results with a similarity score below this threshold are not returned.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Relevance cutoff score", + "type": "number" + }, + "host": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL host for pgvector backend. Defaults to ${env.POSTGRES_HOST} when backend is pgvector.", + "title": "PostgreSQL host" + }, + "port": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "PostgreSQL port for pgvector backend. Defaults to ${env.POSTGRES_PORT} when backend is pgvector.", + "title": "PostgreSQL port" + }, + "db": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL database name for pgvector backend. Defaults to ${env.POSTGRES_DATABASE} when backend is pgvector.", + "title": "PostgreSQL database" + }, + "user": { + "type": "string", + "nullable": true, + "default": null, + "description": "PostgreSQL user for pgvector backend. Defaults to ${env.POSTGRES_USER} when backend is pgvector.", + "title": "PostgreSQL user" + }, + "password": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "description": "PostgreSQL password for pgvector backend. Defaults to ${env.POSTGRES_PASSWORD} when backend is pgvector.", + "title": "PostgreSQL password" + } + }, + "required": [ + "rag_id", + "vector_db_id" + ], + "title": "RagStore", + "type": "object" + }, + "RedactionConfig": { + "additionalProperties": false, + "description": "Configuration for PII redaction with regex-based rules.\n\nRules are validated and compiled at construction time. Invalid\nregex patterns raise a ``ValueError`` immediately.\n\nAttributes:\n rules: Ordered list of redaction rules applied sequentially.\n case_sensitive: When False, patterns are compiled with\n ``re.IGNORECASE``. Defaults to False.", + "properties": { + "rules": { + "description": "Ordered list of PII redaction rules", + "items": { + "$ref": "`#/components/schemas/`RedactionRule" + }, + "title": "Redaction rules", + "type": "array" + }, + "case_sensitive": { + "default": false, + "description": "When False, patterns are compiled with re.IGNORECASE", + "title": "Case sensitive", + "type": "boolean" + } + }, + "title": "RedactionConfig", + "type": "object" + }, + "RedactionRule": { + "additionalProperties": false, + "description": "A single regex-based redaction rule.\n\nAttributes:\n pattern: Raw regex pattern string to match sensitive data.\n replacement: Text to substitute for each match.\n case_sensitive: Per-rule override for case sensitivity.\n When None, the global ``RedactionConfig.case_sensitive``\n flag applies.", + "properties": { + "pattern": { + "description": "Regex pattern to match sensitive data", + "title": "Pattern", + "type": "string" + }, + "replacement": { + "description": "Replacement string for matched text", + "title": "Replacement", + "type": "string" + }, + "case_sensitive": { + "type": "boolean", + "nullable": true, + "default": null, + "description": "Per-rule case sensitivity override. When None, the global config flag applies.", + "title": "Case sensitive" + } + }, + "required": [ + "pattern", + "replacement" + ], + "title": "RedactionRule", + "type": "object" + }, + "RedactionShieldConfiguration": { + "additionalProperties": false, + "description": "Configuration for a named PII-redaction guardrail shield.\n\nAttributes:\n name: Unique, user-facing name identifying this shield instance.\n provider_id: Discriminator identifying this as a redaction shield.\n config: Redaction-specific configuration.", + "properties": { + "name": { + "description": "Unique, user-facing name identifying this shield instance.", + "title": "Shield name", + "type": "string" + }, + "provider_id": { + "const": "redaction", + "description": "Discriminator identifying this as a redaction shield.", + "title": "Shield provider id", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`RedactionConfig", + "description": "Redaction-specific configuration for this shield.", + "title": "Shield configuration" + } + }, + "required": [ + "name", + "provider_id", + "config" + ], + "title": "RedactionShieldConfiguration", + "type": "object" + }, + "RerankerConfiguration": { + "additionalProperties": false, + "description": "Reranker configuration for RAG chunk reranking.", + "properties": { + "enabled": { + "default": false, + "description": "When True, reranking applied to RAG chunks. When False, reranking is disabled and original scoring used.", + "title": "Reranker enabled", + "type": "boolean" + }, + "model": { + "default": "cross-encoder/ms-marco-MiniLM-L6-v2", + "description": "Cross-encoder model name for reranking RAG chunks. Defaults to 'cross-encoder/ms-marco-MiniLM-L6-v2' from sentence-transformers.", + "title": "Reranker model", + "type": "string" + } + }, + "title": "RerankerConfiguration", + "type": "object" + }, + "RetrievalConfiguration": { + "additionalProperties": false, + "description": "Configuration for inline and tool retrieval strategies.", + "properties": { + "inline": { + "$ref": "`#/components/schemas/`RetrievalStrategyConfiguration", + "description": "Inline RAG: context injected before the LLM request.", + "title": "Inline retrieval" + }, + "tool": { + "$ref": "`#/components/schemas/`RetrievalStrategyConfiguration", + "description": "Tool RAG: LLM can call file_search on demand.", + "title": "Tool retrieval" + } + }, + "title": "RetrievalConfiguration", + "type": "object" + }, + "RetrievalStrategyConfiguration": { + "additionalProperties": false, + "description": "Configuration for a single retrieval strategy (inline or tool).", + "properties": { + "sources": { + "description": "RAG IDs to use for this retrieval strategy. Use 'okp' to include the OKP vector store.", + "items": { + "type": "string" + }, + "title": "RAG source IDs", + "type": "array" + }, + "max_chunks": { + "default": 10, + "description": "Maximum number of chunks returned by this retrieval strategy.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Max chunks", + "type": "integer" + }, + "reranker": { + "anyOf": [ + { + "$ref": "`#/components/schemas/`RerankerConfiguration" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Neural reranking of RAG chunks using cross-encoder. Only applicable to inline retrieval.", + "title": "Reranker configuration" + } + }, + "title": "RetrievalStrategyConfiguration", + "type": "object" + }, + "RiskDefinition": { + "additionalProperties": false, + "description": "Definition for a custom risk category.\n\nCustom risks allow applications to add use-case-specific safety checks\nbeyond the standard harm, jailbreak, leetspeak, amnesia, and\nhistory_politics checks.\nExample:\n liability_risk = RiskDefinition(\n name=\"liability\",\n description=\"Content requesting legal, medical, or financial advice\",\n threshold=0.55,\n points=[\"input\"],\n )\n pii_risk = RiskDefinition(\n name=\"pii_request\",\n description=\"User is asking the AI to reveal personal information\",\n threshold=0.50,\n points=[\"input\", \"tool\"],\n )\nNote:\n To enable think mode (detailed reasoning) for a risk, add the risk name\n to the `thinking_enabled` list in `ModerationConfig`. Do not set\n `enable_thinking` directly - it is managed internally.", + "properties": { + "name": { + "description": "Unique identifier for this risk (e.g., 'liability', 'competitor_mention')", + "title": "Risk name", + "type": "string" + }, + "description": { + "description": "Risk definition text passed to Granite Guardian as custom_criteria", + "title": "Rist description", + "type": "string" + }, + "threshold": { + "default": 0.65, + "description": "Score threshold for flagging (lower = more sensitive)", + "maximum": 1.0, + "minimum": 0.0, + "title": "Risk threshold", + "type": "number" + }, + "enabled": { + "default": true, + "description": "Whether to run this check", + "title": "Risk enabled", + "type": "boolean" + }, + "enable_thinking": { + "default": false, + "description": "Internal field - set via ModerationConfig.thinking_enabled list, not directly. When True, Granite Guardian provides detailed reasoning before scoring.", + "title": "Risk enable thinking", + "type": "boolean" + }, + "points": { + "description": "Where this risk is evaluated: `input` (user message), `output` (model response), or `tool` (tool/MCP content).", + "items": { + "enum": [ + "input", + "output", + "tool" + ], + "type": "string" + }, + "minItems": 1, + "title": "Guardrail points", + "type": "array" + }, + "violation_message": { + "description": "Message to be displayed when this risk is violated", + "title": "Violation message", + "type": "string" + } + }, + "required": [ + "name", + "description", + "points", + "violation_message" + ], + "title": "RiskDefinition", + "type": "object" + }, + "RlsapiV1Configuration": { + "additionalProperties": false, + "description": "Configuration for the rlsapi v1 /infer endpoint.\n\nSettings specific to the RHEL Lightspeed Command Line Assistant (CLA)\nstateless inference endpoint. Kept separate from shared configuration\nsections so that CLA-specific options do not affect other endpoints.", + "properties": { + "allow_verbose_infer": { + "default": false, + "description": "Allow /v1/infer to return extended metadata (tool_calls, rag_chunks, token_usage) when the client sends \"include_metadata\": true. Should NOT be enabled in production. If production use is needed, consider RBAC-based access control via an Action.RLSAPI_V1_INFER authorization rule.", + "title": "Allow verbose infer", + "type": "boolean" + }, + "quota_subject": { + "type": "string", + "enum": [ + "user_id", + "org_id", + "system_id" + ], + "nullable": true, + "default": null, + "description": "Identity field used as the quota subject for /v1/infer. When set, token quota enforcement is enabled for this endpoint. Requires quota_handlers to be configured. \"org_id\" and \"system_id\" require rh-identity authentication; falls back to user_id when rh-identity data is unavailable.", + "title": "Quota subject" + } + }, + "title": "RlsapiV1Configuration", + "type": "object" + }, + "SQLiteDatabaseConfiguration": { + "additionalProperties": false, + "description": "SQLite database configuration.", + "properties": { + "db_path": { + "description": "Path to file where SQLite database is stored", + "title": "DB path", + "type": "string" + } + }, + "required": [ + "db_path" + ], + "title": "SQLiteDatabaseConfiguration", + "type": "object" + }, + "SavedPromptsConfiguration": { + "additionalProperties": false, + "description": "Configuration for saved prompts feature limits.\n\nControls the maximum number of prompts a user can save, the maximum\ndisplay name (title) length, and the maximum prompt content length.\nOmitted fields use the defaults defined in constants.\n\nAttributes:\n max_prompts_per_user: Maximum number of saved prompts allowed per user.\n max_display_name_length: Maximum character length for the prompt display name.\n max_content_length: Maximum character length for the prompt content body.", + "properties": { + "max_prompts_per_user": { + "default": 50, + "description": "Maximum number of saved prompts a user can create. Defaults to 50. Cannot exceed 200.", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 200, + "title": "Max prompts per user", + "type": "integer" + }, + "max_display_name_length": { + "default": 255, + "description": "Maximum character length for prompt display name (title). Defaults to 255. Cannot exceed 255.", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 255, + "title": "Max display name length", + "type": "integer" + }, + "max_content_length": { + "default": 10000, + "description": "Maximum character length for the prompt content body. Defaults to 10000. Cannot exceed 30000.", + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 30000, + "title": "Max content length", + "type": "integer" + } + }, + "title": "SavedPromptsConfiguration", + "type": "object" + }, + "SentenceTransformersInferenceProviderConfig": { + "additionalProperties": false, + "description": "Settings for the local sentence-transformers inference provider.", + "properties": { + "device": { + "type": "string", + "nullable": true, + "default": null, + "title": "Device" + }, + "cache_dir": { + "type": "string", + "nullable": true, + "default": null, + "title": "Hugging Face cache directory" + } + }, + "title": "SentenceTransformersInferenceProviderConfig", + "type": "object" + }, + "SentenceTransformersInferenceProviderEntry": { + "additionalProperties": false, + "description": "Local sentence-transformers inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "sentence_transformers", + "default": "sentence_transformers", + "description": "Local sentence-transformers embedding and rerank provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`SentenceTransformersInferenceProviderConfig", + "description": "Optional device and Hugging Face cache directory.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "SentenceTransformersInferenceProviderEntry", + "type": "object" + }, + "ServiceConfiguration": { + "additionalProperties": false, + "description": "Service configuration.\n\nLightspeed Core Stack is a REST API service that accepts requests on a\nspecified hostname and port. It is also possible to enable authentication\nand specify the number of Uvicorn workers. When more workers are specified,\nthe service can handle requests concurrently.", + "properties": { + "host": { + "default": "localhost", + "description": "Service hostname", + "title": "Host", + "type": "string" + }, + "port": { + "default": 8080, + "description": "Service port", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Port", + "type": "integer" + }, + "base_url": { + "type": "string", + "nullable": true, + "default": null, + "description": "Externally reachable base URL for the service; needed for A2A support.", + "title": "Base URL" + }, + "auth_enabled": { + "default": false, + "description": "Enables the authentication subsystem", + "title": "Authentication enabled", + "type": "boolean" + }, + "workers": { + "default": 1, + "description": "Number of Uvicorn worker processes to start", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Number of workers", + "type": "integer" + }, + "max_concurrent_file_uploads": { + "default": 5, + "description": "Maximum number of file uploads (POST /v1/files) processed concurrently per worker. Each in-flight upload can hold up to the configured maximum file size in memory, so this bounds worst-case memory usage from concurrent uploads. Additional uploads are rejected with 429 until a slot frees up.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Maximum concurrent file uploads", + "type": "integer" + }, + "max_concurrent_vector_store_attaches": { + "default": 5, + "description": "Maximum number of vector store file attachments (POST /v1/vector-stores/{id}/files) processed concurrently per worker. Each in-flight attachment re-reads and chunks the source file, so this bounds worst-case memory usage independently of max_concurrent_file_uploads. Additional attachments are rejected with 429 until a slot frees up.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Maximum concurrent vector store file attachments", + "type": "integer" + }, + "delete_file_after_vector_store_attach": { + "default": false, + "description": "When true, deletes a file (POST /v1/files) once it has been successfully attached to a vector store, since the vector store keeps its own chunked/embedded copy of the content. Defaults to false to match the OpenAI Files API, where a file remains reusable across multiple vector stores until the caller explicitly deletes it - enabling this makes attached files single-use: re-attaching the same file_id to another vector store will fail once it has been deleted.", + "title": "Delete file after vector store attach", + "type": "boolean" + }, + "color_log": { + "default": true, + "description": "Enables colorized logging", + "title": "Color log", + "type": "boolean" + }, + "access_log": { + "default": true, + "description": "Enables logging of all access information", + "title": "Access log", + "type": "boolean" + }, + "tls_config": { + "$ref": "`#/components/schemas/`TLSConfiguration", + "description": "Transport Layer Security configuration for HTTPS support", + "title": "TLS configuration" + }, + "root_path": { + "default": "", + "description": "ASGI root path for serving behind a reverse proxy on a subpath", + "title": "Root path", + "type": "string" + }, + "cors": { + "$ref": "`#/components/schemas/`CORSConfiguration", + "description": "Cross-Origin Resource Sharing configuration for cross-domain requests", + "title": "CORS configuration" + } + }, + "title": "ServiceConfiguration", + "type": "object" + }, + "SkillsConfiguration": { + "additionalProperties": false, + "description": "Agent skills configuration.\n\nSpecifies paths to skill directories. Skill metadata (name, description)\nis read from SKILL.md frontmatter at startup.\n\nEach path can point to either:\n- A directory containing a SKILL.md file (single skill)\n- A directory containing subdirectories with SKILL.md files (multiple skills)\n\nPaths are validated at startup to ensure they exist and contain valid SKILL.md files.", + "properties": { + "paths": { + "description": "Paths to skill directories or directories containing skill subdirectories.", + "items": { + "format": "path", + "type": "string" + }, + "title": "Skill paths", + "type": "array" + } + }, + "title": "SkillsConfiguration", + "type": "object" + }, + "SplunkConfiguration": { + "additionalProperties": false, + "description": "Splunk HEC (HTTP Event Collector) configuration.\n\nSplunk HEC allows sending events directly to Splunk over HTTP/HTTPS.\nThis configuration is used to send telemetry events for inference\nrequests to the corporate Splunk deployment.\n\nUseful resources:\n\n - [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)\n - [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)", + "properties": { + "enabled": { + "default": false, + "description": "Enable or disable Splunk HEC integration.", + "title": "Enabled", + "type": "boolean" + }, + "url": { + "type": "string", + "nullable": true, + "default": null, + "description": "Splunk HEC endpoint URL.", + "title": "HEC URL" + }, + "token_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "description": "Path to file containing the Splunk HEC authentication token.", + "title": "Token path" + }, + "index": { + "type": "string", + "nullable": true, + "default": null, + "description": "Target Splunk index for events.", + "title": "Index" + }, + "source": { + "default": "lightspeed-stack", + "description": "Event source identifier.", + "title": "Source", + "type": "string" + }, + "timeout": { + "default": 5, + "description": "HTTP timeout in seconds for HEC requests.", + "minimum": 0, + "exclusiveMinimum": true, + "title": "Timeout", + "type": "integer" + }, + "verify_ssl": { + "default": true, + "description": "Whether to verify SSL certificates for HEC endpoint.", + "title": "Verify SSL", + "type": "boolean" + } + }, + "title": "SplunkConfiguration", + "type": "object" + }, + "TLSConfiguration": { + "additionalProperties": false, + "description": "TLS configuration.\n\nTransport Layer Security (TLS) is a cryptographic protocol designed to\nprovide communications security over a computer network, such as the\nInternet. The protocol is widely used in applications such as email,\ninstant messaging, and voice over IP, but its use in securing HTTPS remains\nthe most publicly visible.\n\nUseful resources:\n\n - [FastAPI HTTPS Deployment](https://fastapi.tiangolo.com/deployment/https/)\n - [Transport Layer Security Overview](https://en.wikipedia.org/wiki/Transport_Layer_Security)\n - [What is TLS](https://www.ssltrust.eu/learning/ssl/transport-layer-security-tls)", + "properties": { + "tls_certificate_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "description": "SSL/TLS certificate file path for HTTPS support.", + "title": "TLS certificate path" + }, + "tls_key_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "description": "SSL/TLS private key file path for HTTPS support.", + "title": "TLS key path" + }, + "tls_key_password": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "description": "Path to file containing the password to decrypt the SSL/TLS private key.", + "title": "SSL/TLS key password path" + } + }, + "title": "TLSConfiguration", + "type": "object" + }, + "TrustedProxyConfiguration": { + "additionalProperties": false, + "description": "Configuration for trusted-proxy auth module.", + "properties": { + "user_header": { + "default": "X-Forwarded-User", + "description": "HTTP header containing the forwarded user identity.", + "title": "User identity header", + "type": "string" + }, + "allowed_service_accounts": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/`TrustedProxyServiceAccount" + }, + "nullable": true, + "default": null, + "description": "Optional allowlist of Kubernetes ServiceAccount identities permitted to act as trusted proxies. When set to null/omitted, any ServiceAccount with a valid token is accepted. When set to a non-empty list, only the listed ServiceAccounts are allowed. An empty list behaves the same as null (no restriction).", + "title": "Allowed service accounts" + } + }, + "title": "TrustedProxyConfiguration", + "type": "object" + }, + "TrustedProxyServiceAccount": { + "additionalProperties": false, + "description": "A Kubernetes ServiceAccount identity for trusted-proxy allowlist.", + "properties": { + "namespace": { + "description": "Kubernetes namespace of the ServiceAccount.", + "title": "Namespace", + "type": "string" + }, + "name": { + "description": "Name of the Kubernetes ServiceAccount.", + "title": "Name", + "type": "string" + } + }, + "required": [ + "namespace", + "name" + ], + "title": "TrustedProxyServiceAccount", + "type": "object" + }, + "UnifiedOgxConfig": { + "additionalProperties": false, + "description": "Backend-specific knobs for unified-mode OGX synthesis.\n\nPer Decision S5 of the design spike, backend-agnostic high-level sections\n(inference, ...) live at the configuration root, not here. This block holds\nonly the OGX-specific synthesis controls: which baseline to start\nfrom, an optional profile file, and a raw native_override escape hatch.\n\nAttributes:\n baseline: Synthesis starting point. \"default\" begins from LCORE's\n built-in baseline (src/data/default_run.yaml) including the\n conditional OpenAI inference provider. \"byo-llm\" begins from the\n same file with that OpenAI row removed. \"empty\" begins from an\n empty dict (used by the migration tool for an exact round-trip).\n Ignored when `profile` is set.\n profile: Optional path to a user-authored run.yaml-shaped file used as\n the synthesis baseline. Relative paths resolve against the directory\n of the loaded lightspeed-stack.yaml.\n native_override: Raw OGX schema deep-merged last (maps merge\n recursively, lists and scalars replace). The escape hatch for\n anything the high-level sections do not express. Note:\n `registered_resources.models` is a list, so a native_override\n that sets it replaces \u2014 not merges with \u2014 any LLM models LCORE\n auto-registered from `inference.providers[].allowed_models`.", + "properties": { + "baseline": { + "default": "default", + "description": "Synthesis starting point: 'default' uses LCORE's built-in baseline including the conditional OpenAI provider, 'byo-llm' uses the same baseline without that OpenAI row, 'empty' starts from {}. Ignored when 'profile' is set.", + "enum": [ + "default", + "empty", + "byo-llm" + ], + "title": "Baseline selector", + "type": "string" + }, + "profile": { + "type": "string", + "nullable": true, + "default": null, + "description": "Path to a run.yaml-shaped baseline file. Relative paths resolve against the directory of the loaded lightspeed-stack.yaml.", + "title": "Profile path" + }, + "native_override": { + "additionalProperties": true, + "description": "Raw OGX schema deep-merged last (maps merge recursively; lists and scalars replace). Note: setting registered_resources.models here replaces, not merges with, any LLM models LCORE auto-registered from inference.providers[].allowed_models.", + "title": "Native override", + "type": "object" + } + }, + "title": "UnifiedOgxConfig", + "type": "object" + }, + "UserDataCollection": { + "additionalProperties": false, + "description": "User data collection configuration.", + "properties": { + "feedback_enabled": { + "default": false, + "description": "When set to true the user feedback is stored and later sent for analysis.", + "title": "Feedback enabled", + "type": "boolean" + }, + "feedback_storage": { + "type": "string", + "nullable": true, + "default": null, + "description": "Path to directory where feedback will be saved for further processing.", + "title": "Feedback storage directory" + }, + "transcripts_enabled": { + "default": false, + "description": "When set to true the conversation history is stored and later sent for analysis.", + "title": "Transcripts enabled", + "type": "boolean" + }, + "transcripts_storage": { + "type": "string", + "nullable": true, + "default": null, + "description": "Path to directory where conversation history will be saved for further processing.", + "title": "Transcripts storage directory" + } + }, + "title": "UserDataCollection", + "type": "object" + }, + "VectorStoreConfiguration": { + "additionalProperties": false, + "description": "Configuration for dynamic vector-store providers.\n\nMirrors ``InferenceConfiguration``: a providers list plus a sibling\n``default_provider`` pointer, rather than a per-entry default flag.\n\nAttributes:\n default_provider: Provider id used for vector_stores.default_* in the\n synthesized OGX config. Required when providers is\n non-empty; must match one of providers[].id. Must be omitted when\n providers is empty.\n providers: Dynamic vector-store provider capacity for runtime\n POST /v1/vector-stores creates. Not the same as rag.byok.stores (static\n registered corpora).", + "properties": { + "default_provider": { + "type": "string", + "nullable": true, + "default": null, + "description": "Provider id used for vector_stores.default_* in the synthesized OGX config. Required when providers is non-empty; must match one of providers[].id.", + "title": "Default provider" + }, + "providers": { + "description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as rag.byok.stores (static registered corpora).", + "items": { + "discriminator": { + "mapping": { + "faiss": "`#/components/schemas/`FaissVectorStoreProvider", + "pgvector": "`#/components/schemas/`PgvectorVectorStoreProvider" + }, + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "`#/components/schemas/`FaissVectorStoreProvider" + }, + { + "$ref": "`#/components/schemas/`PgvectorVectorStoreProvider" + } + ] + }, + "title": "Vector store providers", + "type": "array" + } + }, + "title": "VectorStoreConfiguration", + "type": "object" + }, + "VertexAIInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for a Vertex AI inference provider.\n\nAuthentication uses Google Application Default Credentials. Set\nGOOGLE_APPLICATION_CREDENTIALS in the environment when a credentials file\nis required; there is no credentials path field in config.", + "properties": { + "project": { + "type": "string", + "nullable": true, + "default": null, + "title": "GCP project" + }, + "location": { + "type": "string", + "nullable": true, + "default": null, + "title": "GCP location" + } + }, + "title": "VertexAIInferenceProviderConfig", + "type": "object" + }, + "VertexAIInferenceProviderEntry": { + "additionalProperties": false, + "description": "Vertex AI inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "vertexai", + "default": "vertexai", + "description": "Google Vertex AI remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`VertexAIInferenceProviderConfig", + "description": "GCP project and location.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "VertexAIInferenceProviderEntry", + "type": "object" + }, + "VllmInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for a vLLM inference provider.", + "properties": { + "base_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Base URL" + }, + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "title": "API key" + } + }, + "title": "VllmInferenceProviderConfig", + "type": "object" + }, + "VllmInferenceProviderEntry": { + "additionalProperties": false, + "description": "vLLM inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "vllm", + "default": "vllm", + "description": "vLLM OpenAI-compatible remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`VllmInferenceProviderConfig", + "description": "Base URL and optional API key.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "VllmInferenceProviderEntry", + "type": "object" + }, + "WatsonxInferenceProviderConfig": { + "additionalProperties": false, + "description": "Connection settings for a WatsonX inference provider.", + "properties": { + "api_key": { + "type": "string", + "format": "password", + "writeOnly": true, + "nullable": true, + "default": null, + "title": "API key" + }, + "project_id": { + "type": "string", + "nullable": true, + "default": null, + "title": "Project ID" + }, + "base_url": { + "type": "string", + "nullable": true, + "default": null, + "title": "Base URL" + } + }, + "title": "WatsonxInferenceProviderConfig", + "type": "object" + }, + "WatsonxInferenceProviderEntry": { + "additionalProperties": false, + "description": "WatsonX inference provider.", + "properties": { + "id": { + "title": "Provider ID", + "type": "string" + }, + "skip_model_discovery": { + "default": false, + "title": "Skip model discovery", + "type": "boolean" + }, + "allowed_models": { + "items": { + "$ref": "`#/components/schemas/`AllowedModel" + }, + "title": "Allowed models", + "type": "array" + }, + "model_profiles_path": { + "type": "string", + "format": "file-path", + "nullable": true, + "default": null, + "title": "Model profiles path" + }, + "api_key_env": { + "type": "string", + "nullable": true, + "default": null, + "description": "Deprecated: prefer config.api_key with ${env.VAR}.", + "title": "API key environment variable" + }, + "extra": { + "type": "object", + "additionalProperties": true, + "nullable": true, + "default": null, + "description": "Deprecated escape hatch for unmodeled provider knobs.", + "title": "Extra provider config" + }, + "type": { + "const": "watsonx", + "default": "watsonx", + "description": "IBM WatsonX remote inference provider.", + "title": "Provider type", + "type": "string" + }, + "config": { + "$ref": "`#/components/schemas/`WatsonxInferenceProviderConfig", + "description": "API key, project ID, and base URL.", + "title": "Connection settings" + } + }, + "required": [ + "id" + ], + "title": "WatsonxInferenceProviderEntry", + "type": "object" + } + } + }, + "paths": {} +} \ No newline at end of file diff --git a/src/utils/json_schema_updater.py b/src/utils/json_schema_updater.py index 4aaa56337..6ae3700b3 100644 --- a/src/utils/json_schema_updater.py +++ b/src/utils/json_schema_updater.py @@ -10,9 +10,12 @@ def recursive_update( """Transform a JSON Schema-like dictionary into an OpenAPI-compatible schema. Recursively walks the input mapping and applies compatibility fixes: - - converts patterns like `anyOf: [{ "type": X }, { "type": "null" }]` into - a single `"type": X` with `"nullable": True` (optional types) - - rewrites `"exclusiveMinimum"` to `"minimum"` + - converts patterns like `anyOf: [{"type": X, ...constraints}, {"type": "null"}]` + into a single `"type": X` with `"nullable": True`, preserving all additional + constraints from the first variant and recursively applying OpenAPI 3.0 + fixes to them (optional types) + - rewrites `"exclusiveMinimum"` to `"minimum"` plus `"exclusiveMinimum": true` + (OpenAPI 3.0 boolean form) - otherwise preserves entries Parameters: @@ -43,14 +46,20 @@ def recursive_update( ): # only the first type is correct, # we need to ignore the second one - val = value[0]["type"] - new["type"] = val + first_item = value[0] + new["type"] = first_item["type"] + # preserve all other constraints from the first item, + # processing them through recursive_update so that keys like + # exclusiveMinimum are converted to OpenAPI 3.0 form + remaining = {k: v for k, v in first_item.items() if k != "type"} + new.update(recursive_update(remaining)) # create new attribute new["nullable"] = True # exclusiveMinimum attribute handling is broken # in Pydantic - this is simple fix elif key == "exclusiveMinimum": new["minimum"] = value + new["exclusiveMinimum"] = True else: new[key] = value return new diff --git a/tests/unit/utils/test_json_schema_updater.py b/tests/unit/utils/test_json_schema_updater.py index 7a442adea..ad219e202 100644 --- a/tests/unit/utils/test_json_schema_updater.py +++ b/tests/unit/utils/test_json_schema_updater.py @@ -85,7 +85,7 @@ def test_recursive_recurse_into_subdicts() -> None: "type": "object", "properties": { "name": {"type": "string"}, - "age": {"type": "integer", "minimum": 0}, + "age": {"type": "integer", "minimum": 0, "exclusiveMinimum": True}, }, } @@ -115,7 +115,7 @@ def test_exclusive_minimum_handling_positive_value() -> None: "type": "object", "properties": { "name": {"type": "string"}, - "age": {"type": "integer", "minimum": 100}, + "age": {"type": "integer", "minimum": 100, "exclusiveMinimum": True}, }, } @@ -145,7 +145,7 @@ def test_exclusive_minimum_handling_zero_value() -> None: "type": "object", "properties": { "name": {"type": "string"}, - "age": {"type": "integer", "minimum": 0}, + "age": {"type": "integer", "minimum": 0, "exclusiveMinimum": True}, }, } @@ -175,7 +175,7 @@ def test_exclusive_minimum_handling_negative_value() -> None: "type": "object", "properties": { "name": {"type": "string"}, - "age": {"type": "integer", "minimum": -100}, + "age": {"type": "integer", "minimum": -100, "exclusiveMinimum": True}, }, } @@ -248,6 +248,7 @@ def test_anyof_list_with_more_complex_first_entry() -> None: # expected output from updater expected = { "type": "array", + "items": {"type": "integer"}, "nullable": True, } @@ -291,9 +292,11 @@ def test_mixed_keys_preserve_order_like_behavior() -> None: } # expected output from updater - # exclusiveMinimum should become minimum; anyOf -> type+nullable and description preserved + # exclusiveMinimum should become minimum+exclusiveMinimum; + # anyOf -> type+nullable and description preserved expected = { "minimum": 5, + "exclusiveMinimum": True, "type": "integer", "nullable": True, "description": "example", @@ -326,8 +329,10 @@ def test_deeply_nested_anyof_and_exclusive_minimum() -> None: "level1": { "level2": { "type": "object", + "properties": {"x": {"type": "string"}}, "nullable": True, "minimum": 1, + "exclusiveMinimum": True, } } } @@ -425,6 +430,89 @@ def test_anyof_with_additional_fields_on_first_item() -> None: # expected output from updater expected = { "type": "string", + "format": "email", + "maxLength": 50, + "nullable": True, + } + + # perform the update + result = recursive_update(original) + + # non-empty dict with known content should be returned + assert result == expected + + +def test_anyof_nullable_preserves_enum() -> None: + """Test that enum constraints are preserved when converting anyOf to nullable.""" + # input to updater + original = { + "anyOf": [ + {"type": "string", "enum": ["llm", "embedding", "rerank"]}, + {"type": "null"}, + ] + } + + # expected output from updater + expected = { + "type": "string", + "enum": ["llm", "embedding", "rerank"], + "nullable": True, + } + + # perform the update + result = recursive_update(original) + + # non-empty dict with known content should be returned + assert result == expected + + +def test_anyof_nullable_preserves_nested_items() -> None: + """Test that nested items dict is recursively updated when preserving anyOf constraints.""" + # input to updater + original = { + "anyOf": [ + { + "type": "array", + "items": {"type": "integer", "exclusiveMinimum": 0}, + }, + {"type": "null"}, + ] + } + + # expected output from updater + expected = { + "type": "array", + "items": {"type": "integer", "minimum": 0, "exclusiveMinimum": True}, + "nullable": True, + } + + # perform the update + result = recursive_update(original) + + # non-empty dict with known content should be returned + assert result == expected + + +def test_anyof_nullable_with_top_level_exclusive_minimum() -> None: + """Test anyOf nullable conversion when first item contains exclusiveMinimum. + + This covers the Optional[PositiveInt] pattern where Pydantic emits + {"anyOf": [{"type": "integer", "exclusiveMinimum": 0}, {"type": "null"}]}. + The integer exclusiveMinimum must be converted to OpenAPI 3.0 boolean form. + """ + # input to updater — Optional[PositiveInt] pattern + original = { + "anyOf": [ + {"type": "integer", "exclusiveMinimum": 0}, + {"type": "null"}, + ] + } + + # expected output from updater + expected = { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": True, "nullable": True, } @@ -450,7 +538,10 @@ def test_anyof_with_additional_fields_more_items() -> None: # expected output from updater expected = { "minimum": 5, + "exclusiveMinimum": True, "type": "string", + "format": "email", + "maxLength": 50, "nullable": True, "description": "example", }