Skip to content

Commit 103c04f

Browse files
RHIDP-14076: add top-level vector store config (#2200)
* add vector store config classes and test Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add vector stores to synthesizer Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add vector stores to enricher Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * update documentation Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * fix vector store types / refs Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * RHIDP-14076: fix pylint locals and regenerate OpenAPI schema Split vector store provider enrichment to satisfy pylint, and refresh docs/devel_doc/openapi.json for the new config models. Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com> * address coderabbit review Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * use dedicated default field instead of boolean Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * address coderabbit review Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * regen openapi.json doc Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> --------- Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b6c0b73 commit 103c04f

12 files changed

Lines changed: 1654 additions & 19 deletions

docs/devel_doc/openapi.json

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12325,6 +12325,11 @@
1232512325
"title": "BYOK RAG configuration",
1232612326
"description": "BYOK RAG configuration. This configuration can be used to reconfigure Llama Stack through its run.yaml configuration file"
1232712327
},
12328+
"vector_store": {
12329+
"$ref": "#/components/schemas/VectorStoreConfiguration",
12330+
"title": "Vector store configuration",
12331+
"description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as byok_rag (static registered corpora). When providers is non-empty, default_provider is required and must match one of providers[].id. Applied in unified synthesis only."
12332+
},
1232812333
"a2a_state": {
1232912334
"$ref": "#/components/schemas/A2AStateConfiguration",
1233012335
"title": "A2A state configuration",
@@ -13239,6 +13244,67 @@
1323913244
"title": "DetailModel",
1324013245
"description": "Nested detail model for error responses."
1324113246
},
13247+
"FaissVectorStoreProvider": {
13248+
"properties": {
13249+
"id": {
13250+
"type": "string",
13251+
"minLength": 1,
13252+
"title": "Provider ID",
13253+
"description": "Llama Stack vector_io provider_id. Surrounding whitespace is stripped before validation and emission."
13254+
},
13255+
"embedding_model": {
13256+
"type": "string",
13257+
"minLength": 1,
13258+
"title": "Embedding model",
13259+
"description": "Embedding model identification used for stores created against this provider."
13260+
},
13261+
"embedding_dimension": {
13262+
"type": "integer",
13263+
"exclusiveMinimum": 0.0,
13264+
"title": "Embedding dimension",
13265+
"description": "Dimensionality of embedding vectors for this provider."
13266+
},
13267+
"type": {
13268+
"type": "string",
13269+
"const": "faiss",
13270+
"title": "Provider type",
13271+
"description": "Product type for this dynamic vector-store provider.",
13272+
"default": "faiss"
13273+
},
13274+
"config": {
13275+
"$ref": "#/components/schemas/FaissVectorStoreProviderConfig",
13276+
"title": "Storage config",
13277+
"description": "FAISS storage settings for this provider."
13278+
}
13279+
},
13280+
"additionalProperties": false,
13281+
"type": "object",
13282+
"required": [
13283+
"id",
13284+
"embedding_model",
13285+
"embedding_dimension",
13286+
"config"
13287+
],
13288+
"title": "FaissVectorStoreProvider",
13289+
"description": "Dynamic FAISS vector-store provider (runtime create capacity)."
13290+
},
13291+
"FaissVectorStoreProviderConfig": {
13292+
"properties": {
13293+
"path": {
13294+
"type": "string",
13295+
"minLength": 1,
13296+
"title": "DB path",
13297+
"description": "On-disk FAISS/SQLite path for this provider."
13298+
}
13299+
},
13300+
"additionalProperties": false,
13301+
"type": "object",
13302+
"required": [
13303+
"path"
13304+
],
13305+
"title": "FaissVectorStoreProviderConfig",
13306+
"description": "Storage config for a FAISS dynamic vector-store provider."
13307+
},
1324213308
"FeedbackCategory": {
1324313309
"type": "string",
1324413310
"enum": [
@@ -16688,6 +16754,120 @@
1668816754
"title": "PasswordOAuthFlow",
1668916755
"description": "Defines configuration details for the OAuth 2.0 Resource Owner Password flow."
1669016756
},
16757+
"PgvectorVectorStoreProvider": {
16758+
"properties": {
16759+
"id": {
16760+
"type": "string",
16761+
"minLength": 1,
16762+
"title": "Provider ID",
16763+
"description": "Llama Stack vector_io provider_id. Surrounding whitespace is stripped before validation and emission."
16764+
},
16765+
"embedding_model": {
16766+
"type": "string",
16767+
"minLength": 1,
16768+
"title": "Embedding model",
16769+
"description": "Embedding model identification used for stores created against this provider."
16770+
},
16771+
"embedding_dimension": {
16772+
"type": "integer",
16773+
"exclusiveMinimum": 0.0,
16774+
"title": "Embedding dimension",
16775+
"description": "Dimensionality of embedding vectors for this provider."
16776+
},
16777+
"type": {
16778+
"type": "string",
16779+
"const": "pgvector",
16780+
"title": "Provider type",
16781+
"description": "Product type for this dynamic vector-store provider.",
16782+
"default": "pgvector"
16783+
},
16784+
"config": {
16785+
"$ref": "#/components/schemas/PgvectorVectorStoreProviderConfig",
16786+
"title": "Storage config",
16787+
"description": "pgvector connection settings for this provider."
16788+
}
16789+
},
16790+
"additionalProperties": false,
16791+
"type": "object",
16792+
"required": [
16793+
"id",
16794+
"embedding_model",
16795+
"embedding_dimension",
16796+
"config"
16797+
],
16798+
"title": "PgvectorVectorStoreProvider",
16799+
"description": "Dynamic pgvector vector-store provider (runtime create capacity)."
16800+
},
16801+
"PgvectorVectorStoreProviderConfig": {
16802+
"properties": {
16803+
"host": {
16804+
"anyOf": [
16805+
{
16806+
"type": "string"
16807+
},
16808+
{
16809+
"type": "null"
16810+
}
16811+
],
16812+
"title": "PostgreSQL host",
16813+
"description": "PostgreSQL host. Defaults to ${env.POSTGRES_HOST}."
16814+
},
16815+
"port": {
16816+
"anyOf": [
16817+
{
16818+
"type": "string"
16819+
},
16820+
{
16821+
"type": "null"
16822+
}
16823+
],
16824+
"title": "PostgreSQL port",
16825+
"description": "PostgreSQL port. Defaults to ${env.POSTGRES_PORT}."
16826+
},
16827+
"db": {
16828+
"anyOf": [
16829+
{
16830+
"type": "string"
16831+
},
16832+
{
16833+
"type": "null"
16834+
}
16835+
],
16836+
"title": "PostgreSQL database",
16837+
"description": "PostgreSQL database name. Defaults to ${env.POSTGRES_DATABASE}."
16838+
},
16839+
"user": {
16840+
"anyOf": [
16841+
{
16842+
"type": "string"
16843+
},
16844+
{
16845+
"type": "null"
16846+
}
16847+
],
16848+
"title": "PostgreSQL user",
16849+
"description": "PostgreSQL user. Defaults to ${env.POSTGRES_USER}."
16850+
},
16851+
"password": {
16852+
"anyOf": [
16853+
{
16854+
"type": "string",
16855+
"format": "password",
16856+
"writeOnly": true
16857+
},
16858+
{
16859+
"type": "null"
16860+
}
16861+
],
16862+
"title": "PostgreSQL password",
16863+
"description": "PostgreSQL password. Defaults to ${env.POSTGRES_PASSWORD}."
16864+
}
16865+
},
16866+
"additionalProperties": false,
16867+
"type": "object",
16868+
"title": "PgvectorVectorStoreProviderConfig",
16869+
"description": "Storage config for a pgvector dynamic vector-store provider."
16870+
},
1669116871
"PostgreSQLDatabaseConfiguration": {
1669216872
"properties": {
1669316873
"host": {
@@ -20580,6 +20760,48 @@
2058020760
],
2058120761
"title": "ValidationError"
2058220762
},
20763+
"VectorStoreConfiguration": {
20764+
"properties": {
20765+
"default_provider": {
20766+
"anyOf": [
20767+
{
20768+
"type": "string"
20769+
},
20770+
{
20771+
"type": "null"
20772+
}
20773+
],
20774+
"title": "Default provider",
20775+
"description": "Provider id used for vector_stores.default_* in the synthesized Llama Stack config. Required when providers is non-empty; must match one of providers[].id."
20776+
},
20777+
"providers": {
20778+
"items": {
20779+
"oneOf": [
20780+
{
20781+
"$ref": "#/components/schemas/FaissVectorStoreProvider"
20782+
},
20783+
{
20784+
"$ref": "#/components/schemas/PgvectorVectorStoreProvider"
20785+
}
20786+
],
20787+
"discriminator": {
20788+
"propertyName": "type",
20789+
"mapping": {
20790+
"faiss": "#/components/schemas/FaissVectorStoreProvider",
20791+
"pgvector": "#/components/schemas/PgvectorVectorStoreProvider"
20792+
}
20793+
}
20794+
},
20795+
"type": "array",
20796+
"title": "Vector store providers",
20797+
"description": "Dynamic vector-store provider capacity for runtime POST /v1/vector-stores creates. Not the same as byok_rag (static registered corpora)."
20798+
}
20799+
},
20800+
"additionalProperties": false,
20801+
"type": "object",
20802+
"title": "VectorStoreConfiguration",
20803+
"description": "Configuration for dynamic vector-store providers.\n\nMirrors ``InferenceConfiguration``: a providers list plus a sibling\n``default_provider`` pointer, rather than a per-entry default flag.\n\nAttributes:\n default_provider: Provider id used for vector_stores.default_* in the\n synthesized Llama Stack config. Required when providers is\n non-empty; must match one of providers[].id. Must be omitted when\n providers is empty.\n providers: Dynamic vector-store provider capacity for runtime\n POST /v1/vector-stores creates. Not the same as byok_rag (static\n registered corpora)."
20804+
},
2058320805
"VectorStoreCreateRequest": {
2058420806
"properties": {
2058520807
"name": {

docs/user_doc/byok_guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ The BYOK (Bring Your Own Knowledge) feature in Lightspeed Core provides powerful
416416

417417
For additional support and advanced configurations, refer to:
418418
- [RAG Configuration Guide](rag_guide.md)
419+
- [Dynamic vector store providers](rag_guide.md#configure-dynamic-vector-store-providers) (runtime creates)
420+
- [Configuration schema](config.md)
419421
- [rag-content Tool Repository](https://github.com/lightspeed-core/rag-content)
420422

421423
Remember to regularly update your knowledge sources and monitor system performance to maintain optimal BYOK functionality.

0 commit comments

Comments
 (0)