neuro-cli 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +510 -0
- package/dist/advisor/advisor.d.ts +50 -0
- package/dist/advisor/advisor.js +178 -0
- package/dist/agents/base.d.ts +62 -0
- package/dist/agents/base.js +215 -0
- package/dist/agents/orchestrator.d.ts +46 -0
- package/dist/agents/orchestrator.js +192 -0
- package/dist/agents/team.d.ts +51 -0
- package/dist/agents/team.js +210 -0
- package/dist/api/models.d.ts +23 -0
- package/dist/api/models.js +514 -0
- package/dist/api/ollama.d.ts +153 -0
- package/dist/api/ollama.js +751 -0
- package/dist/api/openrouter.d.ts +55 -0
- package/dist/api/openrouter.js +223 -0
- package/dist/commands/commands.d.ts +43 -0
- package/dist/commands/commands.js +308 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.js +311 -0
- package/dist/context/compaction.d.ts +54 -0
- package/dist/context/compaction.js +251 -0
- package/dist/context/custom-agents.d.ts +107 -0
- package/dist/context/custom-agents.js +397 -0
- package/dist/context/custom-tools.d.ts +120 -0
- package/dist/context/custom-tools.js +564 -0
- package/dist/context/git-checkpoint.d.ts +52 -0
- package/dist/context/git-checkpoint.js +240 -0
- package/dist/context/neuro-md.d.ts +48 -0
- package/dist/context/neuro-md.js +202 -0
- package/dist/context/neuroignore.d.ts +102 -0
- package/dist/context/neuroignore.js +441 -0
- package/dist/context/repo-map.d.ts +38 -0
- package/dist/context/repo-map.js +220 -0
- package/dist/context/skill-standard.d.ts +262 -0
- package/dist/context/skill-standard.js +1156 -0
- package/dist/context/skill-system.d.ts +75 -0
- package/dist/context/skill-system.js +578 -0
- package/dist/context/tree-sitter.d.ts +99 -0
- package/dist/context/tree-sitter.js +1956 -0
- package/dist/core/acp.d.ts +325 -0
- package/dist/core/acp.js +1498 -0
- package/dist/core/api-server.d.ts +143 -0
- package/dist/core/api-server.js +550 -0
- package/dist/core/approval.d.ts +81 -0
- package/dist/core/approval.js +432 -0
- package/dist/core/auto-compact.d.ts +127 -0
- package/dist/core/auto-compact.js +436 -0
- package/dist/core/auto-mode.d.ts +232 -0
- package/dist/core/auto-mode.js +831 -0
- package/dist/core/background-session.d.ts +166 -0
- package/dist/core/background-session.js +696 -0
- package/dist/core/cicd.d.ts +257 -0
- package/dist/core/cicd.js +1443 -0
- package/dist/core/cloud-sync.d.ts +156 -0
- package/dist/core/cloud-sync.js +582 -0
- package/dist/core/code-review.d.ts +132 -0
- package/dist/core/code-review.js +1191 -0
- package/dist/core/completion.d.ts +49 -0
- package/dist/core/completion.js +384 -0
- package/dist/core/context.d.ts +38 -0
- package/dist/core/context.js +144 -0
- package/dist/core/diff-preview.d.ts +35 -0
- package/dist/core/diff-preview.js +173 -0
- package/dist/core/doom-loop.d.ts +51 -0
- package/dist/core/doom-loop.js +179 -0
- package/dist/core/engine.d.ts +183 -0
- package/dist/core/engine.js +942 -0
- package/dist/core/extended-thinking.d.ts +103 -0
- package/dist/core/extended-thinking.js +269 -0
- package/dist/core/fallback.d.ts +54 -0
- package/dist/core/fallback.js +104 -0
- package/dist/core/git-worktree.d.ts +139 -0
- package/dist/core/git-worktree.js +614 -0
- package/dist/core/headless.d.ts +30 -0
- package/dist/core/headless.js +101 -0
- package/dist/core/i18n.d.ts +83 -0
- package/dist/core/i18n.js +739 -0
- package/dist/core/linting.d.ts +129 -0
- package/dist/core/linting.js +699 -0
- package/dist/core/model-router.d.ts +109 -0
- package/dist/core/model-router.js +581 -0
- package/dist/core/multi-model.d.ts +243 -0
- package/dist/core/multi-model.js +1099 -0
- package/dist/core/multi-session.d.ts +144 -0
- package/dist/core/multi-session.js +442 -0
- package/dist/core/multimodal.d.ts +125 -0
- package/dist/core/multimodal.js +286 -0
- package/dist/core/observability.d.ts +93 -0
- package/dist/core/observability.js +737 -0
- package/dist/core/os-sandbox.d.ts +122 -0
- package/dist/core/os-sandbox.js +1193 -0
- package/dist/core/outcome-grading.d.ts +228 -0
- package/dist/core/outcome-grading.js +1123 -0
- package/dist/core/output-styles.d.ts +57 -0
- package/dist/core/output-styles.js +382 -0
- package/dist/core/parallel-agents.d.ts +183 -0
- package/dist/core/parallel-agents.js +563 -0
- package/dist/core/plugin-bundle.d.ts +236 -0
- package/dist/core/plugin-bundle.js +887 -0
- package/dist/core/plugin-sdk.d.ts +139 -0
- package/dist/core/plugin-sdk.js +273 -0
- package/dist/core/prompt-cache.d.ts +163 -0
- package/dist/core/prompt-cache.js +599 -0
- package/dist/core/sandbox.d.ts +127 -0
- package/dist/core/sandbox.js +369 -0
- package/dist/core/scheduled-tasks.d.ts +151 -0
- package/dist/core/scheduled-tasks.js +502 -0
- package/dist/core/security-scanner.d.ts +160 -0
- package/dist/core/security-scanner.js +1494 -0
- package/dist/core/session.d.ts +83 -0
- package/dist/core/session.js +269 -0
- package/dist/core/shell-completion.d.ts +51 -0
- package/dist/core/shell-completion.js +674 -0
- package/dist/core/smart-monitor.d.ts +146 -0
- package/dist/core/smart-monitor.js +1199 -0
- package/dist/core/spec-driven.d.ts +233 -0
- package/dist/core/spec-driven.js +1485 -0
- package/dist/core/spending-warnings.d.ts +123 -0
- package/dist/core/spending-warnings.js +456 -0
- package/dist/core/sub-agent.d.ts +298 -0
- package/dist/core/sub-agent.js +1023 -0
- package/dist/core/telemetry.d.ts +157 -0
- package/dist/core/telemetry.js +412 -0
- package/dist/core/terminal-ux.d.ts +134 -0
- package/dist/core/terminal-ux.js +649 -0
- package/dist/core/testing.d.ts +146 -0
- package/dist/core/testing.js +1200 -0
- package/dist/core/types.d.ts +439 -0
- package/dist/core/types.js +6 -0
- package/dist/core/undo-redo.d.ts +112 -0
- package/dist/core/undo-redo.js +290 -0
- package/dist/core/updater.d.ts +159 -0
- package/dist/core/updater.js +608 -0
- package/dist/core/vim-mode.d.ts +151 -0
- package/dist/core/vim-mode.js +771 -0
- package/dist/core/voice.d.ts +137 -0
- package/dist/core/voice.js +538 -0
- package/dist/core/web-dashboard.d.ts +109 -0
- package/dist/core/web-dashboard.js +484 -0
- package/dist/hooks/hooks.d.ts +74 -0
- package/dist/hooks/hooks.js +160 -0
- package/dist/hooks/llm-evaluator.d.ts +165 -0
- package/dist/hooks/llm-evaluator.js +560 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1186 -0
- package/dist/lsp/lsp-manager.d.ts +63 -0
- package/dist/lsp/lsp-manager.js +351 -0
- package/dist/mcp/client.d.ts +133 -0
- package/dist/mcp/client.js +684 -0
- package/dist/mcp/mcp-apps.d.ts +70 -0
- package/dist/mcp/mcp-apps.js +1007 -0
- package/dist/tools/bash.d.ts +5 -0
- package/dist/tools/bash.js +195 -0
- package/dist/tools/browser.d.ts +92 -0
- package/dist/tools/browser.js +1570 -0
- package/dist/tools/extended.d.ts +6 -0
- package/dist/tools/extended.js +191 -0
- package/dist/tools/file.d.ts +10 -0
- package/dist/tools/file.js +382 -0
- package/dist/tools/github.d.ts +389 -0
- package/dist/tools/github.js +759 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.js +40 -0
- package/dist/tools/memory.d.ts +6 -0
- package/dist/tools/memory.js +197 -0
- package/dist/tools/registry.d.ts +29 -0
- package/dist/tools/registry.js +64 -0
- package/dist/tools/web.d.ts +6 -0
- package/dist/tools/web.js +150 -0
- package/dist/ui/renderer.d.ts +97 -0
- package/dist/ui/renderer.js +279 -0
- package/dist/ui/theme.d.ts +27 -0
- package/dist/ui/theme.js +106 -0
- package/package.json +83 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// NeuroCLI - Model Definitions
|
|
3
|
+
// Comprehensive OpenRouter model registry
|
|
4
|
+
// Including 23 FREE models + premium models
|
|
5
|
+
// ============================================================
|
|
6
|
+
export const MODELS = {
|
|
7
|
+
// ================================================================
|
|
8
|
+
// 🆓 FREE MODELS (23 models - $0 input / $0 output)
|
|
9
|
+
// ================================================================
|
|
10
|
+
// ---- Free: Qwen ----
|
|
11
|
+
'qwen/qwen3-coder:free': {
|
|
12
|
+
id: 'qwen/qwen3-coder:free',
|
|
13
|
+
name: 'Qwen3 Coder 480B (Free)',
|
|
14
|
+
provider: 'qwen',
|
|
15
|
+
contextWindow: 1048576,
|
|
16
|
+
maxOutput: 262000,
|
|
17
|
+
inputPrice: 0,
|
|
18
|
+
outputPrice: 0,
|
|
19
|
+
supportsTools: true,
|
|
20
|
+
supportsVision: false,
|
|
21
|
+
supportsStreaming: true,
|
|
22
|
+
},
|
|
23
|
+
'qwen/qwen3-next-80b-a3b-instruct:free': {
|
|
24
|
+
id: 'qwen/qwen3-next-80b-a3b-instruct:free',
|
|
25
|
+
name: 'Qwen3 Next 80B (Free)',
|
|
26
|
+
provider: 'qwen',
|
|
27
|
+
contextWindow: 262144,
|
|
28
|
+
maxOutput: 32768,
|
|
29
|
+
inputPrice: 0,
|
|
30
|
+
outputPrice: 0,
|
|
31
|
+
supportsTools: true,
|
|
32
|
+
supportsVision: false,
|
|
33
|
+
supportsStreaming: true,
|
|
34
|
+
},
|
|
35
|
+
// ---- Free: NVIDIA Nemotron ----
|
|
36
|
+
'nvidia/nemotron-3-super-120b-a12b:free': {
|
|
37
|
+
id: 'nvidia/nemotron-3-super-120b-a12b:free',
|
|
38
|
+
name: 'Nemotron 3 Super 120B (Free)',
|
|
39
|
+
provider: 'nvidia',
|
|
40
|
+
contextWindow: 1000000,
|
|
41
|
+
maxOutput: 262144,
|
|
42
|
+
inputPrice: 0,
|
|
43
|
+
outputPrice: 0,
|
|
44
|
+
supportsTools: true,
|
|
45
|
+
supportsVision: false,
|
|
46
|
+
supportsStreaming: true,
|
|
47
|
+
},
|
|
48
|
+
'nvidia/nemotron-3-ultra-550b-a55b:free': {
|
|
49
|
+
id: 'nvidia/nemotron-3-ultra-550b-a55b:free',
|
|
50
|
+
name: 'Nemotron 3 Ultra 550B (Free)',
|
|
51
|
+
provider: 'nvidia',
|
|
52
|
+
contextWindow: 1000000,
|
|
53
|
+
maxOutput: 65536,
|
|
54
|
+
inputPrice: 0,
|
|
55
|
+
outputPrice: 0,
|
|
56
|
+
supportsTools: true,
|
|
57
|
+
supportsVision: false,
|
|
58
|
+
supportsStreaming: true,
|
|
59
|
+
},
|
|
60
|
+
'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': {
|
|
61
|
+
id: 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free',
|
|
62
|
+
name: 'Nemotron 3 Nano Omni 30B (Free)',
|
|
63
|
+
provider: 'nvidia',
|
|
64
|
+
contextWindow: 256000,
|
|
65
|
+
maxOutput: 65536,
|
|
66
|
+
inputPrice: 0,
|
|
67
|
+
outputPrice: 0,
|
|
68
|
+
supportsTools: true,
|
|
69
|
+
supportsVision: true,
|
|
70
|
+
supportsStreaming: true,
|
|
71
|
+
},
|
|
72
|
+
'nvidia/nemotron-3-nano-30b-a3b:free': {
|
|
73
|
+
id: 'nvidia/nemotron-3-nano-30b-a3b:free',
|
|
74
|
+
name: 'Nemotron 3 Nano 30B (Free)',
|
|
75
|
+
provider: 'nvidia',
|
|
76
|
+
contextWindow: 256000,
|
|
77
|
+
maxOutput: 32768,
|
|
78
|
+
inputPrice: 0,
|
|
79
|
+
outputPrice: 0,
|
|
80
|
+
supportsTools: true,
|
|
81
|
+
supportsVision: false,
|
|
82
|
+
supportsStreaming: true,
|
|
83
|
+
},
|
|
84
|
+
'nvidia/nemotron-nano-12b-v2-vl:free': {
|
|
85
|
+
id: 'nvidia/nemotron-nano-12b-v2-vl:free',
|
|
86
|
+
name: 'Nemotron Nano 12B VL (Free)',
|
|
87
|
+
provider: 'nvidia',
|
|
88
|
+
contextWindow: 128000,
|
|
89
|
+
maxOutput: 128000,
|
|
90
|
+
inputPrice: 0,
|
|
91
|
+
outputPrice: 0,
|
|
92
|
+
supportsTools: true,
|
|
93
|
+
supportsVision: true,
|
|
94
|
+
supportsStreaming: true,
|
|
95
|
+
},
|
|
96
|
+
'nvidia/nemotron-nano-9b-v2:free': {
|
|
97
|
+
id: 'nvidia/nemotron-nano-9b-v2:free',
|
|
98
|
+
name: 'Nemotron Nano 9B (Free)',
|
|
99
|
+
provider: 'nvidia',
|
|
100
|
+
contextWindow: 128000,
|
|
101
|
+
maxOutput: 32768,
|
|
102
|
+
inputPrice: 0,
|
|
103
|
+
outputPrice: 0,
|
|
104
|
+
supportsTools: true,
|
|
105
|
+
supportsVision: false,
|
|
106
|
+
supportsStreaming: true,
|
|
107
|
+
},
|
|
108
|
+
// ---- Free: Meta Llama ----
|
|
109
|
+
'meta-llama/llama-3.3-70b-instruct:free': {
|
|
110
|
+
id: 'meta-llama/llama-3.3-70b-instruct:free',
|
|
111
|
+
name: 'Llama 3.3 70B (Free)',
|
|
112
|
+
provider: 'meta',
|
|
113
|
+
contextWindow: 131072,
|
|
114
|
+
maxOutput: 32768,
|
|
115
|
+
inputPrice: 0,
|
|
116
|
+
outputPrice: 0,
|
|
117
|
+
supportsTools: true,
|
|
118
|
+
supportsVision: false,
|
|
119
|
+
supportsStreaming: true,
|
|
120
|
+
},
|
|
121
|
+
'meta-llama/llama-3.2-3b-instruct:free': {
|
|
122
|
+
id: 'meta-llama/llama-3.2-3b-instruct:free',
|
|
123
|
+
name: 'Llama 3.2 3B (Free)',
|
|
124
|
+
provider: 'meta',
|
|
125
|
+
contextWindow: 131072,
|
|
126
|
+
maxOutput: 8192,
|
|
127
|
+
inputPrice: 0,
|
|
128
|
+
outputPrice: 0,
|
|
129
|
+
supportsTools: false,
|
|
130
|
+
supportsVision: false,
|
|
131
|
+
supportsStreaming: true,
|
|
132
|
+
},
|
|
133
|
+
// ---- Free: Google Gemma ----
|
|
134
|
+
'google/gemma-4-31b-it:free': {
|
|
135
|
+
id: 'google/gemma-4-31b-it:free',
|
|
136
|
+
name: 'Gemma 4 31B (Free)',
|
|
137
|
+
provider: 'google',
|
|
138
|
+
contextWindow: 262144,
|
|
139
|
+
maxOutput: 32768,
|
|
140
|
+
inputPrice: 0,
|
|
141
|
+
outputPrice: 0,
|
|
142
|
+
supportsTools: true,
|
|
143
|
+
supportsVision: true,
|
|
144
|
+
supportsStreaming: true,
|
|
145
|
+
},
|
|
146
|
+
'google/gemma-4-26b-a4b-it:free': {
|
|
147
|
+
id: 'google/gemma-4-26b-a4b-it:free',
|
|
148
|
+
name: 'Gemma 4 26B A4B (Free)',
|
|
149
|
+
provider: 'google',
|
|
150
|
+
contextWindow: 262144,
|
|
151
|
+
maxOutput: 32768,
|
|
152
|
+
inputPrice: 0,
|
|
153
|
+
outputPrice: 0,
|
|
154
|
+
supportsTools: true,
|
|
155
|
+
supportsVision: true,
|
|
156
|
+
supportsStreaming: true,
|
|
157
|
+
},
|
|
158
|
+
// ---- Free: Poolside ----
|
|
159
|
+
'poolside/laguna-m.1:free': {
|
|
160
|
+
id: 'poolside/laguna-m.1:free',
|
|
161
|
+
name: 'Poolside Laguna M.1 (Free)',
|
|
162
|
+
provider: 'poolside',
|
|
163
|
+
contextWindow: 262144,
|
|
164
|
+
maxOutput: 32768,
|
|
165
|
+
inputPrice: 0,
|
|
166
|
+
outputPrice: 0,
|
|
167
|
+
supportsTools: true,
|
|
168
|
+
supportsVision: false,
|
|
169
|
+
supportsStreaming: true,
|
|
170
|
+
},
|
|
171
|
+
'poolside/laguna-xs-2.1:free': {
|
|
172
|
+
id: 'poolside/laguna-xs-2.1:free',
|
|
173
|
+
name: 'Poolside Laguna XS 2.1 (Free)',
|
|
174
|
+
provider: 'poolside',
|
|
175
|
+
contextWindow: 262144,
|
|
176
|
+
maxOutput: 32768,
|
|
177
|
+
inputPrice: 0,
|
|
178
|
+
outputPrice: 0,
|
|
179
|
+
supportsTools: true,
|
|
180
|
+
supportsVision: false,
|
|
181
|
+
supportsStreaming: true,
|
|
182
|
+
},
|
|
183
|
+
// ---- Free: Cohere ----
|
|
184
|
+
'cohere/north-mini-code:free': {
|
|
185
|
+
id: 'cohere/north-mini-code:free',
|
|
186
|
+
name: 'Cohere North Mini Code (Free)',
|
|
187
|
+
provider: 'cohere',
|
|
188
|
+
contextWindow: 256000,
|
|
189
|
+
maxOutput: 64000,
|
|
190
|
+
inputPrice: 0,
|
|
191
|
+
outputPrice: 0,
|
|
192
|
+
supportsTools: true,
|
|
193
|
+
supportsVision: false,
|
|
194
|
+
supportsStreaming: true,
|
|
195
|
+
},
|
|
196
|
+
// ---- Free: OpenAI ----
|
|
197
|
+
'openai/gpt-oss-20b:free': {
|
|
198
|
+
id: 'openai/gpt-oss-20b:free',
|
|
199
|
+
name: 'OpenAI gpt-oss-20b (Free)',
|
|
200
|
+
provider: 'openai',
|
|
201
|
+
contextWindow: 131072,
|
|
202
|
+
maxOutput: 32768,
|
|
203
|
+
inputPrice: 0,
|
|
204
|
+
outputPrice: 0,
|
|
205
|
+
supportsTools: true,
|
|
206
|
+
supportsVision: false,
|
|
207
|
+
supportsStreaming: true,
|
|
208
|
+
},
|
|
209
|
+
// ---- Free: Nous Research ----
|
|
210
|
+
'nousresearch/hermes-3-llama-3.1-405b:free': {
|
|
211
|
+
id: 'nousresearch/hermes-3-llama-3.1-405b:free',
|
|
212
|
+
name: 'Hermes 3 405B (Free)',
|
|
213
|
+
provider: 'nous',
|
|
214
|
+
contextWindow: 131072,
|
|
215
|
+
maxOutput: 32768,
|
|
216
|
+
inputPrice: 0,
|
|
217
|
+
outputPrice: 0,
|
|
218
|
+
supportsTools: false,
|
|
219
|
+
supportsVision: false,
|
|
220
|
+
supportsStreaming: true,
|
|
221
|
+
},
|
|
222
|
+
// ---- Free: Tencent ----
|
|
223
|
+
'tencent/hy3:free': {
|
|
224
|
+
id: 'tencent/hy3:free',
|
|
225
|
+
name: 'Tencent Hy3 (Free)',
|
|
226
|
+
provider: 'tencent',
|
|
227
|
+
contextWindow: 262144,
|
|
228
|
+
maxOutput: 262144,
|
|
229
|
+
inputPrice: 0,
|
|
230
|
+
outputPrice: 0,
|
|
231
|
+
supportsTools: true,
|
|
232
|
+
supportsVision: false,
|
|
233
|
+
supportsStreaming: true,
|
|
234
|
+
},
|
|
235
|
+
// ---- Free: Venice (Uncensored) ----
|
|
236
|
+
'cognitivecomputations/dolphin-mistral-24b-venice-edition:free': {
|
|
237
|
+
id: 'cognitivecomputations/dolphin-mistral-24b-venice-edition:free',
|
|
238
|
+
name: 'Dolphin Mistral 24B Uncensored (Free)',
|
|
239
|
+
provider: 'venice',
|
|
240
|
+
contextWindow: 32768,
|
|
241
|
+
maxOutput: 8192,
|
|
242
|
+
inputPrice: 0,
|
|
243
|
+
outputPrice: 0,
|
|
244
|
+
supportsTools: false,
|
|
245
|
+
supportsVision: false,
|
|
246
|
+
supportsStreaming: true,
|
|
247
|
+
},
|
|
248
|
+
// ---- Free: Router ----
|
|
249
|
+
'openrouter/free': {
|
|
250
|
+
id: 'openrouter/free',
|
|
251
|
+
name: 'Free Models Router',
|
|
252
|
+
provider: 'openrouter',
|
|
253
|
+
contextWindow: 200000,
|
|
254
|
+
maxOutput: 32768,
|
|
255
|
+
inputPrice: 0,
|
|
256
|
+
outputPrice: 0,
|
|
257
|
+
supportsTools: true,
|
|
258
|
+
supportsVision: true,
|
|
259
|
+
supportsStreaming: true,
|
|
260
|
+
},
|
|
261
|
+
// ================================================================
|
|
262
|
+
// 💎 PREMIUM MODELS
|
|
263
|
+
// ================================================================
|
|
264
|
+
// ---- Anthropic ----
|
|
265
|
+
'anthropic/claude-sonnet-4': {
|
|
266
|
+
id: 'anthropic/claude-sonnet-4',
|
|
267
|
+
name: 'Claude Sonnet 4',
|
|
268
|
+
provider: 'anthropic',
|
|
269
|
+
contextWindow: 200000,
|
|
270
|
+
maxOutput: 64000,
|
|
271
|
+
inputPrice: 3.0,
|
|
272
|
+
outputPrice: 15.0,
|
|
273
|
+
supportsTools: true,
|
|
274
|
+
supportsVision: true,
|
|
275
|
+
supportsStreaming: true,
|
|
276
|
+
},
|
|
277
|
+
'anthropic/claude-opus-4': {
|
|
278
|
+
id: 'anthropic/claude-opus-4',
|
|
279
|
+
name: 'Claude Opus 4',
|
|
280
|
+
provider: 'anthropic',
|
|
281
|
+
contextWindow: 200000,
|
|
282
|
+
maxOutput: 32000,
|
|
283
|
+
inputPrice: 15.0,
|
|
284
|
+
outputPrice: 75.0,
|
|
285
|
+
supportsTools: true,
|
|
286
|
+
supportsVision: true,
|
|
287
|
+
supportsStreaming: true,
|
|
288
|
+
},
|
|
289
|
+
'anthropic/claude-3.5-haiku': {
|
|
290
|
+
id: 'anthropic/claude-3.5-haiku',
|
|
291
|
+
name: 'Claude 3.5 Haiku',
|
|
292
|
+
provider: 'anthropic',
|
|
293
|
+
contextWindow: 200000,
|
|
294
|
+
maxOutput: 8192,
|
|
295
|
+
inputPrice: 0.80,
|
|
296
|
+
outputPrice: 4.0,
|
|
297
|
+
supportsTools: true,
|
|
298
|
+
supportsVision: true,
|
|
299
|
+
supportsStreaming: true,
|
|
300
|
+
},
|
|
301
|
+
// ---- Google ----
|
|
302
|
+
'google/gemini-2.5-pro': {
|
|
303
|
+
id: 'google/gemini-2.5-pro',
|
|
304
|
+
name: 'Gemini 2.5 Pro',
|
|
305
|
+
provider: 'google',
|
|
306
|
+
contextWindow: 1048576,
|
|
307
|
+
maxOutput: 65536,
|
|
308
|
+
inputPrice: 1.25,
|
|
309
|
+
outputPrice: 10.0,
|
|
310
|
+
supportsTools: true,
|
|
311
|
+
supportsVision: true,
|
|
312
|
+
supportsStreaming: true,
|
|
313
|
+
},
|
|
314
|
+
'google/gemini-2.5-flash': {
|
|
315
|
+
id: 'google/gemini-2.5-flash',
|
|
316
|
+
name: 'Gemini 2.5 Flash',
|
|
317
|
+
provider: 'google',
|
|
318
|
+
contextWindow: 1048576,
|
|
319
|
+
maxOutput: 65536,
|
|
320
|
+
inputPrice: 0.15,
|
|
321
|
+
outputPrice: 0.60,
|
|
322
|
+
supportsTools: true,
|
|
323
|
+
supportsVision: true,
|
|
324
|
+
supportsStreaming: true,
|
|
325
|
+
},
|
|
326
|
+
// ---- OpenAI ----
|
|
327
|
+
'openai/gpt-4o': {
|
|
328
|
+
id: 'openai/gpt-4o',
|
|
329
|
+
name: 'GPT-4o',
|
|
330
|
+
provider: 'openai',
|
|
331
|
+
contextWindow: 128000,
|
|
332
|
+
maxOutput: 16384,
|
|
333
|
+
inputPrice: 2.50,
|
|
334
|
+
outputPrice: 10.0,
|
|
335
|
+
supportsTools: true,
|
|
336
|
+
supportsVision: true,
|
|
337
|
+
supportsStreaming: true,
|
|
338
|
+
},
|
|
339
|
+
'openai/gpt-4o-mini': {
|
|
340
|
+
id: 'openai/gpt-4o-mini',
|
|
341
|
+
name: 'GPT-4o Mini',
|
|
342
|
+
provider: 'openai',
|
|
343
|
+
contextWindow: 128000,
|
|
344
|
+
maxOutput: 16384,
|
|
345
|
+
inputPrice: 0.15,
|
|
346
|
+
outputPrice: 0.60,
|
|
347
|
+
supportsTools: true,
|
|
348
|
+
supportsVision: true,
|
|
349
|
+
supportsStreaming: true,
|
|
350
|
+
},
|
|
351
|
+
'openai/o3': {
|
|
352
|
+
id: 'openai/o3',
|
|
353
|
+
name: 'OpenAI o3',
|
|
354
|
+
provider: 'openai',
|
|
355
|
+
contextWindow: 200000,
|
|
356
|
+
maxOutput: 100000,
|
|
357
|
+
inputPrice: 10.0,
|
|
358
|
+
outputPrice: 40.0,
|
|
359
|
+
supportsTools: true,
|
|
360
|
+
supportsVision: true,
|
|
361
|
+
supportsStreaming: true,
|
|
362
|
+
},
|
|
363
|
+
'openai/o4-mini': {
|
|
364
|
+
id: 'openai/o4-mini',
|
|
365
|
+
name: 'OpenAI o4-mini',
|
|
366
|
+
provider: 'openai',
|
|
367
|
+
contextWindow: 200000,
|
|
368
|
+
maxOutput: 100000,
|
|
369
|
+
inputPrice: 1.10,
|
|
370
|
+
outputPrice: 4.40,
|
|
371
|
+
supportsTools: true,
|
|
372
|
+
supportsVision: true,
|
|
373
|
+
supportsStreaming: true,
|
|
374
|
+
},
|
|
375
|
+
// ---- Meta ----
|
|
376
|
+
'meta-llama/llama-4-maverick': {
|
|
377
|
+
id: 'meta-llama/llama-4-maverick',
|
|
378
|
+
name: 'Llama 4 Maverick',
|
|
379
|
+
provider: 'meta',
|
|
380
|
+
contextWindow: 1048576,
|
|
381
|
+
maxOutput: 32768,
|
|
382
|
+
inputPrice: 0.20,
|
|
383
|
+
outputPrice: 0.60,
|
|
384
|
+
supportsTools: true,
|
|
385
|
+
supportsVision: true,
|
|
386
|
+
supportsStreaming: true,
|
|
387
|
+
},
|
|
388
|
+
// ---- DeepSeek ----
|
|
389
|
+
'deepseek/deepseek-r1': {
|
|
390
|
+
id: 'deepseek/deepseek-r1',
|
|
391
|
+
name: 'DeepSeek R1',
|
|
392
|
+
provider: 'deepseek',
|
|
393
|
+
contextWindow: 163840,
|
|
394
|
+
maxOutput: 32768,
|
|
395
|
+
inputPrice: 0.55,
|
|
396
|
+
outputPrice: 2.19,
|
|
397
|
+
supportsTools: true,
|
|
398
|
+
supportsVision: false,
|
|
399
|
+
supportsStreaming: true,
|
|
400
|
+
},
|
|
401
|
+
'deepseek/deepseek-chat': {
|
|
402
|
+
id: 'deepseek/deepseek-chat',
|
|
403
|
+
name: 'DeepSeek V3',
|
|
404
|
+
provider: 'deepseek',
|
|
405
|
+
contextWindow: 163840,
|
|
406
|
+
maxOutput: 32768,
|
|
407
|
+
inputPrice: 0.14,
|
|
408
|
+
outputPrice: 0.28,
|
|
409
|
+
supportsTools: true,
|
|
410
|
+
supportsVision: false,
|
|
411
|
+
supportsStreaming: true,
|
|
412
|
+
},
|
|
413
|
+
'deepseek/deepseek-chat-v3-0324': {
|
|
414
|
+
id: 'deepseek/deepseek-chat-v3-0324',
|
|
415
|
+
name: 'DeepSeek V3 0324',
|
|
416
|
+
provider: 'deepseek',
|
|
417
|
+
contextWindow: 163840,
|
|
418
|
+
maxOutput: 32768,
|
|
419
|
+
inputPrice: 0.14,
|
|
420
|
+
outputPrice: 0.28,
|
|
421
|
+
supportsTools: true,
|
|
422
|
+
supportsVision: false,
|
|
423
|
+
supportsStreaming: true,
|
|
424
|
+
},
|
|
425
|
+
// ---- Qwen ----
|
|
426
|
+
'qwen/qwen3-235b-a22b': {
|
|
427
|
+
id: 'qwen/qwen3-235b-a22b',
|
|
428
|
+
name: 'Qwen3 235B',
|
|
429
|
+
provider: 'qwen',
|
|
430
|
+
contextWindow: 131072,
|
|
431
|
+
maxOutput: 32768,
|
|
432
|
+
inputPrice: 0.22,
|
|
433
|
+
outputPrice: 0.88,
|
|
434
|
+
supportsTools: true,
|
|
435
|
+
supportsVision: false,
|
|
436
|
+
supportsStreaming: true,
|
|
437
|
+
},
|
|
438
|
+
// ---- Mistral ----
|
|
439
|
+
'mistralai/mistral-large-2411': {
|
|
440
|
+
id: 'mistralai/mistral-large-2411',
|
|
441
|
+
name: 'Mistral Large',
|
|
442
|
+
provider: 'mistral',
|
|
443
|
+
contextWindow: 131072,
|
|
444
|
+
maxOutput: 32768,
|
|
445
|
+
inputPrice: 2.0,
|
|
446
|
+
outputPrice: 6.0,
|
|
447
|
+
supportsTools: true,
|
|
448
|
+
supportsVision: true,
|
|
449
|
+
supportsStreaming: true,
|
|
450
|
+
},
|
|
451
|
+
};
|
|
452
|
+
export const MODEL_CATEGORIES = {
|
|
453
|
+
'free': [
|
|
454
|
+
'qwen/qwen3-coder:free',
|
|
455
|
+
'nvidia/nemotron-3-super-120b-a12b:free',
|
|
456
|
+
'nvidia/nemotron-3-ultra-550b-a55b:free',
|
|
457
|
+
'meta-llama/llama-3.3-70b-instruct:free',
|
|
458
|
+
'google/gemma-4-31b-it:free',
|
|
459
|
+
'cohere/north-mini-code:free',
|
|
460
|
+
'openai/gpt-oss-20b:free',
|
|
461
|
+
'nousresearch/hermes-3-llama-3.1-405b:free',
|
|
462
|
+
'tencent/hy3:free',
|
|
463
|
+
'qwen/qwen3-next-80b-a3b-instruct:free',
|
|
464
|
+
'poolside/laguna-m.1:free',
|
|
465
|
+
],
|
|
466
|
+
'free-vision': [
|
|
467
|
+
'google/gemma-4-31b-it:free',
|
|
468
|
+
'google/gemma-4-26b-a4b-it:free',
|
|
469
|
+
'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free',
|
|
470
|
+
'nvidia/nemotron-nano-12b-v2-vl:free',
|
|
471
|
+
],
|
|
472
|
+
'free-tools': [
|
|
473
|
+
'qwen/qwen3-coder:free',
|
|
474
|
+
'nvidia/nemotron-3-super-120b-a12b:free',
|
|
475
|
+
'nvidia/nemotron-3-ultra-550b-a55b:free',
|
|
476
|
+
'meta-llama/llama-3.3-70b-instruct:free',
|
|
477
|
+
'cohere/north-mini-code:free',
|
|
478
|
+
'poolside/laguna-m.1:free',
|
|
479
|
+
'poolside/laguna-xs-2.1:free',
|
|
480
|
+
'tencent/hy3:free',
|
|
481
|
+
],
|
|
482
|
+
'flagship': ['anthropic/claude-opus-4', 'openai/o3', 'google/gemini-2.5-pro'],
|
|
483
|
+
'balanced': ['anthropic/claude-sonnet-4', 'openai/gpt-4o', 'deepseek/deepseek-r1'],
|
|
484
|
+
'fast': ['anthropic/claude-3.5-haiku', 'openai/gpt-4o-mini', 'google/gemini-2.5-flash', 'deepseek/deepseek-chat'],
|
|
485
|
+
'open-source': ['meta-llama/llama-4-maverick', 'qwen/qwen3-235b-a22b', 'deepseek/deepseek-r1'],
|
|
486
|
+
};
|
|
487
|
+
/** Best free model for coding (with tool support) */
|
|
488
|
+
export const BEST_FREE_CODING_MODEL = 'qwen/qwen3-coder:free';
|
|
489
|
+
/** Best free model overall (largest context + tools) */
|
|
490
|
+
export const BEST_FREE_MODEL = 'nvidia/nemotron-3-super-120b-a12b:free';
|
|
491
|
+
/** Default free model for agents */
|
|
492
|
+
export const DEFAULT_FREE_MODEL = 'qwen/qwen3-coder:free';
|
|
493
|
+
export function getModel(id) {
|
|
494
|
+
return MODELS[id];
|
|
495
|
+
}
|
|
496
|
+
export function isFreeModel(modelId) {
|
|
497
|
+
const model = MODELS[modelId];
|
|
498
|
+
return model ? model.inputPrice === 0 && model.outputPrice === 0 : modelId.includes(':free');
|
|
499
|
+
}
|
|
500
|
+
export function calculateCost(modelId, inputTokens, outputTokens) {
|
|
501
|
+
const model = MODELS[modelId];
|
|
502
|
+
if (!model)
|
|
503
|
+
return 0;
|
|
504
|
+
if (model.inputPrice === 0 && model.outputPrice === 0)
|
|
505
|
+
return 0;
|
|
506
|
+
return (inputTokens / 1_000_000) * model.inputPrice + (outputTokens / 1_000_000) * model.outputPrice;
|
|
507
|
+
}
|
|
508
|
+
export function getFreeModels() {
|
|
509
|
+
return Object.values(MODELS).filter(m => m.inputPrice === 0 && m.outputPrice === 0);
|
|
510
|
+
}
|
|
511
|
+
export function getFreeModelsWithTools() {
|
|
512
|
+
return Object.values(MODELS).filter(m => m.inputPrice === 0 && m.outputPrice === 0 && m.supportsTools);
|
|
513
|
+
}
|
|
514
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ToolCall, ToolDefinition } from '../core/types.js';
|
|
2
|
+
export interface OllamaConfig {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
defaultModel: string;
|
|
5
|
+
timeout: number;
|
|
6
|
+
maxRetries: number;
|
|
7
|
+
temperature?: number;
|
|
8
|
+
maxTokens?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const DEFAULT_OLLAMA_CONFIG: OllamaConfig;
|
|
11
|
+
export interface OllamaModel {
|
|
12
|
+
name: string;
|
|
13
|
+
size: number;
|
|
14
|
+
modified_at: string;
|
|
15
|
+
details: {
|
|
16
|
+
format: string;
|
|
17
|
+
family: string;
|
|
18
|
+
parameter_size: string;
|
|
19
|
+
quantization_level: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface OllamaChatResponse {
|
|
23
|
+
content: string;
|
|
24
|
+
model: string;
|
|
25
|
+
totalDuration: number;
|
|
26
|
+
evalCount: number;
|
|
27
|
+
evalDuration: number;
|
|
28
|
+
}
|
|
29
|
+
export interface OllamaStreamCallbacks {
|
|
30
|
+
onToken?: (token: string) => void;
|
|
31
|
+
onToolCall?: (toolCall: ToolCall) => void;
|
|
32
|
+
onComplete?: (response: OllamaChatResponse) => void;
|
|
33
|
+
onError?: (error: Error) => void;
|
|
34
|
+
}
|
|
35
|
+
type ProviderMode = 'ollama' | 'openai-compatible';
|
|
36
|
+
export declare class OllamaProviderError extends Error {
|
|
37
|
+
readonly statusCode?: number | undefined;
|
|
38
|
+
readonly body?: string | undefined;
|
|
39
|
+
constructor(message: string, statusCode?: number | undefined, body?: string | undefined);
|
|
40
|
+
}
|
|
41
|
+
export declare class OllamaTimeoutError extends OllamaProviderError {
|
|
42
|
+
constructor(timeout: number);
|
|
43
|
+
}
|
|
44
|
+
export declare class OllamaConnectionError extends OllamaProviderError {
|
|
45
|
+
constructor(baseUrl: string, cause?: unknown);
|
|
46
|
+
}
|
|
47
|
+
export declare class OllamaProvider {
|
|
48
|
+
private config;
|
|
49
|
+
private mode;
|
|
50
|
+
constructor(config?: Partial<OllamaConfig>);
|
|
51
|
+
/**
|
|
52
|
+
* Chat completion with optional streaming.
|
|
53
|
+
*
|
|
54
|
+
* When callbacks are provided and stream is not explicitly false,
|
|
55
|
+
* the response is streamed token-by-token via the callbacks.
|
|
56
|
+
*/
|
|
57
|
+
chat(messages: Array<{
|
|
58
|
+
role: string;
|
|
59
|
+
content: string;
|
|
60
|
+
toolCalls?: any[];
|
|
61
|
+
toolCallId?: string;
|
|
62
|
+
}>, options?: {
|
|
63
|
+
model?: string;
|
|
64
|
+
tools?: ToolDefinition[];
|
|
65
|
+
stream?: boolean;
|
|
66
|
+
temperature?: number;
|
|
67
|
+
maxTokens?: number;
|
|
68
|
+
}, callbacks?: OllamaStreamCallbacks): Promise<OllamaChatResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* List locally available models.
|
|
71
|
+
*/
|
|
72
|
+
listModels(): Promise<OllamaModel[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Health check -- returns true if the endpoint is reachable.
|
|
75
|
+
*/
|
|
76
|
+
isAvailable(): Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Generate embeddings for a prompt using the Ollama native API.
|
|
79
|
+
* Not supported on OpenAI-compatible endpoints through this method.
|
|
80
|
+
*/
|
|
81
|
+
generateEmbeddings(prompt: string, model?: string): Promise<number[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Pull a model from the Ollama registry.
|
|
84
|
+
* Returns true on success.
|
|
85
|
+
*/
|
|
86
|
+
pullModel(name: string): Promise<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* Estimate token count for a text string.
|
|
89
|
+
*
|
|
90
|
+
* Uses a heuristic based on the model family. Ollama does not expose
|
|
91
|
+
* a tokenization endpoint, so this is an approximation:
|
|
92
|
+
* - For most models: ~4 characters per token (GPT-style)
|
|
93
|
+
* - For CJK-heavy text: ~2 characters per token
|
|
94
|
+
* - A slight overhead is added for special tokens / formatting.
|
|
95
|
+
*/
|
|
96
|
+
estimateTokens(text: string): number;
|
|
97
|
+
/**
|
|
98
|
+
* Get the current configuration (read-only copy).
|
|
99
|
+
*/
|
|
100
|
+
getConfig(): OllamaConfig;
|
|
101
|
+
/**
|
|
102
|
+
* Update configuration. Merges with existing config.
|
|
103
|
+
* Re-detects provider mode if baseUrl changes.
|
|
104
|
+
*/
|
|
105
|
+
updateConfig(updates: Partial<OllamaConfig>): void;
|
|
106
|
+
private chatOllama;
|
|
107
|
+
/**
|
|
108
|
+
* Stream an Ollama native /api/chat response (NDJSON).
|
|
109
|
+
*/
|
|
110
|
+
private streamOllamaChat;
|
|
111
|
+
/**
|
|
112
|
+
* Normalize a non-streaming Ollama /api/chat response.
|
|
113
|
+
*/
|
|
114
|
+
private normalizeOllamaResponse;
|
|
115
|
+
private chatOpenAICompatible;
|
|
116
|
+
/**
|
|
117
|
+
* Stream an OpenAI-compatible /v1/chat/completions response (SSE).
|
|
118
|
+
*/
|
|
119
|
+
private streamOpenAIChat;
|
|
120
|
+
/**
|
|
121
|
+
* Non-streaming OpenAI-compatible /v1/chat/completions response.
|
|
122
|
+
*/
|
|
123
|
+
private nonStreamOpenAIChat;
|
|
124
|
+
private listModelsOllama;
|
|
125
|
+
private listModelsOpenAICompatible;
|
|
126
|
+
/**
|
|
127
|
+
* Detect whether the configured endpoint is native Ollama or an
|
|
128
|
+
* OpenAI-compatible server (LM Studio, etc.).
|
|
129
|
+
*
|
|
130
|
+
* Strategy: try the Ollama-specific GET /api/version endpoint. If it
|
|
131
|
+
* responds with a JSON object containing a "version" field, we treat
|
|
132
|
+
* it as native Ollama. Otherwise, fall back to OpenAI-compatible mode.
|
|
133
|
+
*/
|
|
134
|
+
private detectMode;
|
|
135
|
+
/**
|
|
136
|
+
* Get the current provider mode.
|
|
137
|
+
*/
|
|
138
|
+
getMode(): ProviderMode;
|
|
139
|
+
/**
|
|
140
|
+
* Fetch wrapper with timeout and error handling.
|
|
141
|
+
*/
|
|
142
|
+
private fetch;
|
|
143
|
+
/**
|
|
144
|
+
* Typed request helper for non-streaming JSON endpoints.
|
|
145
|
+
*/
|
|
146
|
+
private request;
|
|
147
|
+
private convertMessages;
|
|
148
|
+
private convertTools;
|
|
149
|
+
private isRetryable;
|
|
150
|
+
private sleep;
|
|
151
|
+
}
|
|
152
|
+
export {};
|
|
153
|
+
//# sourceMappingURL=ollama.d.ts.map
|