Skip to content

Commit 7d96029

Browse files
committed
LCORE-535: Regenerated OpenAPI schema
1 parent d492c2b commit 7d96029

File tree

3 files changed

+170
-16
lines changed

3 files changed

+170
-16
lines changed

docs/openapi.json

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"query"
122122
],
123123
"summary": "Query Endpoint Handler",
124-
"description": "Handle request to the /query endpoint.",
124+
"description": "Handle request to the /query endpoint.\n\nProcesses a POST request to the /query endpoint, forwarding the\nuser's query to a selected Llama Stack LLM or agent and\nreturning the generated response.\n\nValidates configuration and authentication, selects the appropriate model\nand provider, retrieves the LLM response, updates metrics, and optionally\nstores a transcript of the interaction. Handles connection errors to the\nLlama Stack service by returning an HTTP 500 error.\n\nReturns:\n QueryResponse: Contains the conversation ID and the LLM-generated response.",
125125
"operationId": "query_endpoint_handler_v1_query_post",
126126
"requestBody": {
127127
"content": {
@@ -192,7 +192,7 @@
192192
"streaming_query"
193193
],
194194
"summary": "Streaming Query Endpoint Handler",
195-
"description": "Handle request to the /streaming_query endpoint.",
195+
"description": "Handle request to the /streaming_query endpoint.\n\nThis endpoint receives a query request, authenticates the user,\nselects the appropriate model and provider, and streams\nincremental response events from the Llama Stack backend to the\nclient. Events include start, token updates, tool calls, turn\ncompletions, errors, and end-of-stream metadata. Optionally\nstores the conversation transcript if enabled in configuration.\n\nReturns:\n StreamingResponse: An HTTP streaming response yielding\n SSE-formatted events for the query lifecycle.\n\nRaises:\n HTTPException: Returns HTTP 500 if unable to connect to the\n Llama Stack server.",
196196
"operationId": "streaming_query_endpoint_handler_v1_streaming_query_post",
197197
"requestBody": {
198198
"content": {
@@ -837,6 +837,48 @@
837837
}
838838
]
839839
},
840+
"CORSConfiguration": {
841+
"properties": {
842+
"allow_origins": {
843+
"items": {
844+
"type": "string"
845+
},
846+
"type": "array",
847+
"title": "Allow Origins",
848+
"default": [
849+
"*"
850+
]
851+
},
852+
"allow_credentials": {
853+
"type": "boolean",
854+
"title": "Allow Credentials",
855+
"default": false
856+
},
857+
"allow_methods": {
858+
"items": {
859+
"type": "string"
860+
},
861+
"type": "array",
862+
"title": "Allow Methods",
863+
"default": [
864+
"*"
865+
]
866+
},
867+
"allow_headers": {
868+
"items": {
869+
"type": "string"
870+
},
871+
"type": "array",
872+
"title": "Allow Headers",
873+
"default": [
874+
"*"
875+
]
876+
}
877+
},
878+
"type": "object",
879+
"title": "CORSConfiguration",
880+
"description": "CORS configuration."
881+
},
840882
"Configuration": {
841883
"properties": {
842884
"name": {
@@ -1612,6 +1654,7 @@
16121654
},
16131655
"port": {
16141656
"type": "integer",
1657+
"exclusiveMinimum": 0.0,
16151658
"title": "Port",
16161659
"default": 5432
16171660
},
@@ -1969,6 +2012,7 @@
19692012
},
19702013
"port": {
19712014
"type": "integer",
2015+
"exclusiveMinimum": 0.0,
19722016
"title": "Port",
19732017
"default": 8080
19742018
},
@@ -1979,6 +2023,7 @@
19792023
},
19802024
"workers": {
19812025
"type": "integer",
2026+
"exclusiveMinimum": 0.0,
19822027
"title": "Workers",
19832028
"default": 1
19842029
},
@@ -1995,6 +2040,21 @@
19952040
"tls_config": {
19962041
"$ref": "#/components/schemas/TLSConfiguration",
19972042
"default": {}
2043+
},
2044+
"cors": {
2045+
"$ref": "#/components/schemas/CORSConfiguration",
2046+
"default": {
2047+
"allow_origins": [
2048+
"*"
2049+
],
2050+
"allow_credentials": false,
2051+
"allow_methods": [
2052+
"*"
2053+
],
2054+
"allow_headers": [
2055+
"*"
2056+
]
2057+
}
19982058
}
19992059
},
20002060
"type": "object",

docs/openapi.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ Returns:
5656
5757
Handle requests to the /models endpoint.
5858

59+
Process GET requests to the /models endpoint, returning a list of available
60+
models from the Llama Stack service.
61+
62+
Raises:
63+
HTTPException: If unable to connect to the Llama Stack server or if
64+
model retrieval fails for any reason.
65+
66+
Returns:
67+
ModelsResponse: An object containing the list of available models.
68+
5969

6070

6171

@@ -73,6 +83,18 @@ Handle requests to the /models endpoint.
7383
7484
Handle request to the /query endpoint.
7585

86+
Processes a POST request to the /query endpoint, forwarding the
87+
user's query to a selected Llama Stack LLM or agent and
88+
returning the generated response.
89+
90+
Validates configuration and authentication, selects the appropriate model
91+
and provider, retrieves the LLM response, updates metrics, and optionally
92+
stores a transcript of the interaction. Handles connection errors to the
93+
Llama Stack service by returning an HTTP 500 error.
94+
95+
Returns:
96+
QueryResponse: Contains the conversation ID and the LLM-generated response.
97+
7698

7799

78100

@@ -96,6 +118,21 @@ Handle request to the /query endpoint.
96118
97119
Handle request to the /streaming_query endpoint.
98120

