@vierratale/ai 0.1.0-beta.8 → 0.1.0-beta.9
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/README.md +120 -16
- package/bin/vierrataleai.js +74 -1
- package/package.json +7 -1
- package/src/catalog.js +78 -49
- package/src/cli.js +864 -103
- package/src/cmd/agent.js +1695 -0
- package/src/cmd/executor.js +257 -0
- package/src/cmd/tools.js +131 -0
- package/src/config.js +24 -10
- package/src/index.js +1 -0
- package/src/installer.js +130 -2
- package/src/prompts/system.json +2 -2
- package/src/prompts/system.md +42 -0
- package/src/providers/anthropic.js +65 -34
- package/src/providers/base.js +10 -0
- package/src/providers/cortex.js +223 -40
- package/src/providers/gemini.js +62 -31
- package/src/providers/openai.js +64 -33
- package/src/session.js +195 -15
- package/src/ui/branding.js +1 -1
- package/src/ui/chatbox.js +271 -0
- package/src/utils/filewriter.js +97 -0
- package/src/utils/intents.js +61 -1
- package/src/utils/logger.js +67 -0
- package/src/utils/math.js +142 -0
- package/build.sh +0 -17
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ vierrataleai --provider cortex # Use local models
|
|
|
23
23
|
vierrataleai --provider openai # Use cloud models (OpenAI)
|
|
24
24
|
vierrataleai --provider anthropic # Use cloud models (Claude)
|
|
25
25
|
vierrataleai --provider gemini # Use cloud models (Gemini)
|
|
26
|
-
vierrataleai --model
|
|
26
|
+
vierrataleai --model VRTL-6.pro # Use specific model
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Models
|
|
@@ -32,23 +32,27 @@ Local models run through the **Cortex** engine:
|
|
|
32
32
|
|
|
33
33
|
| Model | Backend |
|
|
34
34
|
|-------|---------|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
35
|
+
| VRTL-1.lite | qwen3:0.6b |
|
|
36
|
+
| VRTL-2.fast | gemma3:1b |
|
|
37
|
+
| VRTL-3.small | llama3.2:1b |
|
|
38
|
+
| VRTL-4.balanced | qwen2.5:1.5b |
|
|
39
|
+
| VRTL-5.plus | qwen3:1.7b |
|
|
40
|
+
| VRTL-6.pro | qwen2.5:3b |
|
|
41
41
|
|
|
42
42
|
Cloud models are available when the matching provider + API key is configured:
|
|
43
43
|
|
|
44
44
|
| Model | Backend |
|
|
45
45
|
|-------|---------|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
46
|
+
| VRTL-7.cloud-mini | gpt-4o-mini (OpenAI) |
|
|
47
|
+
| VRTL-8.cloud | gpt-4o (OpenAI) |
|
|
48
|
+
| VRTL-9.cloud-fast | claude-3-5-haiku-20241022 (Anthropic) |
|
|
49
|
+
| VRTL-10.cloud-pro | claude-sonnet-4-20250514 (Anthropic) |
|
|
50
|
+
| VRTL-11.cloud-lite | gemini-2.0-flash (Gemini) |
|
|
51
|
+
| VRTL-12.cloud-plus | gemini-1.5-pro (Gemini) |
|
|
52
|
+
|
|
53
|
+
> Legacy `vierratale-*` model names (e.g. `vierratale-fast`, `vierratale-cloud`)
|
|
54
|
+
|
|
55
|
+
> still work and are stored as VRTL names.
|
|
52
56
|
|
|
53
57
|
## Commands
|
|
54
58
|
|
|
@@ -58,6 +62,8 @@ Cloud models are available when the matching provider + API key is configured:
|
|
|
58
62
|
- `/models` - List available models
|
|
59
63
|
- `/system [text]` - Set a custom system prompt / persona
|
|
60
64
|
- `/search <query>` - Search the web and summarize with AI
|
|
65
|
+
- `/fetch <url>` - Open a link and summarize its content
|
|
66
|
+
- `/log [n|path]` - Show the last n log entries (default 30) or the log file path
|
|
61
67
|
- `/clear` - Clear screen
|
|
62
68
|
- `/new` - Start a new conversation (clear memory)
|
|
63
69
|
- `/quit` - Exit
|
|
@@ -65,14 +71,112 @@ Cloud models are available when the matching provider + API key is configured:
|
|
|
65
71
|
## Smart Search
|
|
66
72
|
|
|
67
73
|
Asking a question (Who/What/When/Where/Why/How...?) automatically searches the
|
|
68
|
-
web and summarizes the results with AI.
|
|
74
|
+
web and summarizes the results with AI. Bare mentions of specific topics also
|
|
75
|
+
trigger a search — e.g. `timun mas from indonesia`, `the legend of roro
|
|
76
|
+
jonggrang`. For example:
|
|
69
77
|
|
|
70
78
|
```
|
|
71
79
|
> Who is Cristiano Ronaldo?
|
|
80
|
+
> timun mas from indonesia
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
triggers a live web search and answers from the results. If no web results come
|
|
84
|
+
back, the AI answers from its own knowledge instead of going quiet. Use
|
|
85
|
+
`/search <query>` to force a search explicitly.
|
|
86
|
+
|
|
87
|
+
Story requests about any subject work the same way — no matter how they're
|
|
88
|
+
phrased (`a story about X`, `the legend of X`, `tell me about X`, `narrate the
|
|
89
|
+
tale of X`, `write X into a txt file`). The subject is pulled out of the
|
|
90
|
+
sentence, searched first, and the reply is saved to a `<subject>.txt` file.
|
|
91
|
+
A generic `tell me a story` (no subject) is told directly from the model — and
|
|
92
|
+
is also saved to a `.txt` file.
|
|
93
|
+
|
|
94
|
+
Greetings (`hi`, `hello`, `hey`, `good morning`, ...) are answered instantly
|
|
95
|
+
with a short fixed reply — they never reach the model.
|
|
96
|
+
|
|
97
|
+
## Writing Files
|
|
98
|
+
|
|
99
|
+
Ask the AI to create code, configs, scripts, web pages, or a whole project. When it
|
|
100
|
+
responds, it lists each file with a `FILE: <path>` header followed by a code
|
|
101
|
+
fence (and `FOLDER: <path>` for empty folders) — just running in the chat writes
|
|
102
|
+
them to your disk in the current working directory. Any file type is supported,
|
|
103
|
+
including JSON config files and HTML pages. Nested folders are created automatically, existing
|
|
104
|
+
files are skipped unless you confirm to overwrite, and nothing is ever written
|
|
105
|
+
outside the working directory.
|
|
106
|
+
|
|
107
|
+
If the AI ever answers with the code but forgets the `FILE:` header (or writes an
|
|
108
|
+
HTML page without a fence), the assistant rescues it: any `FILE: <path>` line in
|
|
109
|
+
the reply is honored even without a fence, otherwise the request is used to
|
|
110
|
+
infer a filename and the code block is saved anyway. Filename inference covers
|
|
111
|
+
many formats, not just web pages:
|
|
112
|
+
|
|
113
|
+
| Request contains… | Saved as |
|
|
114
|
+
|--------------------|----------|
|
|
115
|
+
| `html` / `webpage` / `website` / `page` | `index.html` |
|
|
116
|
+
| `css` | `style.css` |
|
|
117
|
+
| `python` / `py` | `script.py` |
|
|
118
|
+
| `flask` / `django` / `fastapi` / `streamlit` / `app` | `app.py` |
|
|
119
|
+
| `javascript` / `js` / `script` | `script.js` |
|
|
120
|
+
| `typescript` / `ts` | `script.ts` |
|
|
121
|
+
| `bash` / `zsh` / `shell` | `script.sh` |
|
|
122
|
+
| `json` / `yaml` / `yml` / `csv` / `sql` | `output.json` / `.yml` / `.csv` / `.sql` |
|
|
123
|
+
|
|
124
|
+
When the request has no hint at all, the fence language in the reply picks the
|
|
125
|
+
name (```python → `script.py`, ```css → `style.css`, …). Saving also kicks in
|
|
126
|
+
whenever the reply itself contains a `FILE:`/`FOLDER:` line, or when a reply is
|
|
127
|
+
basically just one substantial code block, even if the request phrasing wasn't
|
|
128
|
+
matched.
|
|
129
|
+
|
|
130
|
+
For file requests, a short format instruction is silently attached to your
|
|
131
|
+
message so the model emits complete `FILE:` blocks with closed fences. And if
|
|
132
|
+
the model ever answers a file request *without any code* (free-style prose,
|
|
133
|
+
interrupted before a fence), nothing is saved and you get a notice telling you
|
|
134
|
+
to ask again — a `.py` file full of chatter is never created.
|
|
135
|
+
|
|
136
|
+
Example of what the AI emits:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
FILE: config.json
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"name": "my-app",
|
|
143
|
+
"port": 3000
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
FILE: index.html
|
|
148
|
+
```html
|
|
149
|
+
<!doctype html>
|
|
150
|
+
<html><body>Hello</body></html>
|
|
72
151
|
```
|
|
73
152
|
|
|
74
|
-
|
|
75
|
-
|
|
153
|
+
FILE: src/hello.js
|
|
154
|
+
```js
|
|
155
|
+
console.log('Hello VierrataleAI');
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Chat UI
|
|
159
|
+
|
|
160
|
+
The chat runs in a clean, minimal full-screen interface: your turns are labelled
|
|
161
|
+
`You` and the assistant's `AI`, with plain wrapped text in between. Code blocks
|
|
162
|
+
are the exception — they render inside a green bordered box with their language
|
|
163
|
+
tag (`╭─ html ─╮`), so files stand out at a glance. The latest reply stays pinned
|
|
164
|
+
to the bottom of the terminal while it streams in (no screen flashing), and
|
|
165
|
+
internal search/fetch context stays hidden.
|
|
166
|
+
|
|
167
|
+
## Automatic Logging
|
|
168
|
+
|
|
169
|
+
Everything that happens in a session is written automatically to a per-day log
|
|
170
|
+
file in `~/.config/vierrataleai/logs/` (e.g. `vierrataleai-20260101.log`):
|
|
171
|
+
app/session start, every user message, every AI reply, every file write or
|
|
172
|
+
skip, and any errors — with a timestamp. The logs are plain text and safe to
|
|
173
|
+
grep. To inspect them from inside the chat:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
/log # show the last 30 entries
|
|
177
|
+
/log 100 # show the last 100 entries
|
|
178
|
+
/log path # print the log file path
|
|
179
|
+
```
|
|
76
180
|
|
|
77
181
|
## Conversation Memory
|
|
78
182
|
|
package/bin/vierrataleai.js
CHANGED
|
@@ -1,3 +1,76 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// VierrataleAI launcher + installer.
|
|
3
|
+
//
|
|
4
|
+
// Running without flags starts the assistant (same as before).
|
|
5
|
+
// Running with --install (or --setup / install) installs the engine + model and
|
|
6
|
+
// creates a global "vierrataleai" command, then starts the assistant.
|
|
7
|
+
//
|
|
8
|
+
// Installation progress is always the fake animated bar — real engine/model
|
|
9
|
+
// output is deliberately hidden so first-run feels quick and clean.
|
|
2
10
|
import { run } from '../src/cli.js';
|
|
3
|
-
|
|
11
|
+
import { Installer } from '../src/installer.js';
|
|
12
|
+
import { Config } from '../src/config.js';
|
|
13
|
+
import { Branding } from '../src/ui/branding.js';
|
|
14
|
+
import { Terminal } from '../src/ui/terminal.js';
|
|
15
|
+
|
|
16
|
+
const C = Branding.colors;
|
|
17
|
+
|
|
18
|
+
const INSTALL_STEPS = [
|
|
19
|
+
'Checking the AI engine',
|
|
20
|
+
'Installing dependencies',
|
|
21
|
+
'Downloading the model',
|
|
22
|
+
'Linking the vierrataleai command',
|
|
23
|
+
'Optimizing for this device',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function delay(ms) {
|
|
27
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function fakeProgress(steps, work) {
|
|
31
|
+
const frames = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
|
32
|
+
let i = 0;
|
|
33
|
+
const tty = process.stdout.isTTY;
|
|
34
|
+
const timer = setInterval(() => {
|
|
35
|
+
if (!tty) return;
|
|
36
|
+
i++;
|
|
37
|
+
const stage = steps[Math.floor((i / 10) % steps.length)];
|
|
38
|
+
const pct = String(8 + ((i * 7) % 85)).padStart(3, ' ');
|
|
39
|
+
const bar = frames[i % frames.length];
|
|
40
|
+
const fillLen = 1 + (i % 20);
|
|
41
|
+
const fill = '█'.repeat(fillLen) + '░'.repeat(Math.max(0, 20 - fillLen));
|
|
42
|
+
process.stdout.write(`\r ${C.accent}${bar}${C.reset} ${C.bold}${pct}%${C.reset} ${C.dim}${stage}${C.reset} [${C.accent}${fill}${C.reset}]`);
|
|
43
|
+
}, 110);
|
|
44
|
+
try {
|
|
45
|
+
return await work;
|
|
46
|
+
} finally {
|
|
47
|
+
clearInterval(timer);
|
|
48
|
+
if (tty) process.stdout.write('\r\x1b[2K');
|
|
49
|
+
process.stdout.write(` ${C.success}✔${C.reset} ${C.bold}${C.dim}100%${C.reset} ${C.dim}Ready${C.reset}\n`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function main() {
|
|
54
|
+
const args = process.argv.slice(2);
|
|
55
|
+
const doInstall = args.includes('--install') || args.includes('--setup') || args.includes('install');
|
|
56
|
+
|
|
57
|
+
Config.load();
|
|
58
|
+
|
|
59
|
+
if (doInstall) {
|
|
60
|
+
console.log(`\n ${C.bold}${C.primary}${Branding.APP_NAME} ${Branding.VERSION}${C.reset} ${C.dim}— installer${C.reset}\n`);
|
|
61
|
+
const result = await fakeProgress(INSTALL_STEPS, Installer.install());
|
|
62
|
+
if (!result.command) {
|
|
63
|
+
Terminal.printInfo('Could not create a global "vierrataleai" command; run it via the bin script.');
|
|
64
|
+
} else {
|
|
65
|
+
Terminal.printSuccess(`Engine + model installed; "vierrataleai" command available at ${result.command}`);
|
|
66
|
+
}
|
|
67
|
+
console.log();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return run();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
main().catch((err) => {
|
|
74
|
+
console.error(err);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vierratale/ai",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"description": "VierrataleAI - Intelligent terminal assistant",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"bin/",
|
|
8
|
+
"scripts/",
|
|
9
|
+
"src/",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
6
12
|
"bin": {
|
|
7
13
|
"vierrataleai": "./bin/vierrataleai.js"
|
|
8
14
|
},
|
package/src/catalog.js
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
|
+
// Model catalog. Display names use the countable VRTL branding:
|
|
2
|
+
// VRTL-<number>.<word>, e.g. VRTL-2.fast, VRTL-7.cloud-mini.
|
|
1
3
|
const MODELS = {
|
|
2
|
-
'qwen3:0.6b': '
|
|
3
|
-
'gemma3:1b': '
|
|
4
|
-
'llama3.2:1b': '
|
|
5
|
-
'qwen2.5:1.5b': '
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'gpt-4o': '
|
|
10
|
-
'
|
|
11
|
-
'claude-
|
|
12
|
-
'
|
|
13
|
-
'gemini-
|
|
4
|
+
'qwen3:0.6b': 'VRTL-1.lite',
|
|
5
|
+
'gemma3:1b': 'VRTL-2.fast',
|
|
6
|
+
'llama3.2:1b': 'VRTL-3.small',
|
|
7
|
+
'qwen2.5:1.5b': 'VRTL-4.balanced',
|
|
8
|
+
'qwen2.5-coder:1.5b': 'VRTL-4.coder',
|
|
9
|
+
'qwen3:1.7b': 'VRTL-5.plus',
|
|
10
|
+
'qwen2.5:3b': 'VRTL-6.pro',
|
|
11
|
+
'gpt-4o-mini': 'VRTL-7.cloud-mini',
|
|
12
|
+
'gpt-4o': 'VRTL-8.cloud',
|
|
13
|
+
'claude-3-5-haiku-20241022': 'VRTL-9.cloud-fast',
|
|
14
|
+
'claude-sonnet-4-20250514': 'VRTL-10.cloud-pro',
|
|
15
|
+
'gemini-2.0-flash': 'VRTL-11.cloud-lite',
|
|
16
|
+
'gemini-1.5-pro': 'VRTL-12.cloud-plus',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// Older `vierratale-<word>` names, accepted everywhere for backwards
|
|
20
|
+
// compatibility (existing config files may still contain them).
|
|
21
|
+
const LEGACY_DISPLAY = {
|
|
22
|
+
'vierratale-lite': 'VRTL-1.lite',
|
|
23
|
+
'vierratale-fast': 'VRTL-2.fast',
|
|
24
|
+
'vierratale-small': 'VRTL-3.small',
|
|
25
|
+
'vierratale-balanced': 'VRTL-4.balanced',
|
|
26
|
+
'vierratale-plus': 'VRTL-5.plus',
|
|
27
|
+
'vierratale-pro': 'VRTL-6.pro',
|
|
28
|
+
'vierratale-cloud-mini': 'VRTL-7.cloud-mini',
|
|
29
|
+
'vierratale-cloud': 'VRTL-8.cloud',
|
|
30
|
+
'vierratale-cloud-fast': 'VRTL-9.cloud-fast',
|
|
31
|
+
'vierratale-cloud-pro': 'VRTL-10.cloud-pro',
|
|
32
|
+
'vierratale-cloud-lite': 'VRTL-11.cloud-lite',
|
|
33
|
+
'vierratale-cloud-plus': 'VRTL-12.cloud-plus',
|
|
14
34
|
};
|
|
15
35
|
|
|
16
36
|
const REVERSE = Object.fromEntries(
|
|
@@ -18,26 +38,48 @@ const REVERSE = Object.fromEntries(
|
|
|
18
38
|
);
|
|
19
39
|
|
|
20
40
|
const LOCAL_MODELS = [
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
41
|
+
'VRTL-1.lite',
|
|
42
|
+
'VRTL-2.fast',
|
|
43
|
+
'VRTL-3.small',
|
|
44
|
+
'VRTL-4.balanced',
|
|
45
|
+
'VRTL-4.coder',
|
|
46
|
+
'VRTL-5.plus',
|
|
47
|
+
'VRTL-6.pro',
|
|
27
48
|
];
|
|
28
49
|
|
|
29
50
|
const CLOUD_MODELS = [
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
51
|
+
'VRTL-7.cloud-mini',
|
|
52
|
+
'VRTL-8.cloud',
|
|
53
|
+
'VRTL-9.cloud-fast',
|
|
54
|
+
'VRTL-10.cloud-pro',
|
|
55
|
+
'VRTL-11.cloud-lite',
|
|
56
|
+
'VRTL-12.cloud-plus',
|
|
36
57
|
];
|
|
37
58
|
|
|
59
|
+
const TIERS = {
|
|
60
|
+
'VRTL-1.lite': 'minimal',
|
|
61
|
+
'VRTL-2.fast': 'fast',
|
|
62
|
+
'VRTL-3.small': 'small',
|
|
63
|
+
'VRTL-4.balanced': 'balanced',
|
|
64
|
+
'VRTL-4.coder': 'coder',
|
|
65
|
+
'VRTL-5.plus': 'plus',
|
|
66
|
+
'VRTL-6.pro': 'professional',
|
|
67
|
+
'VRTL-7.cloud-mini': 'cloud-mini',
|
|
68
|
+
'VRTL-8.cloud': 'cloud',
|
|
69
|
+
'VRTL-9.cloud-fast': 'cloud-fast',
|
|
70
|
+
'VRTL-10.cloud-pro': 'cloud-pro',
|
|
71
|
+
'VRTL-11.cloud-lite': 'cloud-lite',
|
|
72
|
+
'VRTL-12.cloud-plus': 'cloud-plus',
|
|
73
|
+
};
|
|
74
|
+
|
|
38
75
|
export const Catalog = {
|
|
76
|
+
// Map any known name (new or legacy) to the current VRTL display name.
|
|
77
|
+
normalize(displayName) {
|
|
78
|
+
return LEGACY_DISPLAY[displayName] || displayName;
|
|
79
|
+
},
|
|
80
|
+
|
|
39
81
|
getRealModel(displayName) {
|
|
40
|
-
return REVERSE[displayName] || displayName;
|
|
82
|
+
return REVERSE[this.normalize(displayName)] || displayName;
|
|
41
83
|
},
|
|
42
84
|
|
|
43
85
|
getDisplayName(realModel) {
|
|
@@ -57,23 +99,23 @@ export const Catalog = {
|
|
|
57
99
|
},
|
|
58
100
|
|
|
59
101
|
getDefaultModel() {
|
|
60
|
-
return '
|
|
102
|
+
return 'VRTL-2.fast';
|
|
61
103
|
},
|
|
62
104
|
|
|
63
105
|
getDefaultCloudModel() {
|
|
64
|
-
return '
|
|
106
|
+
return 'VRTL-7.cloud-mini';
|
|
65
107
|
},
|
|
66
108
|
|
|
67
109
|
isLocalModel(displayName) {
|
|
68
|
-
return LOCAL_MODELS.includes(displayName);
|
|
110
|
+
return LOCAL_MODELS.includes(this.normalize(displayName));
|
|
69
111
|
},
|
|
70
112
|
|
|
71
113
|
isCloudModel(displayName) {
|
|
72
|
-
return CLOUD_MODELS.includes(displayName);
|
|
114
|
+
return CLOUD_MODELS.includes(this.normalize(displayName));
|
|
73
115
|
},
|
|
74
116
|
|
|
75
117
|
getVendorForCloudModel(displayName) {
|
|
76
|
-
const real = REVERSE[displayName];
|
|
118
|
+
const real = REVERSE[this.normalize(displayName)];
|
|
77
119
|
if (real && real.startsWith('claude-')) return 'anthropic';
|
|
78
120
|
if (real && real.startsWith('gemini-')) return 'gemini';
|
|
79
121
|
if (real && real.startsWith('gpt-')) return 'openai';
|
|
@@ -81,30 +123,17 @@ export const Catalog = {
|
|
|
81
123
|
},
|
|
82
124
|
|
|
83
125
|
getModelInfo(displayName) {
|
|
84
|
-
const
|
|
126
|
+
const name = this.normalize(displayName);
|
|
127
|
+
const real = REVERSE[name];
|
|
85
128
|
if (!real) return null;
|
|
86
|
-
const isLocal = LOCAL_MODELS.includes(
|
|
87
|
-
const isCloud = CLOUD_MODELS.includes(
|
|
88
|
-
const tiers = {
|
|
89
|
-
'vierratale-lite': 'minimal',
|
|
90
|
-
'vierratale-fast': 'fast',
|
|
91
|
-
'vierratale-small': 'small',
|
|
92
|
-
'vierratale-balanced': 'balanced',
|
|
93
|
-
'vierratale-plus': 'plus',
|
|
94
|
-
'vierratale-pro': 'professional',
|
|
95
|
-
'vierratale-cloud-mini': 'cloud-mini',
|
|
96
|
-
'vierratale-cloud': 'cloud',
|
|
97
|
-
'vierratale-cloud-fast': 'cloud-fast',
|
|
98
|
-
'vierratale-cloud-pro': 'cloud-pro',
|
|
99
|
-
'vierratale-cloud-lite': 'cloud-lite',
|
|
100
|
-
'vierratale-cloud-plus': 'cloud-plus',
|
|
101
|
-
};
|
|
129
|
+
const isLocal = LOCAL_MODELS.includes(name);
|
|
130
|
+
const isCloud = CLOUD_MODELS.includes(name);
|
|
102
131
|
return {
|
|
103
132
|
displayName,
|
|
104
133
|
realModel: real,
|
|
105
134
|
isLocal,
|
|
106
135
|
isCloud,
|
|
107
|
-
tier:
|
|
136
|
+
tier: TIERS[name] || 'unknown',
|
|
108
137
|
};
|
|
109
138
|
},
|
|
110
|
-
};
|
|
139
|
+
};
|