Skip to content
Merged
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
24 changes: 24 additions & 0 deletions clients/cli/src/commands/model-catalog.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { expect, test } from "vitest";
import model from "./model";
import { getModelOverride, setModelOverride } from "./modelOverride";
import type { CommandContext } from "./types";

test("listed Ollama model can be selected without unknown-model warning", () => {
const previous = getModelOverride();
const messages: string[] = [];
const context: CommandContext = {
addSystemEvent: text => messages.push(text),
clearEvents() {}, submit() {}, resume() {}, exit() {},
};
try {
model.execute("", context);
const catalog = messages.pop() ?? "";
const ollama = catalog.split("Ollama (local):\n")[1]?.split("\n")[0].trim() ?? "";
expect(ollama).not.toBe("");
model.execute(ollama, context);
expect(getModelOverride()).toBe("ollama_chat/qwen3-coder:30b");
expect(messages.some(text => text.includes("not in the built-in catalog"))).toBe(false);
} finally {
setModelOverride(previous ?? "");
}
});
2 changes: 1 addition & 1 deletion clients/cli/src/commands/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const SUPPORTED_MODELS: Record<string, string[]> = {
"cfgateway/anthropic/claude-haiku-4-5",
],
// Local
"Ollama (local)": ["ollama_chat/qwen3-coder:30b (or your OLLAMA_MODEL)"],
"Ollama (local)": ["ollama_chat/qwen3-coder:30b"],
"Ollama Cloud": ["ollama_chat/<your OLLAMA_CLOUD_MODEL>"],
"LM Studio (local)": ["lm_studio/<your LMSTUDIO_MODEL>"],
"Custom OpenAI Endpoint": ["custom/<your CUSTOM_OPENAI_MODEL>"],
Expand Down
Loading