121+
This endpoint receives a query request, authenticates the user,
122+
selects the appropriate model and provider, and streams
123+
incremental response events from the Llama Stack backend to the
124+
client. Events include start, token updates, tool calls, turn
125+
completions, errors, and end-of-stream metadata. Optionally
126+
stores the conversation transcript if enabled in configuration.
127+
128+
Returns:
129+
StreamingResponse: An HTTP streaming response yielding
130+
SSE-formatted events for the query lifecycle.
131+
132+
Raises:
133+
HTTPException: Returns HTTP 500 if unable to connect to the
134+
Llama Stack server.
135+
99136

100137

101138

@@ -138,6 +175,9 @@ Returns:
138175
139176
Handle feedback requests.
140177

178+
Processes a user feedback submission, storing the feedback and
179+
returning a confirmation response.
180+
141181
Args:
142182
feedback_request: The request containing feedback information.
143183
ensure_feedback_enabled: The feedback handler (FastAPI Depends) that
@@ -148,6 +188,9 @@ Args:
148188
Returns:
149189
Response indicating the status of the feedback storage request.
150190

191+
Raises:
192+
HTTPException: Returns HTTP 500 if feedback storage fails.
193+
151194

152195

153196

@@ -420,6 +463,20 @@ Attributes:
420463
| username | string | User name |
421464

422465

466+
## CORSConfiguration
467+
468+
469+
CORS configuration.
470+
471+
472+
| Field | Type | Description |
473+
|-------|------|-------------|
474+
| allow_origins | array | |
475+
| allow_credentials | boolean | |
476+
| allow_methods | array | |
477+
| allow_headers | array | |
478+
479+
423480
## Configuration
424481

425482

@@ -962,6 +1019,7 @@ Service configuration.
9621019
| color_log | boolean | |
9631020
| access_log | boolean | |
9641021
| tls_config | | |
1022+
| cors | | |
9651023

9661024

9671025
## StatusResponse

docs/output.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,27 @@ Returns:
7474

7575
| Status Code | Description | Component |
7676
|-------------|-------------|-----------|
77-
| 200 | Successful Response | [ModelsResponse](#modelsresponse)
78-
|
77+
| 200 | Successful Response | [ModelsResponse](#modelsresponse) |
7978
| 503 | Connection to Llama Stack is broken | |
79+
8080
## POST `/v1/query`
8181

8282
> **Query Endpoint Handler**
8383
8484
Handle request to the /query endpoint.
8585

86+
Processes a POST request to the /query endpoint, forwarding the
87+
user's query to a selected Llama Stack LLM or agent and
88+
returning the generated response.
89+
90+
Validates configuration and authentication, selects the appropriate model
91+
and provider, retrieves the LLM response, updates metrics, and optionally
92+
stores a transcript of the interaction. Handles connection errors to the
93+
Llama Stack service by returning an HTTP 500 error.
94+
95+
Returns:
96+
QueryResponse: Contains the conversation ID and the LLM-generated response.
97+
8698

8799

88100

@@ -95,21 +107,32 @@ Handle request to the /query endpoint.
95107

96108
| Status Code | Description | Component |
97109
|-------------|-------------|-----------|
98-
| 200 | Successful Response | [QueryResponse](#queryresponse)
99-
|
100-
| 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse)
101-
|
102-
| 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse)
103-
|
110+
| 200 | Successful Response | [QueryResponse](#queryresponse) |
111+
| 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
112+
| 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
104113
| 503 | Service Unavailable | |
105-
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
106-
|
114+
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
107115
## POST `/v1/streaming_query`
108116

109117
> **Streaming Query Endpoint Handler**
110118
111119
Handle request to the /streaming_query endpoint.
112120

121+
This endpoint receives a query request, authenticates the user,
122+
selects the appropriate model and provider, and streams
123+
incremental response events from the Llama Stack backend to the
124+
client. Events include start, token updates, tool calls, turn
125+
completions, errors, and end-of-stream metadata. Optionally
126+
stores the conversation transcript if enabled in configuration.
127+
128+
Returns:
129+
StreamingResponse: An HTTP streaming response yielding
130+
SSE-formatted events for the query lifecycle.
131+
132+
Raises:
133+
HTTPException: Returns HTTP 500 if unable to connect to the
134+
Llama Stack server.
135+
113136

114137

115138

@@ -123,8 +146,7 @@ Handle request to the /streaming_query endpoint.
123146
| Status Code | Description | Component |
124147
|-------------|-------------|-----------|
125148
| 200 | Successful Response | ... |
126-
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
127-
|
149+
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
128150
## GET `/v1/config`
129151

130152
> **Config Endpoint Handler**
@@ -145,8 +167,7 @@ Returns:
145167

146168
| Status Code | Description | Component |
147169
|-------------|-------------|-----------|
148-
| 200 | Successful Response | [Configuration](#configuration)
149-
|
170+
| 200 | Successful Response | [Configuration](#configuration) |
150171
| 503 | Service Unavailable | |
151172
## POST `/v1/feedback`
152173

@@ -442,6 +463,20 @@ Attributes:
442463
| username | string | User name |
443464

444465

466+
## CORSConfiguration
467+
468+
469+
CORS configuration.
470+
471+
472+
| Field | Type | Description |
473+
|-------|------|-------------|
474+
| allow_origins | array | |
475+
| allow_credentials | boolean | |
476+
| allow_methods | array | |
477+
| allow_headers | array | |
478+
479+
445480
## Configuration
446481

447482

@@ -974,6 +1009,7 @@ Service configuration.
9741009
| color_log | boolean | |
9751010
| access_log | boolean | |
9761011
| tls_config | | |
1012+
| cors | | |
9771013

9781014

9791015
## StatusResponse

0 commit comments

Comments
 (0)