Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(providers): support custom endpoints without API keys

vastsa934bbc6cebe6
diff --git a/apps/desktop/src/components/settings/PluginProviderKeySetupForm.tsx b/apps/desktop/src/components/settings/PluginProviderKeySetupForm.tsx
index 38eb47443..b5866cc8a 100644
--- a/apps/desktop/src/components/settings/PluginProviderKeySetupForm.tsx
+++ b/apps/desktop/src/components/settings/PluginProviderKeySetupForm.tsx
@@ -106,6 +106,8 @@ export function PluginProviderKeySetupForm({
nameRef={nameRef}
apiKey={apiKey}
onApiKeyChange={setApiKey}
+ noApiKeyRequired={false}
+ onNoApiKeyRequiredChange={() => {}}
name={provider.name}
onNameChange={() => {}}
baseUrl={provider.baseUrl ?? ""}
diff --git a/apps/desktop/src/components/settings/ProviderConnectionFields.tsx b/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
index 5b3e81f9f..c5bc210de 100644
--- a/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
+++ b/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
@@ -10,7 +10,7 @@
import type { RefObject } from "react";
import { useTranslation } from "react-i18next";
import type { CatalogApiStyle } from "@pi-desktop/shared";
-import { Field, Input } from "../ui";
+import { Field, Input, SettingsToggle } from "../ui";
import { SettingsMenuSelect } from "./SettingsMenuSelect";
import { ServiceMonogram } from "./ServiceMonogram";
import { endpointLabel } from "./service-catalog";
@@ -33,6 +33,8 @@ export type ProviderConnectionFieldsProps = {
nameRef: RefObject<HTMLInputElement | null>;
apiKey: string;
onApiKeyChange: (value: string) => void;
+ noApiKeyRequired: boolean;
+ onNoApiKeyRequiredChange: (required: boolean) => void;
name: string;
onNameChange: (value: string) => void;
baseUrl: string;
@@ -61,6 +63,8 @@ export function ProviderConnectionFields({
nameRef,
apiKey,
onApiKeyChange,
+ noApiKeyRequired,
+ onNoApiKeyRequiredChange,
name,
onNameChange,
baseUrl,
@@ -165,17 +169,36 @@ export function ProviderConnectionFields({
</div>
</div>
<div className="provider-setup-field-row provider-setup-custom-auth-row">
- <Field label={t("settings.apiKey")} hint={keyHint}>
- <Input
- ref={apiKeyRef}
- type="password"
- value={apiKey}
- placeholder="sk-…"
- className="font-mono text-sm-plus"
- autoComplete="off"
- onChange={(event) => onApiKeyChange(event.target.value)}
- />
- </Field>
+ <div className="provider-setup-key">
+ <Field label={t("settings.apiKey")} hint={keyHint}>
+ <Input
+ ref={apiKeyRef}
+ type="password"
+ value={apiKey}
+ placeholder="sk-…"
+ className="font-mono text-sm-plus"
+ autoComplete="off"
+ disabled={saving || noApiKeyRequired}
+ onChange={(event) => onApiKeyChange(event.target.value)}
+ />
+ </Field>
+ <div className="provider-setup-no-api-key-option">
+ <div className="flex items-center justify-between gap-3">
+ <span className="text-sm text-text-secondary">
+ {t("settings.noApiKeyRequired")}
+ </span>
+ <SettingsToggle
+ checked={noApiKeyRequired}
+ label={t("settings.noApiKeyRequired")}
+ disabled={saving}
+ onChange={() => onNoApiKeyRequiredChange(!noApiKeyRequired)}
+ />
+ </div>
+ <p className="text-xs text-text-muted">
+ {t("settings.noApiKeyHint")}
+ </p>
+ </div>
+ </div>
<Field
label={t("settings.apiStyle")}
hint={apiStyleNote ?? (accountOnlyApiStyle ? t(requiresApiStyleChoice
diff --git a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
index 169660092..17acb9110 100644
--- a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
+++ b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
@@ -130,6 +130,7 @@ export function ProviderSetupDialog({
const [name, setName] = useState(() => initialDraft?.name ?? initialName(provider));
const [baseUrl, setBaseUrl] = useState(() => initialDraft?.baseUrl ?? initialBaseUrl(provider));
const [apiKey, setApiKey] = useState("");
+ const [noApiKeyRequired, setNoApiKeyRequired] = useState(() => provider?.authKind === "none");
const [apiStyle, setApiStyle] = useState<CatalogApiStyle>(() =>
initialDraft?.apiStyle ?? normalizeApiStyle(provider?.apiStyle),
);
@@ -388,7 +389,10 @@ export function ProviderSetupDialog({
models: persisted,
apiStyle: resolvedApiStyle,
headers,
- ...(apiKey ? { secretValue: apiKey } : {}),
+ ...(custom && noApiKeyRequired !== (provider.authKind === "none")
+ ? { authKind: noApiKeyRequired ? "none" : "api_key_and_base_url" }
+ : {}),
+ ...(custom && noApiKeyRequired ? {} : apiKey ? { secretValue: apiKey } : {}),
});
await onSaved(result.provider ?? provider, persisted, imageModelIdsToSave);
} else {
@@ -398,10 +402,10 @@ export function ProviderSetupDialog({
type: "openai_compatible",
protocol: "openai_compatible",
baseUrl: providerBaseUrl,
- authKind: "api_key_and_base_url",
+ authKind: custom && noApiKeyRequired ? "none" : "api_key_and_base_url",
defaultModelId: persisted[0]?.id,
models: persisted,
- secretValue: apiKey || undefined,
+ ...(custom && noApiKeyRequired ? {} : { secretValue: apiKey || undefined }),
apiStyle: resolvedApiStyle,
headers,
});
@@ -507,6 +511,11 @@ export function ProviderSetupDialog({
nameRef={nameRef}
apiKey={apiKey}
onApiKeyChange={setApiKey}
+ noApiKeyRequired={noApiKeyRequired}
+ onNoApiKeyRequiredChange={(required) => {
+ setNoApiKeyRequired(required);
+ if (required) setApiKey("");
+ }}
name={name}
onNameChange={setName}
baseUrl={baseUrl}
diff --git a/apps/desktop/src/styles/model-config.css b/apps/desktop/src/styles/model-config.css
index 5cdcd1f89..0817ac04b 100644
--- a/apps/desktop/src/styles/model-config.css
+++ b/apps/desktop/src/styles/model-config.css
@@ -271,6 +271,12 @@
min-width: 0;
}
+.provider-setup-no-api-key-option {
+ display: grid;
+ gap: 4px;
+ margin-top: 2px;
+}
+
.provider-service-anchor {
width: 100%;
min-width: 0;
diff --git a/apps/desktop/test/custom-provider-no-api-key-user-path.test.mjs b/apps/desktop/test/custom-provider-no-api-key-user-path.test.mjs
new file mode 100644
index 000000000..b784b2e80
--- /dev/null
+++ b/apps/desktop/test/custom-provider-no-api-key-user-path.test.mjs
@@ -0,0 +1,298 @@
+/** Configure a custom OpenAI-compatible endpoint that does not require a key. */
+import assert from "node:assert/strict";
+import { spawn } from "node:child_process";
+import { createRequire } from "node:module";
+import { mkdtemp, rm, writeFile } from "node:fs/promises";
+import { join } from "node:path";
+import test from "node:test";
+import { repositoryRoot, resolveElectronBinary } from "../../../scripts/e2e/boot.mjs";
+
+const root = repositoryRoot();
+const { build } = createRequire(join(root, "packages/agent-runtime/package.json"))("esbuild");
+
+const fixtureSource = String.raw`
+import React from "react";
+import { createRoot } from "react-dom/client";
+import { flushSync } from "react-dom";
+import i18n from "i18next";
+import { initReactI18next } from "react-i18next";
+import { catalogs, flattenCatalog } from "@pi-desktop/i18n";
+import { ProviderSetupDialog } from "../../apps/desktop/src/components/settings/ProviderSetupDialog";
+import { useAppStore } from "../../apps/desktop/src/stores/app-store";
+
+const calls = [];
+let createdProvider = null;
+let updatedProvider = null;
+let updateInput = null;
+let savedCallback = false;
+window.addEventListener("error", (event) => {
+ console.error("CUSTOM_PROVIDER_NO_KEY_WINDOW_ERROR", event.error?.stack ?? event.message);
+});
+window.addEventListener("unhandledrejection", (event) => {
+ console.error("CUSTOM_PROVIDER_NO_KEY_REJECTION", event.reason?.stack ?? event.reason);
+});
+
+window.piDesktop = {
+ platform: "darwin",
+ on() { return () => {}; },
+ async invoke(channel, ...args) {
+ const input = args[0];
+ calls.push({ channel, input });
+ if (channel === "pi-desktop/plugin/providerCatalog") {
+ return { ok: true, data: [] };
+ }
+ if (channel === "pi-desktop/providers/listModels") {
+ return { ok: true, data: { models: [], source: "remote" } };
+ }
+ if (channel === "pi-desktop/providers/lookupModel") {
+ return { ok: true, data: { info: null } };
+ }
+ if (channel === "pi-desktop/providers/create") {
+ createdProvider = {
+ id: "custom:no-auth",
+ ...input,
+ enabled: true,
+ hasSecret: false,
+ createdAt: "2026-10-13T00:00:00.000Z",
+ updatedAt: "2026-10-13T00:00:00.000Z",
+ };
+ return { ok: true, data: { provider: createdProvider } };
+ }
+ if (channel === "pi-desktop/providers/update") {
+ updateInput = input;
+ updatedProvider = {
+ ...createdProvider,
+ ...input,
+ hasSecret: Boolean(input.secretValue) || createdProvider.hasSecret,
+ };
+ return { ok: true, data: { provider: updatedProvider } };
+ }
+ throw new Error("Unexpected fixture IPC: " + channel);
+ },
+};
+
+await i18n.use(initReactI18next).init({
+ lng: "en",
+ fallbackLng: "en",
+ keySeparator: false,
+ resources: { en: { translation: flattenCatalog(catalogs.en) } },
+ interpolation: { escapeValue: false },
+});
+useAppStore.setState({ providers: [] });
+
+const frame = () => new Promise(requestAnimationFrame);
+async function settle() { await frame(); await frame(); }
+async function waitFor(predicate, message) {
+ for (let attempt = 0; attempt < 120; attempt += 1) {
+ await settle();
+ const value = predicate();
+ if (value) return value;
+ }
+ throw new Error(message);
+}
+function setValue(input, value) {
+ const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
+ setter.call(input, value);
+ input.dispatchEvent(new Event("input", { bubbles: true }));
+ input.dispatchEvent(new Event("change", { bubbles: true }));
+}
+
+const rootNode = createRoot(document.getElementById("root"));
+function mount(element) { flushSync(() => rootNode.render(element)); }
+
+window.customProviderNoApiKeyProbe = async () => {
+ mount(React.createElement(ProviderSetupDialog, {
+ key: "new-provider",
+ provider: null,
+ onClose: () => mount(null),
+ onSaved: () => { savedCallback = true; },
+ }));
+ const customTile = await waitFor(
+ () => document.querySelector('[data-service-id="custom"]'),
+ "the custom endpoint service was not offered",
+ );
+ flushSync(() => customTile.click());
+
+ const noApiKeyToggle = await waitFor(
+ () => document.querySelector('[role="switch"][aria-label="No API key required"]'),
+ "the custom endpoint form did not offer its no-key option",
+ );
+ const noApiKeyDefaultsOff = noApiKeyToggle.getAttribute("aria-checked") === "false";
+ const nameField = [...document.querySelectorAll("label")]
+ .find((label) => label.textContent.includes("Name"))
+ ?.querySelector("input");
+ const urlField = document.querySelector('input[type="url"]');
+ if (!nameField || !urlField) throw new Error("the custom endpoint identity fields were missing");
+ setValue(nameField, "No Auth Gateway");
+ setValue(urlField, "https://no-auth.example.org/v1");
+
+ const discoveryCall = await waitFor(
+ () => calls.find((call) => call.channel === "pi-desktop/providers/listModels"
+ && call.input.baseUrl === "https://no-auth.example.org/v1"),
+ "the custom endpoint was not probed without an API key",
+ );
+ const keyField = document.querySelector('input[type="password"]');
+ setValue(keyField, "temporary-api-key");
+ flushSync(() => noApiKeyToggle.click());
+ const keyFieldDisabled = keyField?.disabled === true;
+ const keyFieldCleared = keyField?.value === "";
+
+ const modelField = document.querySelector('input[placeholder^="Enter a model ID"]');
+ if (!modelField) throw new Error("the custom model input was missing");
+ setValue(modelField, "no-auth-chat");
+ const addModelButton = [...document.querySelectorAll("button")]
+ .find((button) => button.textContent.trim() === "Add custom model");
+ if (!addModelButton) throw new Error("the custom model add action was missing");
+ flushSync(() => addModelButton.click());
+ await waitFor(
+ () => document.querySelector(".provider-chosen")?.innerText.includes("no-auth-chat"),
+ "the model was not added to the custom provider",
+ );
+
+ const saveButton = [...document.querySelectorAll("button")]
+ .find((button) => button.textContent.trim() === "Save provider");
+ if (!saveButton) throw new Error("the custom provider save action was missing");
+ flushSync(() => saveButton.click());
+ await waitFor(() => savedCallback && createdProvider, "the custom provider was not saved");
+ const savedAsNoAuth = createdProvider.authKind === "none"
+ && !Object.hasOwn(createdProvider, "secretValue")
+ && createdProvider.models?.[0]?.id === "no-auth-chat";
+
+ let updateSavedCallback = false;
+ mount(React.createElement(ProviderSetupDialog, {
+ key: "edit-provider",
+ provider: createdProvider,
+ onClose: () => mount(null),
+ onSaved: (provider) => {
+ updatedProvider = provider;
+ updateSavedCallback = true;
+ },
+ }));
+ const editNoApiKeyToggle = await waitFor(
+ () => document.querySelector('[role="switch"][aria-label="No API key required"]'),
+ "the saved no-key setting did not reopen",
+ );
+ const editOpenedAsNoAuth = editNoApiKeyToggle.getAttribute("aria-checked") === "true";
+ flushSync(() => editNoApiKeyToggle.click());
+ const editKeyField = document.querySelector('input[type="password"]');
+ const editKeyEnabled = editKeyField?.disabled === false;
+ setValue(editKeyField, "saved-api-key");
+ const updateButton = [...document.querySelectorAll("button")]
+ .find((button) => button.textContent.trim() === "Save provider");
+ if (!updateButton) throw new Error("the edited custom provider save action was missing");
+ flushSync(() => updateButton.click());
+ await waitFor(() => updateSavedCallback && updateInput, "the custom provider auth update was not saved");
+
+ return {
+ discoveryOmittedApiKey: !Object.hasOwn(discoveryCall.input, "apiKey"),
+ noApiKeyDefaultsOff,
+ keyFieldDisabled: keyFieldDisabled,
+ keyFieldCleared: keyFieldCleared,
+ savedAuthKind: savedAsNoAuth ? "none" : createdProvider.authKind,
+ secretValueOmitted: savedAsNoAuth,
+ selectedModel: createdProvider.models?.[0]?.id,
+ editOpenedAsNoAuth,
+ editKeyEnabled,
+ updateAuthKind: updateInput.authKind,
+ updateStoredKey: updateInput.secretValue === "saved-api-key",
+ };
+};
+`;
+
+test("a custom endpoint can be saved and selected without an API key", {
+ timeout: 60_000,
+ skip:
+ process.platform === "linux" && !process.env.DISPLAY
+ ? "Isolated Electron UI test requires a display"
+ : false,
+}, async () => {
+ const temp = await mkdtemp(join(root, "apps/desktop/.custom-provider-no-api-key-ui-"));
+ try {
+ await build({
+ stdin: {
+ contents: fixtureSource,
+ resolveDir: join(root, "scripts", "e2e"),
+ sourcefile: join(root, "scripts", "e2e", "custom-provider-no-api-key.jsx"),
+ loader: "tsx",
+ },
+ outfile: join(temp, "renderer.js"),
+ bundle: true,
+ platform: "browser",
+ format: "esm",
+ jsx: "automatic",
+ define: { "process.env.NODE_ENV": '"production"' },
+ alias: {
+ "@pi-desktop/i18n": join(root, "packages/i18n/src"),
+ react: join(root, "apps/desktop/node_modules/react"),
+ "react-dom": join(root, "apps/desktop/node_modules/react-dom"),
+ i18next: join(root, "apps/desktop/node_modules/i18next"),
+ "react-i18next": join(root, "apps/desktop/node_modules/react-i18next"),
+ },
+ nodePaths: [join(root, "apps/desktop/node_modules")],
+ });
+ await writeFile(
+ join(temp, "index.html"),
+ '<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src \'self\'; style-src \'self\' \'unsafe-inline\'"><body><div id="root"></div><script type="module" src="renderer.js"></script>',
+ );
+ await writeFile(
+ join(temp, "main.cjs"),
+ `
+const { app, BrowserWindow } = require("electron");
+const path = require("node:path");
+app.setPath("userData", path.join(__dirname, "profile"));
+app.whenReady().then(async () => {
+ const win = new BrowserWindow({ show: false, width: 1000, height: 760,
+ webPreferences: { sandbox: true, contextIsolation: true, nodeIntegration: false, backgroundThrottling: false } });
+ win.webContents.on("console-message", (event) => console.error(event.message));
+ try {
+ await win.loadFile(path.join(__dirname, "index.html"));
+ const result = await win.webContents.executeJavaScript("window.customProviderNoApiKeyProbe()");
+ console.log("CUSTOM_PROVIDER_NO_API_KEY_PROBE " + JSON.stringify(result));
+ app.exit(0);
+ } catch (error) { console.error(error?.stack ?? error); app.exit(1); }
+});
+`,
+ );
+
+ const env = { ...process.env };
+ delete env.ELECTRON_RUN_AS_NODE;
+ const child = spawn(resolveElectronBinary(root).electronBinary, [join(temp, "main.cjs")], {
+ env,
+ stdio: ["ignore", "pipe", "pipe"],
+ });
+ let output = "";
+ for (const stream of [child.stdout, child.stderr]) {
+ stream.setEncoding("utf8");
+ stream.on("data", (chunk) => { output += chunk; });
+ }
+ const timer = setTimeout(() => child.kill("SIGKILL"), 45_000);
+ let code;
+ try {
+ code = await new Promise((resolve, reject) => {
+ child.once("error", reject);
+ child.once("close", resolve);
+ });
+ } finally {
+ clearTimeout(timer);
+ }
+ assert.equal(code, 0, output.slice(-6000));
+ const line = output.split(/\r?\n/)
+ .find((item) => item.startsWith("CUSTOM_PROVIDER_NO_API_KEY_PROBE "));
+ assert(line, output.slice(-6000));
+ assert.deepEqual(JSON.parse(line.slice("CUSTOM_PROVIDER_NO_API_KEY_PROBE ".length)), {
+ discoveryOmittedApiKey: true,
+ noApiKeyDefaultsOff: true,
+ keyFieldDisabled: true,
+ keyFieldCleared: true,
+ savedAuthKind: "none",
+ secretValueOmitted: true,
+ selectedModel: "no-auth-chat",
+ editOpenedAsNoAuth: true,
+ editKeyEnabled: true,
+ updateAuthKind: "api_key_and_base_url",
+ updateStoredKey: true,
+ });
+ } finally {
+ await rm(temp, { recursive: true, force: true });
+ }
+});
diff --git a/docs/spec/03-runtime/12-provider-config-schema.md b/docs/spec/03-runtime/12-provider-config-schema.md
index 611bcfd07..3323f962a 100644
--- a/docs/spec/03-runtime/12-provider-config-schema.md
+++ b/docs/spec/03-runtime/12-provider-config-schema.md
@@ -393,7 +393,11 @@ Presets only prefill form defaults; they are not a closed world.
| bedrock | bedrock | aws_sdk_default | no |
| ollama | openai_compatible | none | yes |
| lmstudio | openai_compatible | none | yes |
-| custom | openai_compatible | api_key_and_base_url | yes |
+| custom | openai_compatible | api_key_and_base_url by default; `none` when the endpoint needs no authentication | yes |
+
+The custom endpoint form keeps API-key authentication as its default and lets
+the user explicitly select `authKind: "none"` for endpoints that accept
+unauthenticated requests. Named cloud presets retain their declared auth kind.
### Fixed API-style presets
diff --git a/docs/spec/03-runtime/13-model-catalog-and-selection.md b/docs/spec/03-runtime/13-model-catalog-and-selection.md
index c86fb024d..5bc62ea30 100644
--- a/docs/spec/03-runtime/13-model-catalog-and-selection.md
+++ b/docs/spec/03-runtime/13-model-catalog-and-selection.md
@@ -26,7 +26,10 @@ entitled to it.
- **Name**, **Base URL** and **API Key** are all on screen at once. An empty key
when editing means “keep the stored one”; `secretValue` is only sent when the
- user typed something.
+ user typed something. Custom endpoints also offer an explicit **No API key
+ required** switch, defaulting off for new rows. When enabled, the key field is
+ disabled and cleared, and the row saves with `authKind: "none"` and no
+ secret. Named cloud services keep their existing authentication defaults.
- The models section lists what the service returned. `useProviderModels`
debounces edits by 600 ms, guards against out-of-order replies with a
monotonic request sequence, and needs no API key so local and no-auth
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 5937efc35..845308d0e 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -1045,8 +1045,8 @@ identify the platform validation still needed.
#### E2E-005: Add a provider and save API key
- **Preconditions**: App running; no provider configured; the models.dev snapshot ships with the build.
-- **Steps**: 1) Open Settings → Model configuration and choose Add provider. 2) Confirm the searchable service chooser opens. Filter and select a built-in API-key service or **Custom endpoint**; the selection must open its matching form, never the plugin-only “selected service unavailable” state. Confirm the form has no stepper or Next/Back buttons. For **Custom endpoint**, Name and Base URL appear on one row with no helper paragraph under the URL (placeholder only), API Key and API format appear side by side on the next row (not behind Advanced), and a focused field plus its 2px accent ring stays fully inside the dialog, including on a window narrower than 1040px. 3) Enter a name and a base URL for a service that publishes a `/models` route, then paste an API key. 4) Confirm the models section fills with the models THAT SERVICE returned, not with every model its vendor publishes; confirm a model the deployment does not host is absent. 5) Type in the filter box and confirm the list narrows client-side with no network request per keystroke. 6) Confirm each row shows the models.dev-derived context/output for models the catalog knows, that its compact text tracks the published value instead of a coarser rounded one (a 1,050,000 window reads `1.05M`, never `1.1M`), and that a model with no catalog match still lists with generic defaults. 7) Select two models with the checkboxes. 8) Expand Advanced on one chosen row, override its limits and toggle thinking chips; confirm each numeric field has a five-chip preset ladder for common values, clicking a chip writes the value, hand editing remains possible, and a non-preset value leaves the ladder unselected. Set max output to 8,192 while its context window still follows the catalog. On a model whose published image input is enabled, toggle image input off and then back on before saving, so the explicit choice equals the current catalog value. Confirm the label and optional hint sit above one compact grouped control and do not force the options onto a second row at normal dialog width; confirm all seven canonical levels are available, that published levels start selected for a known reasoning model, and that a non-reasoning or unknown row shows the same chips unselected with the manual-override hint; enable one level on that row and confirm the other row is unaffected. 9) Open the form-level Advanced and confirm the API format is present but pre-derived. 10) Add a free-form model ID the service did not return; confirm it is added with 128,000 / 8,192 / no-thinking defaults, then enable a thinking level if the endpoint supports it; confirm re-adding the same ID in different letter case is rejected as already added. 11) Save.
-- **Expected**: The service is asked first and models.dev only enriches the answer and seeds known-model defaults. Newly fetched or checked model rows stay collapsed until the user opens Advanced, so every selected model ID remains visible in the right pane after a multi-select. The settings picker always offers the seven canonical thinking levels, and the Composer later renders the explicit levels saved in the same model binding; an empty or `off`-only binding resolves to `off`. Discovery is debounced ~600 ms, does not mark loading until that window elapses, and a slow reply from an earlier keystroke never replaces a newer list; named add-path discovery waits for an API key, while an unsaved custom provider is probed with the typed base URL (and key, if any) before it exists. Preset ladders cover common context/output limits while preserving hand-edited values. The explicitly selected 8,192 output remains pinned independently of the catalog-sourced context window, and the image-input choice remains explicitly enabled after it is toggled back to the published value; neither is reinterpreted as "follow catalog" on save/reopen. Later catalog corrections change only values whose own source is `catalog`. Limit text renders through one shared compact formatter, so neighbouring published windows stay distinguishable (`1M` / `1.05M` / `1.1M`) and a compact limit never reads above its published value. Custom endpoint keeps API format beside the key and omits Base URL helper copy; named endpoints do not show format. Point the same custom form at an unreachable or unauthorized URL and confirm one classified sentence reaches the app toast while the left pane keeps its single “no list” label (not a raw JSON/HTML dump and not a second “no models” empty state); with cached rows from a later edit the same reason is toasted while the rows stay. Point a second provider at a base URL with no `/models` route and confirm the list falls back to the catalog, is labelled as coming from models.dev rather than the service, and still saves. The provider appears as a row with its host, model count and secret badge; the key is stored securely (not in plaintext config); `models` contains both bindings and `models[0]` remains the provider default.
+- **Steps**: 1) Open Settings → Model configuration and choose Add provider. 2) Confirm the searchable service chooser opens. Filter and select a built-in API-key service or **Custom endpoint**; the selection must open its matching form, never the plugin-only “selected service unavailable” state. Confirm the form has no stepper or Next/Back buttons. For **Custom endpoint**, Name and Base URL appear on one row with no helper paragraph under the URL (placeholder only), API Key and API format appear side by side on the next row (not behind Advanced), and a focused field plus its 2px accent ring stays fully inside the dialog, including on a window narrower than 1040px. The custom form's **No API key required** switch starts off; enabling it clears and disables the key field. 3) Enter a name and a base URL for a service that publishes a `/models` route, then paste an API key. Confirm the models section fills with the models THAT SERVICE returned without requiring a key for discovery; confirm a model the deployment does not host is absent. Also exercise the no-auth path with a custom endpoint: leave the key empty, enable **No API key required**, select a discovered model, and save. 4) Type in the filter box and confirm the list narrows client-side with no network request per keystroke. 5) Confirm each row shows the models.dev-derived context/output for models the catalog knows, that its compact text tracks the published value instead of a coarser rounded one (a 1,050,000 window reads `1.05M`, never `1.1M`), and that a model with no catalog match still lists with generic defaults. 6) Select two models with the checkboxes. 7) Expand Advanced on one chosen row, override its limits and toggle thinking chips; confirm each numeric field has a five-chip preset ladder for common values, clicking a chip writes the value, hand editing remains possible, and a non-preset value leaves the ladder unselected. Set max output to 8,192 while its context window still follows the catalog. On a model whose published image input is enabled, toggle image input off and then back on before saving, so the explicit choice equals the current catalog value. Confirm the label and optional hint sit above one compact grouped control and do not force the options onto a second row at normal dialog width; confirm all seven canonical levels are available, that published levels start selected for a known reasoning model, and that a non-reasoning or unknown row shows the same chips unselected with the manual-override hint; enable one level on that row and confirm the other row is unaffected. 8) Open the form-level Advanced and confirm the API format is present but pre-derived. 9) Add a free-form model ID the service did not return; confirm it is added with 128,000 / 8,192 / no-thinking defaults, then enable a thinking level if the endpoint supports it; confirm re-adding the same ID in different letter case is rejected as already added. 10) Save.
+- **Expected**: The service is asked first and models.dev only enriches the answer and seeds known-model defaults. The no-auth custom path saves `authKind: "none"`, omits `secretValue`, and makes the configured provider available anywhere an enabled no-auth provider is selectable; named cloud preset behavior stays unchanged. Newly fetched or checked model rows stay collapsed until the user opens Advanced, so every selected model ID remains visible in the right pane after a multi-select. The settings picker always offers the seven canonical thinking levels, and the Composer later renders the explicit levels saved in the same model binding; an empty or `off`-only binding resolves to `off`. Discovery is debounced ~600 ms, does not mark loading until that window elapses, and a slow reply from an earlier keystroke never replaces a newer list; named add-path discovery waits for an API key, while an unsaved custom provider is probed with the typed base URL (and key, if any) before it exists. Preset ladders cover common context/output limits while preserving hand-edited values. The explicitly selected 8,192 output remains pinned independently of the catalog-sourced context window, and the image-input choice remains explicitly enabled after it is toggled back to the published value; neither is reinterpreted as "follow catalog" on save/reopen. Later catalog corrections change only values whose own source is `catalog`. Limit text renders through one shared compact formatter, so neighbouring published windows stay distinguishable (`1M` / `1.05M` / `1.1M`) and a compact limit never reads above its published value. Custom endpoint keeps API format beside the key and omits Base URL helper copy; named endpoints do not show format. Point the same custom form at an unreachable or unauthorized URL and confirm one classified sentence reaches the app toast while the left pane keeps its single “no list” label (not a raw JSON/HTML dump and not a second “no models” empty state); with cached rows from a later edit the same reason is toasted while the rows stay. Point a second provider at a base URL with no `/models` route and confirm the list falls back to the catalog, is labelled as coming from models.dev rather than the service, and still saves. The provider appears as a row with its host, model count and secret badge; the key is stored securely (not in plaintext config); `models` contains both bindings and `models[0]` remains the provider default.
- **Specs linked**: `03-runtime/11-provider-model-system.md`, `03-runtime/12-provider-config-schema.md`, `03-runtime/13-model-catalog-and-selection.md`, `03-runtime/14-secrets-storage.md`, `04-ux/06-settings-ia.md`
- **Acceptance**: B (multi-model provider configuration, save key)
- **Milestone**: M2
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index e4e2682c6..ba49c42c9 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1392,6 +1392,8 @@ sklm: {
"copyProviderHint": "Erstellt einen unabhängigen Dienst. API-Schlüssel, Kontoanmeldungen und benutzerdefinierte Header werden nicht kopiert. Das Standardmodell bleibt unverändert.",
"editProviderTitle": "AI-Anbieter bearbeiten",
"apiKeyKeepHint": "Lassen Sie das Feld leer, um den gespeicherten Schlüssel beizubehalten.",
+ "noApiKeyRequired": "Kein API-Schlüssel erforderlich",
+ "noApiKeyHint": "Aktivieren Sie diese Option nur, wenn der Endpunkt Anfragen ohne Authentifizierung akzeptiert.",
"apiStyle": "API-Format",
"apiStyleChatCompletions": "OpenAI-Chat-Abschlüsse",
"apiStyleOpenCodeGo": "OpenCode Go",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index a71fdba3f..dd29be878 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1409,6 +1409,8 @@ sklm: {
"copyProviderHint": "Creates an independent service. API keys, account logins and custom headers are not copied. Your default model stays unchanged.",
editProviderTitle: "Edit AI provider",
apiKeyKeepHint: "Leave blank to keep the saved key.",
+ noApiKeyRequired: "No API key required",
+ noApiKeyHint: "Enable this only when the endpoint accepts requests without authentication.",
apiStyle: "API format",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index d98ca6fb8..417fd6e8e 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1392,6 +1392,8 @@ sklm: {
"copyProviderHint": "Crea un servicio independiente. No se copian las claves API, los inicios de sesión ni las cabeceras personalizadas. El modelo predeterminado no cambia.",
"editProviderTitle": "Editar proveedor de IA",
"apiKeyKeepHint": "Déjelo en blanco para conservar la clave guardada.",
+ "noApiKeyRequired": "No se requiere API key",
+ "noApiKeyHint": "Actívalo solo si el endpoint acepta solicitudes sin autenticación.",
"apiStyle": "Formato API",
"apiStyleChatCompletions": "Finalizaciones de OpenAI Chat",
"apiStyleOpenCodeGo": "OpenCode Go",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index ff94f9e34..05fba4e52 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1392,6 +1392,8 @@ sklm: {
"copyProviderHint": "Crée un service indépendant. Les clés API, connexions aux comptes et en-têtes personnalisés ne sont pas copiés. Le modèle par défaut reste inchangé.",
"editProviderTitle": "Modifier le fournisseur d'IA",
"apiKeyKeepHint": "Laissez vide pour conserver la clé enregistrée.",
+ "noApiKeyRequired": "Aucune clé API requise",
+ "noApiKeyHint": "Activez cette option uniquement si le point de terminaison accepte les requêtes sans authentification.",
"apiStyle": "Format API",
"apiStyleChatCompletions": "Achèvements de discussion OpenAI",
"apiStyleOpenCodeGo": "OpenCode Go",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 944b39e46..b378c3047 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1405,6 +1405,8 @@ sklm: {
"copyProviderHint": "독립적인 서비스를 만듭니다. API 키, 계정 로그인 및 사용자 지정 헤더는 복사하지 않습니다. 기본 모델은 변경되지 않습니다.",
editProviderTitle: "AI 프로바이더 편집",
apiKeyKeepHint: "저장된 키를 유지하려면 비워 두세요.",
+ noApiKeyRequired: "API 키 필요 없음",
+ noApiKeyHint: "인증 없이 요청을 받는 엔드포인트에서만 사용하세요.",
apiStyle: "API 형식",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index 17ec40237..ad3f3c419 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -1362,6 +1362,8 @@ export const ptBR = {
copyProviderHint: "Cria um serviço independente. Chaves de API, logins de contas e cabeçalhos personalizados não são copiados. O modelo padrão permanece inalterado.",
editProviderTitle: "Editar provedor de IA",
apiKeyKeepHint: "Deixe em branco para manter a chave salva.",
+ noApiKeyRequired: "Não requer chave de API",
+ noApiKeyHint: "Ative somente se o endpoint aceitar solicitações sem autenticação.",
apiStyle: "Formato API",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 6f719b9bb..ad117a44e 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1399,6 +1399,8 @@ sklm: {
"copyProviderHint": "Bağımsız bir hizmet oluşturur. API anahtarları, hesap girişleri ve özel başlıklar kopyalanmaz. Varsayılan model değişmez.",
editProviderTitle: "AI servisini düzenle",
apiKeyKeepHint: "Kayıtlı anahtarı korumak için boş bırakın.",
+ noApiKeyRequired: "API anahtarı gerekmiyor",
+ noApiKeyHint: "Yalnızca uç nokta kimlik doğrulaması olmadan istek kabul ediyorsa etkinleştirin.",
apiStyle: "API biçimi",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index f6de34730..a30a61088 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1387,6 +1387,8 @@ sklm: {
"copyProviderHint": "创建独立的服务配置,不复制 API 密钥、账号登录信息或自定义请求头。当前默认模型保持不变。",
editProviderTitle: "编辑 AI 服务",
apiKeyKeepHint: "留空则保留已保存的密钥。",
+ noApiKeyRequired: "无需 API Key",
+ noApiKeyHint: "仅当该接口无需身份验证时启用。",
apiStyle: "接口格式",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index e37f8337a..3837f68a5 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1387,6 +1387,8 @@ sklm: {
"copyProviderHint": "建立獨立的服務設定,不複製 API 金鑰、帳號登入資訊或自訂請求標頭。目前的預設模型保持不變。",
editProviderTitle: "編輯 AI 服務",
apiKeyKeepHint: "留空則保留已儲存的金鑰。",
+ noApiKeyRequired: "不需要 API 金鑰",
+ noApiKeyHint: "僅在此介面無需驗證時啟用。",
apiStyle: "介面格式",
apiStyleChatCompletions: "OpenAI Chat Completions",
apiStyleOpenCodeGo: "OpenCode Go",