Script for easily configuring, using, switching and comparing local offline coding models
1export interface ModelDef {
2 id: string;
3 name: string;
4 role: "chat" | "autocomplete";
5 ollamaTag: string;
6 ctxSize: number;
7}
8
9export const MODELS: ModelDef[] = [
10 {
11 id: "qwen-32b-chat",
12 name: "Qwen 2.5 Coder 32B",
13 role: "chat",
14 ollamaTag: "qwen2.5-coder:32b",
15 ctxSize: 16384,
16 },
17 {
18 id: "qwen-14b-chat",
19 name: "Qwen 2.5 Coder 14B",
20 role: "chat",
21 ollamaTag: "qwen2.5-coder:14b",
22 ctxSize: 16384,
23 },
24 {
25 id: "qwen-7b-chat",
26 name: "Qwen 2.5 Coder 7B",
27 role: "chat",
28 ollamaTag: "qwen2.5-coder:7b",
29 ctxSize: 16384,
30 },
31 {
32 id: "qwen3-coder",
33 name: "Qwen3 Coder 30B-A3B",
34 role: "chat",
35 ollamaTag: "qwen3-coder",
36 ctxSize: 65536,
37 },
38 {
39 id: "glm-flash",
40 name: "GLM-4.7 Flash 30B-A3B",
41 role: "chat",
42 ollamaTag: "glm-4.7-flash",
43 ctxSize: 65536,
44 },
45 {
46 id: "gpt-oss",
47 name: "GPT-OSS 20B",
48 role: "chat",
49 ollamaTag: "gpt-oss:20b",
50 ctxSize: 65536,
51 },
52 {
53 id: "qwen-1.5b-autocomplete",
54 name: "Qwen 2.5 Coder 1.5B",
55 role: "autocomplete",
56 ollamaTag: "qwen2.5-coder:1.5b",
57 ctxSize: 4096,
58 },
59];
60
61export function getModelById(id: string): ModelDef | undefined {
62 return MODELS.find((m) => m.id === id);
63}
64
65export function getChatModels(): ModelDef[] {
66 return MODELS.filter((m) => m.role === "chat");
67}
68
69export function getAutocompleteModels(): ModelDef[] {
70 return MODELS.filter((m) => m.role === "autocomplete");
71}