Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Ask a server with a fixed model list nothing about Ollama; fade Ollama's mark as mono
milind-soni28c4ffd0ea10
diff --git a/server/drivers/ollama.test.ts b/server/drivers/ollama.test.tsindex ea49eb2754..2561e2f4a3 100644--- a/server/drivers/ollama.test.ts+++ b/server/drivers/ollama.test.ts@@ -257,6 +257,15 @@ describe("the chat engine on Ollama", () => {} finally { await instance.dispose(); }});+ it("asks nothing of a server on this network that has a fixed model list", async () => {+ const { url } = await fakeOllama({ models: [LLAMA] });+ const instance = await create({ url: `${url}/v1`, apiKeyEnv: "FIXTURE_KEY", managedModels: ["llama3.2:latest"] }, { FIXTURE_KEY: "fixture-key" });+ try {+ await instance.snapshot();+ expect(answeredAsOllama(url)).toBeUndefined();+ } finally { await instance.dispose(); }+ });+it("sends tools only to a model that can call them", async () => {const { url, chats } = await fakeOllama({ models: [LLAMA, GEMMA] });const instance = await create({ url: `${url}/v1`, catalog: "ollama" });diff --git a/server/drivers/openai-compat.ts b/server/drivers/openai-compat.tsindex 5d73f225ff..938a07e789 100644--- a/server/drivers/openai-compat.ts+++ b/server/drivers/openai-compat.ts@@ -190,7 +190,8 @@ export const OpenAICompatDriver: ProviderDriver<OpenAICompatConfig> = {process.env[config.apiKeyEnv] ??(ownKeyVariable ? undefined : process.env[DEFAULT_KEY_ENV]) ??"";- const ollamaCandidate = config.catalog === "ollama" || (config.catalog === undefined && (onOllamaPort(config.url) || onThisNetwork(config.url)));+ // A server someone gave a fixed model list to is not asked what else it might be, unless it is on Ollama's own port.+ const ollamaCandidate = config.catalog === "ollama" || (config.catalog === undefined && (onOllamaPort(config.url) || (onThisNetwork(config.url) && !config.managedModels)));if (!savedKey && ollamaCandidate && !isOllamaServer(config)) await probeOllama(config.url, { timeoutMs: 1_500 });const apiKey = savedKey || (ollamaCandidate && isOllamaServer(config) ? OLLAMA_PLACEHOLDER_KEY : "");const missingKey = !ownKeyVariable || OWN_KEY_ENVS.has(config.apiKeyEnv)diff --git a/src/components/provider-mark-fade.ts b/src/components/provider-mark-fade.tsindex 8f92ca6a0a..8d1603f317 100644--- a/src/components/provider-mark-fade.ts+++ b/src/components/provider-mark-fade.ts@@ -3,7 +3,7 @@ import type { InstanceInfo } from "@/state/store";export type ProviderMarkTone = "brand" | "mono";const BRAND_DRIVERS: ReadonlySet<string> = new Set(["claudeAgent", "mistral", "meta", "museCode", "kimiAgent", "qwenAgent", "deepseekAgent", "greenference", "kiroAgent"]);-const MONO_PRESETS: ReadonlySet<string> = new Set(["openai", "xai"]);+const MONO_PRESETS: ReadonlySet<string> = new Set(["openai", "xai", "ollama"]);export function providerMarkTone(instance: Pick<InstanceInfo, "driverKind" | "icon">): ProviderMarkTone {if (instance.icon?.kind === "custom") return "brand";