Skip to content

Commit bace7c4

Browse files
authored
Merge pull request #923 from tisnik/lcore-1062-new-configuration-options
LCORE-1062: new configuration options for quota runner
2 parents 42b1f35 + defcde6 commit bace7c4

10 files changed

Lines changed: 204 additions & 64 deletions

File tree

docs/config.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,11 @@ <h2 id="quotalimiterconfiguration">QuotaLimiterConfiguration</h2>
11161116
<h2 id="quotaschedulerconfiguration">QuotaSchedulerConfiguration</h2>
11171117
<p>Quota scheduler configuration.</p>
11181118
<table>
1119+
<colgroup>
1120+
<col style="width: 26%"/>
1121+
<col style="width: 23%"/>
1122+
<col style="width: 50%"/>
1123+
</colgroup>
11191124
<thead>
11201125
<tr class="header">
11211126
<th>Field</th>
@@ -1129,6 +1134,20 @@ <h2 id="quotaschedulerconfiguration">QuotaSchedulerConfiguration</h2>
11291134
<td>integer</td>
11301135
<td>Quota scheduler period specified in seconds</td>
11311136
</tr>
1137+
<tr class="even">
1138+
<td>database_reconnection_count</td>
1139+
<td>integer</td>
1140+
<td>Database reconnection count on startup. When database for quota is
1141+
not available on startup, the service tries to reconnect N times with
1142+
specified delay.</td>
1143+
</tr>
1144+
<tr class="odd">
1145+
<td>database_reconnection_delay</td>
1146+
<td>integer</td>
1147+
<td>Database reconnection delay specified in seconds. When database for
1148+
quota is not available on startup, the service tries to reconnect N
1149+
times with specified delay.</td>
1150+
</tr>
11321151
</tbody>
11331152
</table>
11341153
<h2 id="rhidentityconfiguration">RHIdentityConfiguration</h2>

docs/config.json

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@
66
},
77
"components": {
88
"schemas": {
9+
"APIKeyTokenConfiguration": {
10+
"additionalProperties": false,
11+
"description": "API Key Token configuration.",
12+
"properties": {
13+
"api_key": {
14+
"examples": [
15+
"some-api-key"
16+
],
17+
"format": "password",
18+
"minLength": 1,
19+
"title": "API key",
20+
"type": "string",
21+
"writeOnly": true
22+
}
23+
},
24+
"required": [
25+
"api_key"
26+
],
27+
"title": "APIKeyTokenConfiguration",
28+
"type": "object"
29+
},
930
"AccessRule": {
1031
"additionalProperties": false,
1132
"description": "Rule defining what actions a role can perform.",
@@ -56,7 +77,8 @@
5677
"get_metrics",
5778
"get_config",
5879
"info",
59-
"model_override"
80+
"model_override",
81+
"rlsapi_v1_infer"
6082
],
6183
"title": "Action",
6284
"type": "string"
@@ -98,6 +120,17 @@
98120
],
99121
"default": null
100122
},
123+
"api_key_config": {
124+
"anyOf": [
125+
{
126+
"$ref": "#/components/schemas/APIKeyTokenConfiguration"
127+
},
128+
{
129+
"type": "null"
130+
}
131+
],
132+
"default": null
133+
},
101134
"rh_identity_config": {
102135
"anyOf": [
103136
{
@@ -663,7 +696,7 @@
663696
},
664697
"ModelContextProtocolServer": {
665698
"additionalProperties": false,
666-
"description": "Model context protocol server configuration.\n\nMCP (Model Context Protocol) servers provide tools and\ncapabilities to the AI agents. These are configured by this structure.\nOnly MCP servers defined in the lightspeed-stack.yaml configuration are\navailable to the agents. Tools configured in the llama-stack run.yaml\nare not accessible to lightspeed-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)",
699+
"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 llama-stack 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)",
667700
"properties": {
668701
"name": {
669702
"description": "MCP server name that must be unique",
@@ -691,7 +724,7 @@
691724
},
692725
"PostgreSQLDatabaseConfiguration": {
693726
"additionalProperties": false,
694-
"description": "PostgreSQL database configuration.\n\nPostgreSQL database is used by Lightspeed Core Stack service for storing information about\nconversation IDs. It can also be leveraged to store conversation history and information\nabout 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/)",
727+
"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/)",
695728
"properties": {
696729
"host": {
697730
"default": "localhost",
@@ -905,7 +938,7 @@
905938
},
906939
"ServiceConfiguration": {
907940
"additionalProperties": false,
908-
"description": "Service configuration.\n\nLightspeed Core Stack is a REST API service that accepts requests\non a specified hostname and port. It is also possible to enable\nauthentication and specify the number of Uvicorn workers. When more\nworkers are specified, the service can handle requests concurrently.",
941+
"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.",
909942
"properties": {
910943
"host": {
911944
"default": "localhost",

docs/config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ Quota scheduler configuration.
420420
| Field | Type | Description |
421421
|-------|------|-------------|
422422
| period | integer | Quota scheduler period specified in seconds |
423+
| database_reconnection_count | integer | Database reconnection count on startup. When database for quota is not available on startup, the service tries to reconnect N times with specified delay. |
424+
| database_reconnection_delay | integer | 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. |
423425

424426

425427
## RHIdentityConfiguration

docs/config.puml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ class "QuotaLimiterConfiguration" as src.models.config.QuotaLimiterConfiguration
157157
type : Literal['user_limiter', 'cluster_limiter']
158158
}
159159
class "QuotaSchedulerConfiguration" as src.models.config.QuotaSchedulerConfiguration {
160+
database_reconnection_count
161+
database_reconnection_delay
160162
period
161163
}
162164
class "RHIdentityConfiguration" as src.models.config.RHIdentityConfiguration {

0 commit comments

Comments
 (0)