Skip to content
Python

llama.cpp and vLLM pages: their own help line instead of Ollama's

Rohit C Prasad6648907734c7
diff --git a/surfaces/gui/e2e/local-server-help.spec.ts b/surfaces/gui/e2e/local-server-help.spec.ts
new file mode 100644
index 00000000..7b6ec1be
--- /dev/null
+++ b/surfaces/gui/e2e/local-server-help.spec.ts
@@ -0,0 +1,26 @@
+import { expect } from "@playwright/test";
+import { test } from "./fixtures";
+
+// Each keyless local server explains itself; llama.cpp and vLLM never say "Ollama".
+const server = (name: string, title: string) => ({
+ name, title, kind: "local", needs_key: false, configured: false, values: {}, suggested_models: [], recommended_model: null,
+ fields: [{ key: "api_key", label: "API key (only if the server was started with one)", secret: true, required: false, help: "", placeholder: "" }],
+});
+
+for (const [name, title, says, link] of [
+ ["llamacpp", "llama.cpp", "llama-server", "Install llama.cpp"],
+ ["vllm", "vLLM", "NVIDIA GPU", "Install vLLM"],
+] as const) {
+ test(`${title}: its own help line, not Ollama's`, async ({ page }) => {
+ await page.route("**/v1/providers", (route) => route.fulfill({ json: [server(name, title)] }));
+ await page.goto("/");
+ await page.getByTestId("account-row").click();
+ await page.getByRole("button", { name: "Settings", exact: true }).click();
+ await page.getByRole("button", { name: "Models & Keys" }).click();
+ await page.getByTestId(`set-provider-${name}`).click();
+ const form = page.locator("main");
+ await expect(form).toContainText(says);
+ await expect(form.getByRole("button", { name: `${link} ↗` })).toBeVisible();
+ await expect(form).not.toContainText("Ollama");
+ });
+}
diff --git a/surfaces/gui/src/locales/en.json b/surfaces/gui/src/locales/en.json
index 62a05b9f..6503ffa5 100644
--- a/surfaces/gui/src/locales/en.json
+++ b/surfaces/gui/src/locales/en.json
@@ -1596,7 +1596,11 @@
"test_save_btn": "Test & save",
"connected_count": "✓ Connected · {{count}} models",
"running_count": "✓ Running · {{count}} models",
- "not_connected": "Not connected"
+ "not_connected": "Not connected",
+ "llamacpp_desc": "No API key needed unless your llama-server was started with one.",
+ "install_llamacpp": "Install llama.cpp",
+ "vllm_desc": "vLLM runs on Linux with an NVIDIA GPU. A key is needed only if the server was started with one.",
+ "install_vllm": "Install vLLM"
},
"workspace_trust": {
"title": "Trust this workspace’s commands?",
diff --git a/surfaces/gui/src/locales/zh.json b/surfaces/gui/src/locales/zh.json
index 18d12c06..e82fdb39 100644
--- a/surfaces/gui/src/locales/zh.json
+++ b/surfaces/gui/src/locales/zh.json
@@ -1576,7 +1576,11 @@
"test_save_btn": "测试并保存",
"connected_count": "✓ 已连接 · {{count}} 个模型",
"running_count": "✓ 运行中 · {{count}} 个模型",
- "not_connected": "未连接"
+ "not_connected": "未连接",
+ "llamacpp_desc": "无需 API 密钥,除非你的 llama-server 启动时设置了密钥。",
+ "install_llamacpp": "安装 llama.cpp",
+ "vllm_desc": "vLLM 运行在带 NVIDIA GPU 的 Linux 上。仅当服务器启动时设置了密钥才需要填写。",
+ "install_vllm": "安装 vLLM"
},
"workspace_trust": {
"title": "信任此工作区的命令?",
diff --git a/surfaces/gui/src/providers/ProviderSetup.tsx b/surfaces/gui/src/providers/ProviderSetup.tsx
index c191b1c1..46bb4129 100644
--- a/surfaces/gui/src/providers/ProviderSetup.tsx
+++ b/surfaces/gui/src/providers/ProviderSetup.tsx
@@ -23,6 +23,13 @@ import { OpenRouterSignIn } from "./OpenRouterSignIn";
// and passes a testid prefix so both stay independently addressable in e2e.
// Where a non-developer gets an API key — deep link + one line of instructions.
+// Keyless local servers: one line on what the server is, and where to get it.
+const LOCAL_HELP: Record<string, { desc: string; link: string; url: string }> = {
+ ollama: { desc: "provider.no_key_needed_desc", link: "provider.install_ollama", url: "https://ollama.com/download" },
+ llamacpp: { desc: "provider.llamacpp_desc", link: "provider.install_llamacpp", url: "https://github.com/ggml-org/llama.cpp#quick-start" },
+ vllm: { desc: "provider.vllm_desc", link: "provider.install_vllm", url: "https://docs.vllm.ai/en/latest/getting_started/installation/" },
+};
+
export const KEY_HELP: Record<string, { url: string; label: string; labelKey?: string }> = {
anthropic: { url: "https://console.anthropic.com/settings/keys", label: "console.anthropic.com" },
openai: { url: "https://platform.openai.com/api-keys", label: "platform.openai.com" },
@@ -625,14 +632,14 @@ export function ProviderForm({
{t("provider.takes_a_minute")}
</p>
)}
- {info && !info.needs_key && info.auth !== "oauth" && (
+ {info && !info.needs_key && info.auth !== "oauth" && LOCAL_HELP[info.name] && (
<p className="text-meta text-faint mt-2">
- {t("provider.no_key_needed_desc")}{" "}
+ {t(LOCAL_HELP[info.name].desc)}{" "}
<button
className="text-muted underline decoration-line underline-offset-2 hover:text-ink"
- onClick={() => openExternal("https://ollama.com/download")}
+ onClick={() => openExternal(LOCAL_HELP[info.name].url)}
>
- {t("provider.install_ollama")} ↗
+ {t(LOCAL_HELP[info.name].link)} ↗
</button>
</p>
)}