diff --git a/workspaces/lightspeed/.changeset/fix-byok-vector-store-ids.md b/workspaces/lightspeed/.changeset/fix-byok-vector-store-ids.md new file mode 100644 index 0000000000..21e14b84e9 --- /dev/null +++ b/workspaces/lightspeed/.changeset/fix-byok-vector-store-ids.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-lightspeed-backend': patch +--- + +Removed hardcoded vector_store_ids override to enable BYOK RAG sources diff --git a/workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts b/workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts index cfed3b1112..d3f2d29066 100644 --- a/workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts +++ b/workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts @@ -134,8 +134,6 @@ export async function createRouter( lightspeedCoreBaseUrl, logger, ); - let lightspeed_vector_store_id: string = ''; - // Parse admin-configured MCP servers from app-config. // Only name is required; token is optional (users can provide their own via the UI). // URLs come from LCS (GET /v1/mcp-servers), not from app-config. @@ -601,19 +599,6 @@ export async function createRouter( logger.info(`/v1/query receives call from user: ${userEntityRef}`); - // get the vector store id for the rhdh-product-docs vector store - if (lightspeed_vector_store_id === '') { - const vectorStores = await vectorStoresOperator.vectorStores.list(); - lightspeed_vector_store_id = - vectorStores.data.find((v: any) => - v.name.startsWith('rhdh-product-docs'), - )?.id || ''; - } - - if (lightspeed_vector_store_id !== '') { - request.body.vector_store_ids = [lightspeed_vector_store_id]; - } - const userQueryParam = `user_id=${encodeURIComponent(userEntityRef)}`; request.body.media_type = 'application/json'; // set media_type to receive start and end event // if system_prompt is defined in lightspeed config