Skip to content

Commit fe4cc08

Browse files
authored
Merge pull request #1239 from tisnik/lcore-1356-updated-openapi-specification
LCORE-1356: Updated OpenAPI specification
2 parents 8184f7a + ff55ff5 commit fe4cc08

2 files changed

Lines changed: 135 additions & 2 deletions

File tree

docs/openapi.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4447,7 +4447,7 @@
44474447
],
44484448
"summary": "Handle A2A Jsonrpc",
44494449
"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",
4450-
"operationId": "handle_a2a_jsonrpc_a2a_get",
4450+
"operationId": "handle_a2a_jsonrpc_a2a_post",
44514451
"responses": {
44524452
"200": {
44534453
"description": "Successful Response",
@@ -4465,7 +4465,7 @@
44654465
],
44664466
"summary": "Handle A2A Jsonrpc",
44674467
"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",
4468-
"operationId": "handle_a2a_jsonrpc_a2a_get",
4468+
"operationId": "handle_a2a_jsonrpc_a2a_post",
44694469
"responses": {
44704470
"200": {
44714471
"description": "Successful Response",
@@ -7343,6 +7343,14 @@
73437343
"title": "Authorization headers",
73447344
"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. "
73457345
},
7346+
"headers": {
7347+
"items": {
7348+
"type": "string"
7349+
},
7350+
"type": "array",
7351+
"title": "Propagated headers",
7352+
"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."
7353+
},
73467354
"timeout": {
73477355
"anyOf": [
73487356
{
@@ -8862,6 +8870,7 @@
88628870
"properties": {
88638871
"nevra": {
88648872
"type": "string",
8873+
"pattern": "^[a-zA-Z0-9._:+~\\-]*$",
88658874
"title": "Nevra",
88668875
"description": "CLA NEVRA identifier",
88678876
"default": "",
@@ -8871,6 +8880,7 @@
88718880
},
88728881
"version": {
88738882
"type": "string",
8883+
"pattern": "^[a-zA-Z0-9._\\-]*$",
88748884
"title": "Version",
88758885
"description": "Command line assistant version",
88768886
"default": "",
@@ -9013,6 +9023,7 @@
90139023
"properties": {
90149024
"os": {
90159025
"type": "string",
9026+
"pattern": "^[a-zA-Z0-9._ \\-]*$",
90169027
"title": "Os",
90179028
"description": "Operating system name",
90189029
"default": "",
@@ -9022,6 +9033,7 @@
90229033
},
90239034
"version": {
90249035
"type": "string",
9036+
"pattern": "^[a-zA-Z0-9._ \\-]*$",
90259037
"title": "Version",
90269038
"description": "Operating system version",
90279039
"default": "",
@@ -9032,6 +9044,7 @@
90329044
},
90339045
"arch": {
90349046
"type": "string",
9047+
"pattern": "^[a-zA-Z0-9._ \\-]*$",
90359048
"title": "Arch",
90369049
"description": "System architecture",
90379050
"default": "",
@@ -9042,6 +9055,7 @@
90429055
},
90439056
"id": {
90449057
"type": "string",
9058+
"pattern": "^[a-zA-Z0-9._\\-]*$",
90459059
"title": "Id",
90469060
"description": "Client machine ID",
90479061
"default": "",

docs/openapi.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ Examples
627627
}
628628
}
629629
```
630+
630631
## GET `/v1/providers`
631632

632633
> **Providers Endpoint Handler**
@@ -1572,6 +1573,82 @@ Examples
15721573
}
15731574
```
15741575

1576+
## POST `/v1/streaming_query/interrupt`
1577+
1578+
> **Streaming Query Interrupt Endpoint Handler**
1579+
1580+
Interrupt an in-progress streaming query by request identifier.
1581+
1582+
Parameters:
1583+
interrupt_request: Request payload containing the stream request ID.
1584+
auth: Auth context tuple resolved from the authentication dependency.
1585+
registry: Stream interrupt registry dependency used to cancel streams.
1586+
1587+
Returns:
1588+
StreamingInterruptResponse: Confirmation payload when interruption succeeds.
1589+
1590+
Raises:
1591+
HTTPException: If no active stream for the given request ID can be interrupted.
1592+
1593+
1594+
1595+
1596+
1597+
### 📦 Request Body
1598+
1599+
[StreamingInterruptRequest](#streaminginterruptrequest)
1600+
1601+
### ✅ Responses
1602+
1603+
| Status Code | Description | Component |
1604+
|-------------|---------------------|-----------------------------------------------------------|
1605+
| 200 | Successful response | [StreamingInterruptResponse](#streaminginterruptresponse) |
1606+
| 401 | Unauthorized | [UnauthorizedResponse](#unauthorizedresponse) |
1607+
| 403 | Permission denied | [ForbiddenResponse](#forbiddenresponse) |
1608+
| 404 | Resource not found | [NotFoundResponse](#notfoundresponse) |
1609+
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
1610+
1611+
1612+
```json
1613+
{
1614+
"detail": {
1615+
"cause": "No Authorization header found",
1616+
"response": "Missing or invalid credentials provided by client"
1617+
}
1618+
}
1619+
```
1620+
1621+
1622+
```json
1623+
{
1624+
"detail": {
1625+
"cause": "No token found in Authorization header",
1626+
"response": "Missing or invalid credentials provided by client"
1627+
}
1628+
}
1629+
```
1630+
1631+
1632+
1633+
```json
1634+
{
1635+
"detail": {
1636+
"cause": "User 6789 is not authorized to access this endpoint.",
1637+
"response": "User does not have permission to access this endpoint"
1638+
}
1639+
}
1640+
```
1641+
1642+
1643+
1644+
```json
1645+
{
1646+
"detail": {
1647+
"cause": "Streaming Request with ID 123e4567-e89b-12d3-a456-426614174000 does not exist",
1648+
"response": "Streaming Request not found"
1649+
}
1650+
}
1651+
```
15751652
## GET `/v1/config`
15761653

15771654
> **Config Endpoint Handler**
@@ -4745,6 +4822,7 @@ Useful resources:
47454822
| provider_id | string | MCP provider identification |
47464823
| url | string | URL of the MCP server |
47474824
| 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. |
4825+
| 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. |
47484826
| 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. |
47494827

47504828

@@ -5454,6 +5532,47 @@ Example:
54545532
| status | object | The status of the service |
54555533

54565534

5535+
## StreamingInterruptRequest
5536+
5537+
5538+
Model representing a request to interrupt an active streaming query.
5539+
5540+
Attributes:
5541+
request_id: Unique ID of the active streaming request to interrupt.
5542+
5543+
5544+
| Field | Type | Description |
5545+
|-------|------|-------------|
5546+
| request_id | string | The active streaming request ID to interrupt |
5547+
5548+
5549+
## StreamingInterruptResponse
5550+
5551+
5552+
Model representing a response to a streaming interrupt request.
5553+
5554+
Attributes:
5555+
request_id: The streaming request ID targeted by the interrupt call.
5556+
interrupted: Whether an in-progress stream was interrupted.
5557+
message: Human-readable interruption status message.
5558+
5559+
Example:
5560+
```python
5561+
response = StreamingInterruptResponse(
5562+
request_id="123e4567-e89b-12d3-a456-426614174000",
5563+
interrupted=True,
5564+
message="Streaming request interrupted",
5565+
)
5566+
```
5567+
5568+
5569+
| Field | Type | Description |
5570+
|-------|------|-------------|
5571+
| request_id | string | The streaming request ID targeted by the interrupt call |
5572+
| interrupted | boolean | Whether an in-progress stream was interrupted |
5573+
| message | string | Human-readable interruption status message |
5574+
5575+
54575576
## TLSConfiguration
54585577

54595578

0 commit comments

Comments
 (0)