Skip to content

Customisable OpenAI endpoint for embeddings#345

Open
wan0net wants to merge 6 commits into
inkeep:mainfrom
wan0net:main
Open

Customisable OpenAI endpoint for embeddings#345
wan0net wants to merge 6 commits into
inkeep:mainfrom
wan0net:main

Conversation

@wan0net

@wan0net wan0net commented Jun 27, 2026

Copy link
Copy Markdown

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

  • Ran bun run check (lint, typecheck, tests) locally
  • Added a changeset (bun run changeset) if this changes behavior
  • Updated docs if this changes a user-facing surface
  • I have read CONTRIBUTING.md and agree to license my contribution under the project's terms (CLA)

Copilot AI review requested due to automatic review settings June 27, 2026 08:58
@CLAassistant

CLAassistant commented Jun 27, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ wan0net
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +68 to +72
function normalizeBaseUrl(next: string): string {
return next.trim() || DEFAULT_EMBEDDINGS_BASE_URL;
}

function writeBaseUrl(next: string): boolean {
@nick-inkeep

nick-inkeep commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Thanks @wan0net , the team will take a look at this asap. Bare with us while we iron out the kinks with the PR process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants