Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions core/llm/llms/Llmman.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Ollama from "./Ollama";

import type { LLMOptions } from "../../index.js";

/**
* llmman (https://github.com/llmmanorg/llmman) is a local model runner that
* serves the Ollama API, so it reuses that implementation wholesale and only
* changes the provider name and the default port it listens on.
*/
class Llmman extends Ollama {
static providerName = "llmman";
static defaultOptions: Partial<LLMOptions> = {
...Ollama.defaultOptions,
apiBase: "http://localhost:17434/",
};
}

export default Llmman;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import Nebius from "./Nebius";
import Nous from "./Nous";
import Novita from "./Novita";
import Nvidia from "./Nvidia";
import Llmman from "./Llmman";
import Ollama from "./Ollama";
import OpenAI from "./OpenAI";
import OpenRouter from "./OpenRouter";
Expand Down Expand Up @@ -78,6 +79,7 @@ export const LLMClasses = [
Gemini,
Llamafile,
Moonshot,
Llmman,
Ollama,
Replicate,
TextGenWebUI,
Expand Down
3 changes: 3 additions & 0 deletions core/llm/toolSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =

return false;
},
// llmman serves the same local models over the Ollama API, so the same
// name-based heuristic applies.
llmman: (model) => PROVIDER_TOOL_SUPPORT["ollama"](model),
lmstudio: (model) => {
// LM Studio uses hyphenated model IDs (e.g., "Meta-Llama-3.1-8B-Instruct-GGUF")
// that don't match Ollama's substring patterns (e.g., "llama3.1").
Expand Down
2 changes: 2 additions & 0 deletions packages/config-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const modelDescriptionSchema = z.object({
"anthropic",
"cohere",
"ollama",
"llmman",
"huggingface-tgi",
"huggingface-inference-api",
"replicate",
Expand Down Expand Up @@ -107,6 +108,7 @@ export const embeddingsProviderSchema = z.object({
provider: z.enum([
"transformers.js",
"ollama",
"llmman",
"openai",
"cohere",
"gemini",
Expand Down
Loading