Bug Description / 问题描述
vectorSearchService.ts reads the embedding provider API key exclusively from the .env file (environment variable). It does not read the API key configured through the Dashboard UI. As a result, users who configure the embedding provider via the Dashboard — including the API key — will find that embeddings fail to be generated because the service never picks up the key they entered.
Steps to Reproduce / 复现步骤
- Set any invalid embedding provider API key variable in
.env.
- Open the MCPHub Dashboard and configure an embedding provider (e.g., OpenAI), entering a valid API key in the
Provider API Key field.
- Save the configuration.
- Install an MCP server and wait for tool embeddings to be generated.
- Observe in the logs that the API call fails with an authentication error, despite the API key having been entered in the Dashboard.
Expected Behavior / 预期行为
vectorSearchService.ts should read the API key from the Dashboard settings (i.e., from the persisted system configuration) and use it when making embedding API calls. The Dashboard-configured value should take precedence over any environment variable, or at minimum be used as a fallback when the environment variable is not set.
Environment / 运行环境
- Running on / 运行方式: All (docker / npx / local)
- Version / 版本: Current
Screenshots / 截图
N/A
Additional Info / 补充信息
This bug effectively breaks the embedding configuration flow for users who rely entirely on the Dashboard to manage settings (the intended experience). The workaround is to set the API key via .env, but this is not documented prominently and defeats the purpose of the Dashboard UI. The fix should ensure that any configuration value editable in the Dashboard is also honoured at runtime by the services that consume it.
The #600 issue is somehow related to this.
Bug Description / 问题描述
vectorSearchService.tsreads the embedding provider API key exclusively from the.envfile (environment variable). It does not read the API key configured through the Dashboard UI. As a result, users who configure the embedding provider via the Dashboard — including the API key — will find that embeddings fail to be generated because the service never picks up the key they entered.Steps to Reproduce / 复现步骤
.env.Provider API Keyfield.Expected Behavior / 预期行为
vectorSearchService.tsshould read the API key from the Dashboard settings (i.e., from the persisted system configuration) and use it when making embedding API calls. The Dashboard-configured value should take precedence over any environment variable, or at minimum be used as a fallback when the environment variable is not set.Environment / 运行环境
Screenshots / 截图
N/A
Additional Info / 补充信息
This bug effectively breaks the embedding configuration flow for users who rely entirely on the Dashboard to manage settings (the intended experience). The workaround is to set the API key via
.env, but this is not documented prominently and defeats the purpose of the Dashboard UI. The fix should ensure that any configuration value editable in the Dashboard is also honoured at runtime by the services that consume it.The #600 issue is somehow related to this.