diff --git a/docs/openapi.json b/docs/openapi.json index 6d3c1be6d..aa53ed81b 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -4447,7 +4447,7 @@ ], "summary": "Handle A2A Jsonrpc", "description": "Handle A2A JSON-RPC requests following the A2A protocol specification.\n\nThis endpoint uses the DefaultRequestHandler from the A2A SDK to handle\nall JSON-RPC requests including message/send, message/stream, etc.\n\nThe A2A SDK application is created per-request to include authentication\ncontext while still leveraging FastAPI's authorization middleware.\n\nAutomatically detects streaming requests (message/stream JSON-RPC method)\nand returns a StreamingResponse to enable real-time chunk delivery.\n\nArgs:\n request: FastAPI request object\n auth: Authentication tuple\n mcp_headers: MCP headers for context propagation\n\nReturns:\n JSON-RPC response or streaming response", - "operationId": "handle_a2a_jsonrpc_a2a_get", + "operationId": "handle_a2a_jsonrpc_a2a_post", "responses": { "200": { "description": "Successful Response", @@ -4465,7 +4465,7 @@ ], "summary": "Handle A2A Jsonrpc", "description": "Handle A2A JSON-RPC requests following the A2A protocol specification.\n\nThis endpoint uses the DefaultRequestHandler from the A2A SDK to handle\nall JSON-RPC requests including message/send, message/stream, etc.\n\nThe A2A SDK application is created per-request to include authentication\ncontext while still leveraging FastAPI's authorization middleware.\n\nAutomatically detects streaming requests (message/stream JSON-RPC method)\nand returns a StreamingResponse to enable real-time chunk delivery.\n\nArgs:\n request: FastAPI request object\n auth: Authentication tuple\n mcp_headers: MCP headers for context propagation\n\nReturns:\n JSON-RPC response or streaming response", - "operationId": "handle_a2a_jsonrpc_a2a_get", + "operationId": "handle_a2a_jsonrpc_a2a_post", "responses": { "200": { "description": "Successful Response", @@ -7343,6 +7343,14 @@ "title": "Authorization headers", "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. " }, + "headers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Propagated 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." + }, "timeout": { "anyOf": [ { @@ -8862,6 +8870,7 @@ "properties": { "nevra": { "type": "string", + "pattern": "^[a-zA-Z0-9._:+~\\-]*$", "title": "Nevra", "description": "CLA NEVRA identifier", "default": "", @@ -8871,6 +8880,7 @@ }, "version": { "type": "string", + "pattern": "^[a-zA-Z0-9._\\-]*$", "title": "Version", "description": "Command line assistant version", "default": "", @@ -9013,6 +9023,7 @@ "properties": { "os": { "type": "string", + "pattern": "^[a-zA-Z0-9._ \\-]*$", "title": "Os", "description": "Operating system name", "default": "", @@ -9022,6 +9033,7 @@ }, "version": { "type": "string", + "pattern": "^[a-zA-Z0-9._ \\-]*$", "title": "Version", "description": "Operating system version", "default": "", @@ -9032,6 +9044,7 @@ }, "arch": { "type": "string", + "pattern": "^[a-zA-Z0-9._ \\-]*$", "title": "Arch", "description": "System architecture", "default": "", @@ -9042,6 +9055,7 @@ }, "id": { "type": "string", + "pattern": "^[a-zA-Z0-9._\\-]*$", "title": "Id", "description": "Client machine ID", "default": "", diff --git a/docs/openapi.md b/docs/openapi.md index c6f8a04e4..ecc0cb093 100644 --- a/docs/openapi.md +++ b/docs/openapi.md @@ -627,6 +627,7 @@ Examples } } ``` + ## GET `/v1/providers` > **Providers Endpoint Handler** @@ -1572,6 +1573,82 @@ Examples } ``` +## POST `/v1/streaming_query/interrupt` + +> **Streaming Query Interrupt Endpoint Handler** + +Interrupt an in-progress streaming query by request identifier. + +Parameters: + interrupt_request: Request payload containing the stream request ID. + auth: Auth context tuple resolved from the authentication dependency. + registry: Stream interrupt registry dependency used to cancel streams. + +Returns: + StreamingInterruptResponse: Confirmation payload when interruption succeeds. + +Raises: + HTTPException: If no active stream for the given request ID can be interrupted. + + + + + +### 📦 Request Body + +[StreamingInterruptRequest](#streaminginterruptrequest) + +### ✅ Responses + +| Status Code | Description | Component | +|-------------|---------------------|-----------------------------------------------------------| +| 200 | Successful response | [StreamingInterruptResponse](#streaminginterruptresponse) | +| 401 | Unauthorized | [UnauthorizedResponse](#unauthorizedresponse) | +| 403 | Permission denied | [ForbiddenResponse](#forbiddenresponse) | +| 404 | Resource not found | [NotFoundResponse](#notfoundresponse) | +| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) | + + +```json +{ + "detail": { + "cause": "No Authorization header found", + "response": "Missing or invalid credentials provided by client" + } +} +``` + + +```json +{ + "detail": { + "cause": "No token found in Authorization header", + "response": "Missing or invalid credentials provided by client" + } +} +``` + + + +```json +{ + "detail": { + "cause": "User 6789 is not authorized to access this endpoint.", + "response": "User does not have permission to access this endpoint" + } +} +``` + + + +```json +{ + "detail": { + "cause": "Streaming Request with ID 123e4567-e89b-12d3-a456-426614174000 does not exist", + "response": "Streaming Request not found" + } +} +``` ## GET `/v1/config` > **Config Endpoint Handler** @@ -4745,6 +4822,7 @@ Useful resources: | provider_id | string | MCP provider identification | | url | string | URL of the MCP server | | authorization_headers | object | 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. | +| headers | array | 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. | | timeout | | Timeout in seconds for requests to the MCP server. If not specified, the default timeout from Llama Stack will be used. Note: This field is reserved for future use when Llama Stack adds timeout support. | @@ -5454,6 +5532,47 @@ Example: | status | object | The status of the service | +## StreamingInterruptRequest + + +Model representing a request to interrupt an active streaming query. + +Attributes: + request_id: Unique ID of the active streaming request to interrupt. + + +| Field | Type | Description | +|-------|------|-------------| +| request_id | string | The active streaming request ID to interrupt | + + +## StreamingInterruptResponse + + +Model representing a response to a streaming interrupt request. + +Attributes: + request_id: The streaming request ID targeted by the interrupt call. + interrupted: Whether an in-progress stream was interrupted. + message: Human-readable interruption status message. + +Example: + ```python + response = StreamingInterruptResponse( + request_id="123e4567-e89b-12d3-a456-426614174000", + interrupted=True, + message="Streaming request interrupted", + ) + ``` + + +| Field | Type | Description | +|-------|------|-------------| +| request_id | string | The streaming request ID targeted by the interrupt call | +| interrupted | boolean | Whether an in-progress stream was interrupted | +| message | string | Human-readable interruption status message | + + ## TLSConfiguration