Customisable OpenAI endpoint for embeddings#345
Conversation
…eddings Expose a configurable embeddings endpoint for semantic search
|
|
There was a problem hiding this comment.
Pull request overview
This PR adds a user-facing setting to customize the embeddings (semantic search) base URL from the Desktop app’s project Search settings, and updates related copy to refer to a generic “embeddings provider” rather than OpenAI specifically.
Changes:
- Added an “Embeddings API endpoint” field in Settings → This project → Search that writes
search.semantic.baseUrl. - Updated UI and CLI copy to describe the stored key as an embeddings-provider key (not only OpenAI).
- Added DOM tests and updated i18n catalogs, plus a changeset for the behavior change.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/app/src/components/settings/SearchSection.tsx | Adds UI + patch logic for configuring the embeddings base URL. |
| packages/app/src/components/settings/SearchSection.dom.test.tsx | Adds DOM tests covering default endpoint, trimming on blur, and clearing behavior. |
| packages/app/src/components/settings/EmbeddingsKeySection.tsx | Updates account/settings copy to refer to “embeddings provider API key” and mentions endpoint override. |
| packages/cli/src/commands/embeddings/index.ts | Updates CLI prompts/output strings to refer to “embeddings provider API key”. |
| packages/app/src/locales/en/messages.po | Adds new English strings for endpoint UI and updated key description. |
| packages/app/src/locales/en/messages.json | Updates compiled English message catalog entries. |
| packages/app/src/locales/pseudo/messages.po | Adds pseudo-locale entries for new endpoint UI and updated key description. |
| packages/app/src/locales/pseudo/messages.json | Updates compiled pseudo-locale message catalog entries. |
| .changeset/custom-embeddings-endpoint.md | Adds release note entry for the new configurable endpoint and copy updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function normalizeBaseUrl(next: string): string { | ||
| return next.trim() || DEFAULT_EMBEDDINGS_BASE_URL; | ||
| } | ||
|
|
||
| function writeBaseUrl(next: string): boolean { |
|
Thanks @wan0net , the team will take a look at this asap. Bare with us while we iron out the kinks with the PR process. |
What & why
Expose the semantic-search embeddings base URL in Settings → This project → Search so users can point embeddings at a custom OpenAI-compatible endpoint without editing config files by hand. Also update related account and CLI copy so the stored key is described as belonging to the configured embeddings provider instead of only OpenAI.
How this was verified
bun run --cwd packages/app test:dom src/components/settings/SearchSection.dom.test.tsx src/components/settings/EmbeddingsKeySection.dom.test.tsx
bun run lint
bun run typecheck
bun run --cwd packages/app build
bun run check was run before and after the change
Pre-change: failed in @inkeep/open-knowledge-docs#build because the docs build could not fetch Google Fonts in this environment
Post-change: still fails for unrelated repo issues in this environment (@inkeep/open-knowledge-docs#build exits during next build, and @inkeep/open-knowledge-desktop#test fails tests/integration/ipc-channel-count-ratchet.test.ts on the existing scale-match marker assertion)
parallel_validation passed with no review comments and no CodeQL alerts
Checklist