From 26623b1b5c2e170fda47d24639a9f1c17e61cc36 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Thu, 27 Nov 2025 08:43:19 +0100 Subject: [PATCH 1/2] LCORE-973: database configuration description --- src/models/config.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/models/config.py b/src/models/config.py index 7bd32a45b..c71f7a20f 100644 --- a/src/models/config.py +++ b/src/models/config.py @@ -232,8 +232,17 @@ def check_postgres_configuration(self) -> Self: class DatabaseConfiguration(ConfigurationBase): """Database configuration.""" - sqlite: Optional[SQLiteDatabaseConfiguration] = None - postgres: Optional[PostgreSQLDatabaseConfiguration] = None + sqlite: Optional[SQLiteDatabaseConfiguration] = Field( + None, + title="SQLite configuration", + description="SQLite database configuration", + ) + + postgres: Optional[PostgreSQLDatabaseConfiguration] = Field( + None, + title="PostgreSQL configuration", + description="PostgreSQL database configuration", + ) @model_validator(mode="after") def check_database_configuration(self) -> Self: @@ -762,7 +771,9 @@ class Configuration(ConfigurationBase): service: ServiceConfiguration llama_stack: LlamaStackConfiguration user_data_collection: UserDataCollection - database: DatabaseConfiguration = Field(default_factory=DatabaseConfiguration) + database: DatabaseConfiguration = Field( + default_factory=lambda: DatabaseConfiguration(sqlite=None, postgres=None), + ) mcp_servers: list[ModelContextProtocolServer] = Field(default_factory=list) authentication: AuthenticationConfiguration = Field( default_factory=AuthenticationConfiguration From d9d69532b14bf5e44552b047d60cc12eb35837d9 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Thu, 27 Nov 2025 08:48:56 +0100 Subject: [PATCH 2/2] Updated generated documentation --- docs/config.html | 46 +++++++++++++++++++++++----------------------- docs/config.md | 46 +++++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/config.html b/docs/config.html index 13c66be88..3d9862f2b 100644 --- a/docs/config.html +++ b/docs/config.html @@ -173,7 +173,7 @@

Lightspeed Core Stack


-

📋 Configuration schema

+

📋 Components

AccessRule

Rule defining what actions a role can perform.

@@ -222,12 +222,12 @@

AuthenticationConfiguration

- + - + @@ -456,7 +456,7 @@

Configuration

- + @@ -512,7 +512,7 @@

Customization

- + @@ -522,12 +522,12 @@

Customization

- + - + @@ -551,12 +551,12 @@

DatabaseConfiguration

- + - +
k8s_cluster_apistring
k8s_ca_cert_pathstring
typestring
profile_pathstring
system_prompt_pathstring
system_promptstring
sqlite SQLite database configuration
postgres PostgreSQL database configuration
@@ -591,12 +591,12 @@

InferenceConfiguration

default_model - +string default_provider - +string @@ -705,22 +705,22 @@

LlamaStackConfiguration

url - +string api_key - +string use_as_library_client - +boolean library_client_config_path - +string @@ -811,7 +811,7 @@

ModelContextProtocolServer

namespace - +string Database namespace @@ -827,7 +827,7 @@

ModelContextProtocolServer

ca_cert_path - +string Path to CA certificate @@ -939,7 +939,7 @@

RHIdentityConfiguration

required_entitlements - +array @@ -1049,17 +1049,17 @@

TLSConfiguration

tls_certificate_path - +string SSL/TLS certificate file path for HTTPS support. tls_key_path - +string SSL/TLS private key file path for HTTPS support. tls_key_password - +string Path to file containing the password to decrypt the SSL/TLS private key. @@ -1083,7 +1083,7 @@

UserDataCollection

feedback_storage - +string @@ -1093,7 +1093,7 @@

UserDataCollection

transcripts_storage - +string diff --git a/docs/config.md b/docs/config.md index ab43bdb14..f83196ea3 100644 --- a/docs/config.md +++ b/docs/config.md @@ -3,7 +3,7 @@ --- -# 📋 Configuration schema +# 📋 Components @@ -37,8 +37,8 @@ Authentication configuration. |-------|------|-------------| | module | string | | | skip_tls_verification | boolean | | -| k8s_cluster_api | | | -| k8s_ca_cert_path | | | +| k8s_cluster_api | string | | +| k8s_ca_cert_path | string | | | jwk_config | | | | rh_identity_config | | | @@ -125,7 +125,7 @@ Conversation cache configuration. | Field | Type | Description | |-------|------|-------------| -| type | | | +| type | string | | | memory | | | | sqlite | | | | postgres | | | @@ -151,10 +151,10 @@ Service customization. | Field | Type | Description | |-------|------|-------------| -| profile_path | | | +| profile_path | string | | | disable_query_system_prompt | boolean | | -| system_prompt_path | | | -| system_prompt | | | +| system_prompt_path | string | | +| system_prompt | string | | | custom_profile | | | @@ -166,8 +166,8 @@ Database configuration. | Field | Type | Description | |-------|------|-------------| -| sqlite | | | -| postgres | | | +| sqlite | | SQLite database configuration | +| postgres | | PostgreSQL database configuration | ## InMemoryCacheConfig @@ -189,8 +189,8 @@ Inference configuration. | Field | Type | Description | |-------|------|-------------| -| default_model | | | -| default_provider | | | +| default_model | string | | +| default_provider | string | | ## JsonPathOperator @@ -249,10 +249,10 @@ Llama stack configuration. | Field | Type | Description | |-------|------|-------------| -| url | | | -| api_key | | | -| use_as_library_client | | | -| library_client_config_path | | | +| url | string | | +| api_key | string | | +| use_as_library_client | boolean | | +| library_client_config_path | string | | ## ModelContextProtocolServer @@ -291,10 +291,10 @@ Useful resources: | db | string | Database name to connect to | | user | string | Database user name used to authenticate | | password | string | Password used to authenticate | -| namespace | | Database namespace | +| namespace | string | Database namespace | | ssl_mode | string | SSL mode | | gss_encmode | string | This option determines whether or with what priority a secure GSS TCP/IP connection will be negotiated with the server. | -| ca_cert_path | | Path to CA certificate | +| ca_cert_path | string | Path to CA certificate | ## QuotaHandlersConfiguration @@ -346,7 +346,7 @@ Red Hat Identity authentication configuration. | Field | Type | Description | |-------|------|-------------| -| required_entitlements | | | +| required_entitlements | array | | ## SQLiteDatabaseConfiguration @@ -398,9 +398,9 @@ Useful resources: | Field | Type | Description | |-------|------|-------------| -| tls_certificate_path | | SSL/TLS certificate file path for HTTPS support. | -| tls_key_path | | SSL/TLS private key file path for HTTPS support. | -| tls_key_password | | Path to file containing the password to decrypt the SSL/TLS private key. | +| tls_certificate_path | string | SSL/TLS certificate file path for HTTPS support. | +| tls_key_path | string | SSL/TLS private key file path for HTTPS support. | +| tls_key_password | string | Path to file containing the password to decrypt the SSL/TLS private key. | ## UserDataCollection @@ -412,6 +412,6 @@ User data collection configuration. | Field | Type | Description | |-------|------|-------------| | feedback_enabled | boolean | | -| feedback_storage | | | +| feedback_storage | string | | | transcripts_enabled | boolean | | -| transcripts_storage | | | +| transcripts_storage | string | |