Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-lightspeed-backend': patch
---

Removed hardcoded vector_store_ids override to enable BYOK RAG sources
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

@maysunfaisal maysunfaisal Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Claude,

The test fixture at fixtures/lcsHandlers.ts:281-282 mocks the vector stores endpoint returning rhdh-product-docs. Since the PR removes the code that calls that endpoint to look up the vector store
ID, this mock handler will just go unused — it won't break any tests, but it's now dead fixture code.

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];
}

Comment on lines -604 to -616

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maysunfaisal @rajin-kichannagari Do we still need to get the vector store ID from the vector stores this way if the platform engineer does not use BYOK? If so, we might want to add some additional logic here to determine if this is a BYOK situation or not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure we still need this explicit vector_store setup or otherwise Developer LIghtspeed tool will also query from Notebooks vector_store.

@maysunfaisal maysunfaisal Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JslYoon is that why it was introduced in the first place? We also need to remove this hardcoded vector store dependency because OKP also cannot function if we are calling LCORE with hardcoded vector store names 🤔

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
Expand Down
Loading