Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(settings): expose custom embeddings endpoint in Search settings (#2581)

mike-inkeep41fc8d91c4fe
diff --git a/.changeset/custom-embeddings-endpoint.md b/.changeset/custom-embeddings-endpoint.md
new file mode 100644
index 000000000..2ae779d70
--- /dev/null
+++ b/.changeset/custom-embeddings-endpoint.md
@@ -0,0 +1,5 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Configure a custom OpenAI-compatible embeddings endpoint from Settings → This project → Search instead of editing config files by hand. The semantic-search settings now expose the embeddings base URL directly, and the account copy plus `ok embeddings set-key` messaging now describe the key as belonging to the configured embeddings provider rather than only to OpenAI.
diff --git a/packages/app/src/components/settings/EmbeddingsKeySection.tsx b/packages/app/src/components/settings/EmbeddingsKeySection.tsx
index 350159213..5c382a019 100644
--- a/packages/app/src/components/settings/EmbeddingsKeySection.tsx
+++ b/packages/app/src/components/settings/EmbeddingsKeySection.tsx
@@ -69,13 +69,13 @@ export function EmbeddingsKeySection({ transport }: { transport?: EmbeddingsKeyT
</h3>
<p className="text-sm text-muted-foreground">
<Trans>
- Your OpenAI API key, used only to create embeddings of your content for semantic search.
- Stored once for this machine in{' '}
+ Your embeddings provider API key, used only to create embeddings of your content for
+ semantic search. Stored once for this machine in{' '}
<code className="rounded bg-muted px-1 py-0.5 font-mono text-xs">
~/.ok/secrets.yml
</code>{' '}
(readable only by your user account) and shared across all projects. Turn the feature on
- per project in This project → Search.
+ per project in This project → Search, where you can also override the endpoint.
</Trans>
</p>
</div>
diff --git a/packages/app/src/components/settings/SearchSection.dom.test.tsx b/packages/app/src/components/settings/SearchSection.dom.test.tsx
index ccdacb15b..06e2b60bd 100644
--- a/packages/app/src/components/settings/SearchSection.dom.test.tsx
+++ b/packages/app/src/components/settings/SearchSection.dom.test.tsx
@@ -8,7 +8,12 @@
*/
import { afterEach, beforeEach, describe, expect, mock, test } from 'bun:test';
-import type { Config, ConfigBinding, SemanticIndexStatus } from '@inkeep/open-knowledge-core';
+import {
+ type Config,
+ type ConfigBinding,
+ DEFAULT_EMBEDDINGS_BASE_URL,
+ type SemanticIndexStatus,
+} from '@inkeep/open-knowledge-core';
import { cleanup, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -56,8 +61,10 @@ mock.module('@/lib/config-provider', () => ({
const { SearchSection } = await import('./SearchSection');
-function configWithSemanticEnabled(enabled: boolean): Config {
- return { search: { semantic: { enabled } } } as unknown as Config;
+function configWithSemantic({ enabled, baseUrl }: { enabled: boolean; baseUrl?: string }): Config {
+ return {
+ search: { semantic: { enabled, ...(baseUrl ? { baseUrl } : {}) } },
+ } as unknown as Config;
}
// Records every patch payload so tests can assert the exact CRDT write.
@@ -100,7 +107,7 @@ describe('SearchSection', () => {
test('off: switch is unchecked, body says no content leaves, no coverage panel', () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(false);
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
render(<SearchSection />);
@@ -128,7 +135,7 @@ describe('SearchSection', () => {
const user = userEvent.setup();
const { binding, calls } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(false);
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
render(<SearchSection />);
@@ -147,7 +154,7 @@ describe('SearchSection', () => {
const user = userEvent.setup();
const { binding, calls } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
mockStatus = {
enabled: true,
keyPresent: true,
@@ -169,7 +176,7 @@ describe('SearchSection', () => {
test('on + keyed + warmed + capable: shows read-only coverage', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
mockStatus = {
enabled: true,
keyPresent: true,
@@ -189,7 +196,7 @@ describe('SearchSection', () => {
test('on + capable but nothing embedded yet: shows the lazy-warm hint', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
mockStatus = {
enabled: true,
keyPresent: true,
@@ -209,7 +216,7 @@ describe('SearchSection', () => {
test('on + NO key: shows the needs-a-key hint pointing at Account (instant, no warm)', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
// No key, and crucially NOT warmed (ready:false) — the hint must still show
// immediately off `keyPresent`, not wait for a warm.
mockStatus = {
@@ -234,7 +241,7 @@ describe('SearchSection', () => {
test('on + key present but provider rejected it: shows the provider-error hint', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
mockStatus = {
enabled: true,
keyPresent: true,
@@ -255,7 +262,7 @@ describe('SearchSection', () => {
test('on + keyed but not warmed: shows the pending state', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
mockStatus = {
enabled: true,
keyPresent: true,
@@ -277,7 +284,7 @@ describe('SearchSection', () => {
test('on but server not yet settled: shows the applying state', async () => {
const { binding } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(true);
+ mockProjectLocalConfig = configWithSemantic({ enabled: true });
// Server hasn't picked up the toggle yet (enabled:false at the server).
mockStatus = {
enabled: false,
@@ -302,7 +309,7 @@ describe('SearchSection', () => {
const user = userEvent.setup();
const { binding, calls } = makeBinding();
mockProjectLocalBinding = binding;
- mockProjectLocalConfig = configWithSemanticEnabled(false);
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
render(<SearchSection />);
@@ -324,7 +331,7 @@ describe('SearchSection', () => {
patch: () => ({ ok: false, error: { code: 'noop', message: 'fail' } }),
} as unknown as ConfigBinding;
mockProjectLocalBinding = failBinding;
- mockProjectLocalConfig = configWithSemanticEnabled(false);
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
render(<SearchSection />);
@@ -334,4 +341,69 @@ describe('SearchSection', () => {
// Still open (success-gated close did not fire on the failed write).
expect(await screen.findByTestId('settings-search-confirm')).toBeDefined();
});
+
+ test('shows the default endpoint when no custom provider is configured', () => {
+ const { binding } = makeBinding();
+ mockProjectLocalBinding = binding;
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
+
+ render(<SearchSection />);
+
+ expect((screen.getByTestId('settings-search-base-url') as HTMLInputElement).value).toBe(
+ DEFAULT_EMBEDDINGS_BASE_URL,
+ );
+ });
+
+ test('blurring the endpoint field writes the trimmed custom base URL', async () => {
+ const user = userEvent.setup();
+ const { binding, calls } = makeBinding();
+ mockProjectLocalBinding = binding;
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
+
+ render(<SearchSection />);
+
+ const input = screen.getByTestId('settings-search-base-url');
+ await user.clear(input);
+ await user.type(input, ' https://azure.example.com/openai/v1/ ');
+ await user.tab();
+
+ expect(calls).toEqual([
+ { search: { semantic: { baseUrl: 'https://azure.example.com/openai/v1/' } } },
+ ]);
+ });
+
+ test('pressing Enter in the endpoint field writes the trimmed custom base URL', async () => {
+ const user = userEvent.setup();
+ const { binding, calls } = makeBinding();
+ mockProjectLocalBinding = binding;
+ mockProjectLocalConfig = configWithSemantic({ enabled: false });
+
+ render(<SearchSection />);
+
+ const input = screen.getByTestId('settings-search-base-url');
+ await user.clear(input);
+ await user.type(input, ' https://azure.example.com/openai/v1/ {Enter}');
+
+ expect(calls).toEqual([
+ { search: { semantic: { baseUrl: 'https://azure.example.com/openai/v1/' } } },
+ ]);
+ });
+
+ test('clearing the endpoint field resets it to the default OpenAI endpoint', async () => {
+ const user = userEvent.setup();
+ const { binding, calls } = makeBinding();
+ mockProjectLocalBinding = binding;
+ mockProjectLocalConfig = configWithSemantic({
+ enabled: false,
+ baseUrl: 'https://azure.example.com/openai/v1',
+ });
+
+ render(<SearchSection />);
+
+ const input = screen.getByTestId('settings-search-base-url');
+ await user.clear(input);
+ await user.tab();
+
+ expect(calls).toEqual([{ search: { semantic: { baseUrl: DEFAULT_EMBEDDINGS_BASE_URL } } }]);
+ });
});
diff --git a/packages/app/src/components/settings/SearchSection.tsx b/packages/app/src/components/settings/SearchSection.tsx
index f6c4b12e7..1ccf49abb 100644
--- a/packages/app/src/components/settings/SearchSection.tsx
+++ b/packages/app/src/components/settings/SearchSection.tsx
@@ -18,7 +18,7 @@
* Account (stored in `~/.ok/secrets.yml`); this section only points there when a
* key is missing.
*/
-import { humanFormat } from '@inkeep/open-knowledge-core';
+import { DEFAULT_EMBEDDINGS_BASE_URL, humanFormat } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
@@ -33,6 +33,7 @@ import {
Dialog as DialogRoot,
DialogTitle,
} from '@/components/ui/dialog';
+import { Input } from '@/components/ui/input';
import { Switch } from '@/components/ui/switch';
import { useSemanticSearchStatus } from '@/hooks/use-semantic-search-status';
import { useConfigContext } from '@/lib/config-provider';
@@ -57,6 +58,9 @@ export function SearchSection() {
[],
);
+ const configuredBaseUrl =
+ projectLocalConfig?.search?.semantic?.baseUrl ?? DEFAULT_EMBEDDINGS_BASE_URL;
+
const enabled = projectLocalConfig?.search?.semantic?.enabled ?? false;
const bindingReady = projectLocalSynced && projectLocalBinding !== null;
@@ -85,6 +89,28 @@ export function SearchSection() {
return true;
}
+ function normalizeBaseUrl(next: string): string {
+ return next.trim() || DEFAULT_EMBEDDINGS_BASE_URL;
+ }
+
+ function writeBaseUrl(next: string): boolean {
+ if (projectLocalBinding === null) {
+ toast.error(t`Search settings not yet loaded — try again in a moment`);
+ return false;
+ }
+ const normalized = normalizeBaseUrl(next);
+ if (normalized === configuredBaseUrl) return true;
+ const result = projectLocalBinding.patch({ search: { semantic: { baseUrl: normalized } } });
+ if (!result.ok) {
+ const detail = humanFormat(result.error);
+ toast.error(t`Failed to update the embeddings endpoint — ${detail}`);
+ return false;
+ }
+ refresh();
+ scheduleSettleRefresh();
+ return true;
+ }
+
function onToggleRequest(next: boolean) {
if (next) {
// Off → on: gate behind the egress confirmation. On → off is the safe
@@ -100,6 +126,11 @@ export function SearchSection() {
if (write(true)) setConfirmOpen(false);
}
+ function commitBaseUrlInput(input: HTMLInputElement): void {
+ const normalized = normalizeBaseUrl(input.value);
+ if (writeBaseUrl(input.value)) input.value = normalized;
+ }
+
// Status derives from the server's resolved view, not the client preference:
// `serverEnabled` lags the toggle until the file-watcher settles. `keyPresent`
// is a free, prompt-free read (secrets file / env) so "no key" shows the
@@ -171,6 +202,41 @@ export function SearchSection() {
) : null}
</div>
+ <div className="space-y-2 rounded-md border p-3">
+ <div className="space-y-1">
+ <label htmlFor="settings-search-base-url" className="text-sm font-medium">
+ <Trans>Embeddings API endpoint</Trans>
+ </label>
+ <p className="text-muted-foreground text-1sm">
+ <Trans>
+ Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for
+ Azure or a self-hosted provider.
+ </Trans>
+ </p>
+ </div>
+ <Input
+ key={configuredBaseUrl}
+ id="settings-search-base-url"
+ defaultValue={configuredBaseUrl}
+ onBlur={(e) => commitBaseUrlInput(e.currentTarget)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ commitBaseUrlInput(e.currentTarget);
+ }
+ }}
+ placeholder={DEFAULT_EMBEDDINGS_BASE_URL}
+ disabled={!bindingReady}
+ spellCheck={false}
+ autoComplete="off"
+ data-testid="settings-search-base-url"
+ className="h-8 font-mono text-sm"
+ />
+ <p className="text-muted-foreground text-1sm" data-testid="settings-search-base-url-help">
+ <Trans>Clear the field to reset back to the default OpenAI endpoint.</Trans>
+ </p>
+ </div>
+
<EnableSemanticSearchConfirmDialog
open={confirmOpen}
onOpenChange={setConfirmOpen}
@@ -249,7 +315,8 @@ function SemanticStatusPanel({
<Trans>
A key is set, but the embeddings provider rejected it or was unreachable — search fell
back to keyword matching. Check the key in{' '}
- <span className="font-medium">Settings → Account</span> and your provider settings.
+ <span className="font-medium">Settings → Account</span> and the embeddings endpoint
+ setting.
</Trans>
</div>
);
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index e19aa5a6b..534a0b214 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -362,9 +362,6 @@
["fileName"],
") in the project root"
],
- "8BsGpU": [
- "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."
- ],
"8F1i42": ["Page not found"],
"8FqTCr": [
[
@@ -665,9 +662,6 @@
"FEr96N": ["Theme"],
"FNTx6u": ["Search \"", ["semanticSubmitQuery"], "\" by meaning"],
"FOGD7m": ["Create something great."],
- "FOyCTr": [
- "Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."
- ],
"FRYB1Q": ["/api/config returned a malformed body"],
"FRqZ9v": ["Couldn't update skill: ", ["0"]],
"FTUGgh": ["Enter a repository URL or owner/repo"],
@@ -866,6 +860,7 @@
"KujtjC": ["Find"],
"L-rMC9": ["Reset to default"],
"L1ZE3M": ["Document statistics"],
+ "L1rRuU": ["Embeddings API endpoint"],
"L3CEC1": ["this item"],
"L4Cdd9": ["or create a new file <0/>"],
"L6Hhh6": ["(root)"],
@@ -1631,6 +1626,7 @@
"eGUbmF": ["Copy selected file or folder"],
"eJitUk": ["Upload from computer"],
"eKThTQ": ["Failed to reorder"],
+ "eLl1VX": ["Failed to update the embeddings endpoint — ", ["detail"]],
"eNQGRb": ["Inline LaTeX math rendered with KaTeX."],
"ePK91l": ["Edit"],
"eQkgKV": ["Installed"],
@@ -1911,6 +1907,7 @@
"lAiyU_": ["Only the current document uses <0>#", ["tag"], "</0>."],
"lCC_D5": ["Subscribing..."],
"lGs_bQ": ["Page <0>*</0>"],
+ "lHCR4I": ["Clear the field to reset back to the default OpenAI endpoint."],
"lHwYMr": ["Server error: ", ["status"], " ", ["statusText"]],
"lI0Td2": ["Use letters, digits, <0>_</0> and <1>-</1> only."],
"lIn9L9": ["Disable sync"],
@@ -2062,6 +2059,9 @@
"Toggle the bottom terminal panel. With text selected, stage it in the terminal's AI input instead."
],
"oCZkaG": ["Copy path"],
+ "oEgEn_": [
+ "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."
+ ],
"oJl7eO": ["Unknown component: ", ["componentName"], " — source editable below"],
"oKBnk5": ["More requests were blocked."],
"oQA-cA": ["Full path"],
@@ -2108,6 +2108,9 @@
"pha01Y": ["Project-level pages with no incoming graph edges."],
"pkAft1": ["Search failed."],
"pmKdif": ["Failed: ", ["loadError"]],
+ "pmOGtg": [
+ "Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."
+ ],
"pmUArF": ["Workspace"],
"ppDgFi": ["Restart with this app's version"],
"psfGPX": ["MCP connections"],
@@ -2353,6 +2356,9 @@
"w_Sphq": ["Attachments"],
"wbv9xO": ["Create new project"],
"wbwHYD": ["Enable sync"],
+ "wccmX0": [
+ "Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."
+ ],
"wdxz7K": ["Source"],
"weP6me": ["Couldn't load docs — type @ again to retry"],
"wlwXUk": [
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 8345733c4..b7a5dfc63 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -509,8 +509,8 @@ msgid "A folder named <0>{sanitized}</0> already has files here. Pick a differen
msgstr "A folder named <0>{sanitized}</0> already has files here. Pick a different name."
#: src/components/settings/SearchSection.tsx
-msgid "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."
-msgstr "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."
+msgid "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."
+msgstr "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."
#: src/components/SeedDialog.tsx
msgid "A knowledge base that follows Google's Open Knowledge Format, a shared way of organizing what you know. Pick this if you want your notes to work well with other tools that understand the format."
@@ -1291,6 +1291,10 @@ msgstr "Clear"
msgid "Clear {keyName}"
msgstr "Clear {keyName}"
+#: src/components/settings/SearchSection.tsx
+msgid "Clear the field to reset back to the default OpenAI endpoint."
+msgstr "Clear the field to reset back to the default OpenAI endpoint."
+
#: src/components/FolderTimelineCard.tsx
msgid "cleared folder properties"
msgstr "cleared folder properties"
@@ -2706,6 +2710,10 @@ msgstr "Embed an external page in an inline iframe (docs, demos, Figma, CodeSand
msgid "Embed an image with optional alt text."
msgstr "Embed an image with optional alt text."
+#: src/components/settings/SearchSection.tsx
+msgid "Embeddings API endpoint"
+msgstr "Embeddings API endpoint"
+
#: src/components/settings/SearchSection.tsx
msgid "Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."
msgstr "Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."
@@ -3073,6 +3081,10 @@ msgstr "Failed to update property"
msgid "Failed to update the auto-approve setting — {detail}"
msgstr "Failed to update the auto-approve setting — {detail}"
+#: src/components/settings/SearchSection.tsx
+msgid "Failed to update the embeddings endpoint — {detail}"
+msgstr "Failed to update the embeddings endpoint — {detail}"
+
#: src/components/settings/SettingsDialogBody.tsx
msgid "Failed to update the project sync default — {detail}"
msgstr "Failed to update the project sync default — {detail}"
@@ -7650,6 +7662,10 @@ msgstr "Use lowercase letters, digits, and <0>-</0> only."
msgid "Use lowercase letters, digits, and hyphens only."
msgstr "Use lowercase letters, digits, and hyphens only."
+#: src/components/settings/SearchSection.tsx
+msgid "Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."
+msgstr "Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."
+
#: src/components/settings/SettingsDialogShell.tsx
msgid "User"
msgstr "User"
@@ -7953,6 +7969,10 @@ msgstr "You're subscribed!"
msgid "Your copy of branch <0>{shareBranch}</0> has changes that aren't on GitHub. The {targetNoun} will appear once the branch syncs."
msgstr "Your copy of branch <0>{shareBranch}</0> has changes that aren't on GitHub. The {targetNoun} will appear once the branch syncs."
+#: src/components/settings/EmbeddingsKeySection.tsx
+msgid "Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."
+msgstr "Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."
+
#: src/components/settings/SettingsDialogBody.tsx
#: src/components/SyncStatusBadge.tsx
msgid "Your GitHub session expired — sign in again to verify push access."
@@ -7974,10 +7994,6 @@ msgstr "Your local copy is behind. Pull the latest changes, then open the link a
msgid "Your local copy of branch <0>{branch}</0> is behind. Pull the latest changes, then open the link again."
msgstr "Your local copy of branch <0>{branch}</0> is behind. Pull the latest changes, then open the link again."
-#: src/components/settings/EmbeddingsKeySection.tsx
-msgid "Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."
-msgstr "Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."
-
#: src/components/CloneDialog.tsx
msgid "Your repositories"
msgstr "Your repositories"
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index b684027b8..8ec8e9933 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -362,9 +362,6 @@
["fileName"],
") ĩń ţĥē ƥŕōĴēćţ ŕōōţ"
],
- "8BsGpU": [
- "À ķēŷ ĩś śēţ, ƀũţ ţĥē ēḿƀēďďĩńĝś ƥŕōvĩďēŕ ŕēĴēćţēď ĩţ ōŕ ŵàś ũńŕēàćĥàƀĺē — śēàŕćĥ ƒēĺĺ ƀàćķ ţō ķēŷŵōŕď ḿàţćĥĩńĝ. Ćĥēćķ ţĥē ķēŷ ĩń <0>Śēţţĩńĝś → Àććōũńţ</0> àńď ŷōũŕ ƥŕōvĩďēŕ śēţţĩńĝś."
- ],
"8F1i42": ["Ƥàĝē ńōţ ƒōũńď"],
"8FqTCr": [
[
@@ -665,9 +662,6 @@
"FEr96N": ["Ţĥēḿē"],
"FNTx6u": ["Śēàŕćĥ \"", ["semanticSubmitQuery"], "\" ƀŷ ḿēàńĩńĝ"],
"FOGD7m": ["Ćŕēàţē śōḿēţĥĩńĝ ĝŕēàţ."],
- "FOyCTr": [
- "Ŷōũŕ ŌƥēńÀĨ ÀƤĨ ķēŷ, ũśēď ōńĺŷ ţō ćŕēàţē ēḿƀēďďĩńĝś ōƒ ŷōũŕ ćōńţēńţ ƒōŕ śēḿàńţĩć śēàŕćĥ. Śţōŕēď ōńćē ƒōŕ ţĥĩś ḿàćĥĩńē ĩń <0>~/.ōķ/śēćŕēţś.ŷḿĺ</0> (ŕēàďàƀĺē ōńĺŷ ƀŷ ŷōũŕ ũśēŕ àććōũńţ) àńď śĥàŕēď àćŕōśś àĺĺ ƥŕōĴēćţś. Ţũŕń ţĥē ƒēàţũŕē ōń ƥēŕ ƥŕōĴēćţ ĩń Ţĥĩś ƥŕōĴēćţ → Śēàŕćĥ."
- ],
"FRYB1Q": ["/àƥĩ/ćōńƒĩĝ ŕēţũŕńēď à ḿàĺƒōŕḿēď ƀōďŷ"],
"FRqZ9v": ["Ćōũĺďń'ţ ũƥďàţē śķĩĺĺ: ", ["0"]],
"FTUGgh": ["Ēńţēŕ à ŕēƥōśĩţōŕŷ ŨŔĹ ōŕ ōŵńēŕ/ŕēƥō"],
@@ -866,6 +860,7 @@
"KujtjC": ["Ƒĩńď"],
"L-rMC9": ["Ŕēśēţ ţō ďēƒàũĺţ"],
"L1ZE3M": ["Ďōćũḿēńţ śţàţĩśţĩćś"],
+ "L1rRuU": ["Ēḿƀēďďĩńĝś ÀƤĨ ēńďƥōĩńţ"],
"L3CEC1": ["ţĥĩś ĩţēḿ"],
"L4Cdd9": ["ōŕ ćŕēàţē à ńēŵ ƒĩĺē <0/>"],
"L6Hhh6": ["(ŕōōţ)"],
@@ -1631,6 +1626,7 @@
"eGUbmF": ["Ćōƥŷ śēĺēćţēď ƒĩĺē ōŕ ƒōĺďēŕ"],
"eJitUk": ["Ũƥĺōàď ƒŕōḿ ćōḿƥũţēŕ"],
"eKThTQ": ["Ƒàĩĺēď ţō ŕēōŕďēŕ"],
+ "eLl1VX": ["Ƒàĩĺēď ţō ũƥďàţē ţĥē ēḿƀēďďĩńĝś ēńďƥōĩńţ — ", ["detail"]],
"eNQGRb": ["Ĩńĺĩńē ĹàŢēX ḿàţĥ ŕēńďēŕēď ŵĩţĥ ĶàŢēX."],
"ePK91l": ["Ēďĩţ"],
"eQkgKV": ["Ĩńśţàĺĺēď"],
@@ -1911,6 +1907,7 @@
"lAiyU_": ["Ōńĺŷ ţĥē ćũŕŕēńţ ďōćũḿēńţ ũśēś <0>#", ["tag"], "</0>."],
"lCC_D5": ["Śũƀśćŕĩƀĩńĝ..."],
"lGs_bQ": ["Ƥàĝē <0>*</0>"],
+ "lHCR4I": ["Ćĺēàŕ ţĥē ƒĩēĺď ţō ŕēśēţ ƀàćķ ţō ţĥē ďēƒàũĺţ ŌƥēńÀĨ ēńďƥōĩńţ."],
"lHwYMr": ["Śēŕvēŕ ēŕŕōŕ: ", ["status"], " ", ["statusText"]],
"lI0Td2": ["Ũśē ĺēţţēŕś, ďĩĝĩţś, <0>_</0> àńď <1>-</1> ōńĺŷ."],
"lIn9L9": ["Ďĩśàƀĺē śŷńć"],
@@ -2062,6 +2059,9 @@
"Ţōĝĝĺē ţĥē ƀōţţōḿ ţēŕḿĩńàĺ ƥàńēĺ. Ŵĩţĥ ţēxţ śēĺēćţēď, śţàĝē ĩţ ĩń ţĥē ţēŕḿĩńàĺ'ś ÀĨ ĩńƥũţ ĩńśţēàď."
],
"oCZkaG": ["Ćōƥŷ ƥàţĥ"],
+ "oEgEn_": [
+ "À ķēŷ ĩś śēţ, ƀũţ ţĥē ēḿƀēďďĩńĝś ƥŕōvĩďēŕ ŕēĴēćţēď ĩţ ōŕ ŵàś ũńŕēàćĥàƀĺē — śēàŕćĥ ƒēĺĺ ƀàćķ ţō ķēŷŵōŕď ḿàţćĥĩńĝ. Ćĥēćķ ţĥē ķēŷ ĩń <0>Śēţţĩńĝś → Àććōũńţ</0> àńď ţĥē ēḿƀēďďĩńĝś ēńďƥōĩńţ śēţţĩńĝ."
+ ],
"oJl7eO": ["Ũńķńōŵń ćōḿƥōńēńţ: ", ["componentName"], " — śōũŕćē ēďĩţàƀĺē ƀēĺōŵ"],
"oKBnk5": ["Ḿōŕē ŕēǫũēśţś ŵēŕē ƀĺōćķēď."],
"oQA-cA": ["Ƒũĺĺ ƥàţĥ"],
@@ -2108,6 +2108,9 @@
"pha01Y": ["ƤŕōĴēćţ-ĺēvēĺ ƥàĝēś ŵĩţĥ ńō ĩńćōḿĩńĝ ĝŕàƥĥ ēďĝēś."],
"pkAft1": ["Śēàŕćĥ ƒàĩĺēď."],
"pmKdif": ["Ƒàĩĺēď: ", ["loadError"]],
+ "pmOGtg": [
+ "Ũśē ţĥē ďēƒàũĺţ ŌƥēńÀĨ ēńďƥōĩńţ ōŕ ōvēŕŕĩďē ĩţ ŵĩţĥ àń ŌƥēńÀĨ-ćōḿƥàţĩƀĺē ƀàśē ŨŔĹ ƒōŕ Àźũŕē ōŕ à śēĺƒ-ĥōśţēď ƥŕōvĩďēŕ."
+ ],
"pmUArF": ["Ŵōŕķśƥàćē"],
"ppDgFi": ["Ŕēśţàŕţ ŵĩţĥ ţĥĩś àƥƥ'ś vēŕśĩōń"],
"psfGPX": ["ḾĆƤ ćōńńēćţĩōńś"],
@@ -2353,6 +2356,9 @@
"w_Sphq": ["Àţţàćĥḿēńţś"],
"wbv9xO": ["Ćŕēàţē ńēŵ ƥŕōĴēćţ"],
"wbwHYD": ["Ēńàƀĺē śŷńć"],
+ "wccmX0": [
+ "Ŷōũŕ ēḿƀēďďĩńĝś ƥŕōvĩďēŕ ÀƤĨ ķēŷ, ũśēď ōńĺŷ ţō ćŕēàţē ēḿƀēďďĩńĝś ōƒ ŷōũŕ ćōńţēńţ ƒōŕ śēḿàńţĩć śēàŕćĥ. Śţōŕēď ōńćē ƒōŕ ţĥĩś ḿàćĥĩńē ĩń <0>~/.ōķ/śēćŕēţś.ŷḿĺ</0> (ŕēàďàƀĺē ōńĺŷ ƀŷ ŷōũŕ ũśēŕ àććōũńţ) àńď śĥàŕēď àćŕōśś àĺĺ ƥŕōĴēćţś. Ţũŕń ţĥē ƒēàţũŕē ōń ƥēŕ ƥŕōĴēćţ ĩń Ţĥĩś ƥŕōĴēćţ → Śēàŕćĥ, ŵĥēŕē ŷōũ ćàń àĺśō ōvēŕŕĩďē ţĥē ēńďƥōĩńţ."
+ ],
"wdxz7K": ["Śōũŕćē"],
"weP6me": ["Ćōũĺďń'ţ ĺōàď ďōćś — ţŷƥē @ àĝàĩń ţō ŕēţŕŷ"],
"wlwXUk": [
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index e6c6f7321..7c2f12975 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -504,7 +504,7 @@ msgid "A folder named <0>{sanitized}</0> already has files here. Pick a differen
msgstr ""
#: src/components/settings/SearchSection.tsx
-msgid "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."
+msgid "A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."
msgstr ""
#: src/components/SeedDialog.tsx
@@ -1286,6 +1286,10 @@ msgstr ""
msgid "Clear {keyName}"
msgstr ""
+#: src/components/settings/SearchSection.tsx
+msgid "Clear the field to reset back to the default OpenAI endpoint."
+msgstr ""
+
#: src/components/FolderTimelineCard.tsx
msgid "cleared folder properties"
msgstr ""
@@ -2701,6 +2705,10 @@ msgstr ""
msgid "Embed an image with optional alt text."
msgstr ""
+#: src/components/settings/SearchSection.tsx
+msgid "Embeddings API endpoint"
+msgstr ""
+
#: src/components/settings/SearchSection.tsx
msgid "Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."
msgstr ""
@@ -3068,6 +3076,10 @@ msgstr ""
msgid "Failed to update the auto-approve setting — {detail}"
msgstr ""
+#: src/components/settings/SearchSection.tsx
+msgid "Failed to update the embeddings endpoint — {detail}"
+msgstr ""
+
#: src/components/settings/SettingsDialogBody.tsx
msgid "Failed to update the project sync default — {detail}"
msgstr ""
@@ -7645,6 +7657,10 @@ msgstr ""
msgid "Use lowercase letters, digits, and hyphens only."
msgstr ""
+#: src/components/settings/SearchSection.tsx
+msgid "Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."
+msgstr ""
+
#: src/components/settings/SettingsDialogShell.tsx
msgid "User"
msgstr ""
@@ -7948,6 +7964,10 @@ msgstr ""
msgid "Your copy of branch <0>{shareBranch}</0> has changes that aren't on GitHub. The {targetNoun} will appear once the branch syncs."
msgstr ""
+#: src/components/settings/EmbeddingsKeySection.tsx
+msgid "Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."
+msgstr ""
+
#: src/components/settings/SettingsDialogBody.tsx
#: src/components/SyncStatusBadge.tsx
msgid "Your GitHub session expired — sign in again to verify push access."
@@ -7969,10 +7989,6 @@ msgstr ""
msgid "Your local copy of branch <0>{branch}</0> is behind. Pull the latest changes, then open the link again."
msgstr ""
-#: src/components/settings/EmbeddingsKeySection.tsx
-msgid "Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."
-msgstr ""
-
#: src/components/CloneDialog.tsx
msgid "Your repositories"
msgstr ""
diff --git a/packages/cli/src/commands/embeddings/index.ts b/packages/cli/src/commands/embeddings/index.ts
index facdd4f1a..e1e5f98a5 100644
--- a/packages/cli/src/commands/embeddings/index.ts
+++ b/packages/cli/src/commands/embeddings/index.ts
@@ -40,7 +40,7 @@ async function readKey(): Promise<string> {
for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
return Buffer.concat(chunks).toString('utf-8').trim();
}
- return (await password({ message: 'Enter OpenAI embeddings API key:' })).trim();
+ return (await password({ message: 'Enter embeddings provider API key:' })).trim();
}
// Read `search.semantic.*` through the SAME project-local-only resolver the
@@ -85,7 +85,7 @@ async function fetchLiveCoverage(
function setKeyCommand(): Command {
return new Command('set-key')
- .description('Store your OpenAI embeddings API key in ~/.ok/secrets.yml')
+ .description('Store your embeddings provider API key in ~/.ok/secrets.yml')
.action(async () => {
const key = await readKey();
if (!key) {
@@ -96,9 +96,9 @@ function setKeyCommand(): Command {
await createEmbeddingsSecretStore().set(key);
// Never echo the key.
process.stderr.write(
- '✓ OpenAI embeddings API key stored in ~/.ok/secrets.yml (0600, this machine only).\n' +
+ '✓ Embeddings provider API key stored in ~/.ok/secrets.yml (0600, this machine only).\n' +
'Now enable it per project — the easiest path is OK Desktop → Settings → This\n' +
- 'project → Search (a toggle with an egress-confirmation prompt), or run\n' +
+ 'project → Search (toggle + endpoint settings), or run\n' +
'`ok embeddings enable` in the project folder.\n',
);
});
@@ -106,14 +106,14 @@ function setKeyCommand(): Command {
function clearKeyCommand(): Command {
return new Command('clear-key')
- .description('Remove your stored OpenAI embeddings API key')
+ .description('Remove your stored embeddings provider API key')
.action(async () => {
const { touched } = await clearEmbeddingsKeyFromAllBackends();
if (touched.length === 0) {
- process.stderr.write('No stored OpenAI embeddings key found.\n');
+ process.stderr.write('No stored embeddings provider key found.\n');
return;
}
- process.stderr.write(`✓ OpenAI embeddings API key cleared (${touched.join(', ')}).\n`);
+ process.stderr.write(`✓ Embeddings provider API key cleared (${touched.join(', ')}).\n`);
});
}