@thinkingos/vsl-mcp-server 1.3.8 → 1.3.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 +135 -134
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
# @thinkingos/vsl-mcp-server
|
|
2
2
|
|
|
3
|
-
VSL MCP Server —
|
|
3
|
+
VSL MCP Server — integration of Visual Scene Language with AI agents via [Model Context Protocol](https://modelcontextprotocol.io/) (MCP 2025-11-25).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Enables AI agents (Claude Desktop, Cline, TaoCoder) to interact with web pages through VSL semantic structure: read pages, execute actions, and receive change diffs.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Quick Installation (one command)
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
# Via npx — automatically downloads the package and runs interactive setup:
|
|
11
11
|
npx -p @thinkingos/vsl-mcp-server mcp-server-setup
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
3.
|
|
18
|
-
4.
|
|
19
|
-
##
|
|
14
|
+
The setup script will help you:
|
|
15
|
+
1. Check Node.js >= 18
|
|
16
|
+
2. Install Playwright (optional, for browser tools)
|
|
17
|
+
3. Save configuration to `~/.vsl/config.json`
|
|
18
|
+
4. Get instructions for connecting to an agent
|
|
19
|
+
## Installation from Source (for developers)
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### From the monorepo root
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# Clone the repository
|
|
24
24
|
git clone <repo-url> visual-scene-language
|
|
25
25
|
cd visual-scene-language
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# Install dependencies
|
|
28
28
|
npm install
|
|
29
29
|
|
|
30
|
-
#
|
|
30
|
+
# Build the package
|
|
31
31
|
cd packages/mcp-server
|
|
32
32
|
npm run build
|
|
33
|
-
###
|
|
33
|
+
### Interactive Setup (recommended)
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# From the monorepo root:
|
|
37
37
|
node packages/mcp-server/bin/setup.js
|
|
38
38
|
|
|
39
|
-
#
|
|
39
|
+
# Or from the packages/mcp-server directory:
|
|
40
40
|
npm run setup
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
1.
|
|
45
|
-
2.
|
|
46
|
-
3.
|
|
47
|
-
4.
|
|
43
|
+
The setup script will help you:
|
|
44
|
+
1. Check Node.js >= 18
|
|
45
|
+
2. Install Playwright (optional, for browser tools)
|
|
46
|
+
3. Save configuration to `~/.vsl/config.json`
|
|
47
|
+
4. Get instructions for connecting to an agent
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Configuration
|
|
50
50
|
|
|
51
|
-
### API
|
|
51
|
+
### API Keys (env vars)
|
|
52
52
|
|
|
53
|
-
#
|
|
53
|
+
# At least one provider for vision-backend (element classification)
|
|
54
54
|
export OPENAI_API_KEY="sk-..." # gpt-6-luna
|
|
55
55
|
export ANTHROPIC_API_KEY="sk-ant-..." # claude-haiku-4-5
|
|
56
56
|
|
|
57
|
-
#
|
|
57
|
+
# Or a custom provider (any OpenAI-compatible endpoint):
|
|
58
58
|
export VSL_VISION_PROVIDER="custom"
|
|
59
59
|
export VSL_VISION_BASE_URL="https://api.together.xyz/v1"
|
|
60
60
|
export VSL_VISION_API_KEY="your-key"
|
|
61
61
|
export VSL_VISION_MODEL="meta-llama/Llama-Vision"
|
|
62
|
-
###
|
|
62
|
+
### Configuration File (optional)
|
|
63
63
|
|
|
64
64
|
`~/.vsl/config.json`:
|
|
65
65
|
|
|
@@ -73,59 +73,60 @@ export VSL_VISION_MODEL="meta-llama/Llama-Vision"
|
|
|
73
73
|
"model": "meta-llama/Llama-Vision"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
Priority: env vars > config file > defaults.
|
|
77
77
|
|
|
78
|
-
##
|
|
78
|
+
## Tools
|
|
79
79
|
|
|
80
80
|
### vsl_get_snapshot
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Get the current VSL snapshot of the page. Returns VSL JSON with the semantic structure of elements.
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
- `url` (string, optional) — URL
|
|
86
|
-
- `detail_level` (string, optional) —
|
|
87
|
-
- `ttl` (number, optional) — TTL
|
|
88
|
-
- `full` (boolean, optional) —
|
|
84
|
+
**Parameters:**
|
|
85
|
+
- `url` (string, optional) — Page URL. If not specified, uses the current page.
|
|
86
|
+
- `detail_level` (string, optional) — detail level: `low` (interactive elements only), `medium` (interactive + containers, default), `high` (all objects).
|
|
87
|
+
- `ttl` (number, optional) — cache TTL in ms (default 5000 = 5s). `0` — disable caching.
|
|
88
|
+
- `full` (boolean, optional) — full mode: returns the ENTIRE document without viewport filter and detail level filter, bypassing diff-first logic. Use if agent history was truncated and you need the full picture of the page (replaces the removed `vsl_get_full_json` tool).
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
**Returns:** `VslDocument` — VSL JSON filtered by visible window and detail level (or full when `full: true`). Contains metadata `scrollable: { top, bottom }` (whether there is content above/below the visible window).
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
**Caching:** repeated calls with the same URL within TTL return the document from cache, re-filtered by new parameters, without accessing the browser.
|
|
93
93
|
|
|
94
94
|
### vsl_execute_action
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Execute an action on a VSL element.
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
- `action` (string, required) —
|
|
100
|
-
- `target_id` (string, required) — ID
|
|
101
|
-
- `value` (string, optional) —
|
|
102
|
-
- `timeout` (number, optional) —
|
|
103
|
-
- `save_path` (string, optional) —
|
|
104
|
-
- `return_state` (boolean, optional,
|
|
98
|
+
**Parameters:**
|
|
99
|
+
- `action` (string, required) — action name: `click`, `type`, `fill` (alias for `type`), `scroll`, `select`, `hover`, `focus`, `blur`, `check`, `uncheck`, `press`, `upload` (file upload, requires `value` — file path or comma-separated list of paths), `download` (file download: click on element or direct download by URL via `value`)
|
|
100
|
+
- `target_id` (string, required) — element ID in VSL JSON
|
|
101
|
+
- `value` (string, optional) — value for the action (text for `type`, option for `select`, file path for `upload`)
|
|
102
|
+
- `timeout` (number, optional) — download completion timeout in ms (only for `download` action)
|
|
103
|
+
- `save_path` (string, optional) — path to save the downloaded file (only for `download` action; relative paths are resolved to the downloads folder with boundary check)
|
|
104
|
+
- `return_state` (boolean, optional, default `true`) — whether to return page state after action (diff + snapshot filtered by visible window)
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
**Returns:** action execution result.
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
**File upload example:**
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
Agent: vsl_execute_action(action="upload", target_id="file_input_0", value="/path/to/document.pdf")
|
|
112
112
|
→ { success: true, data: { action: "upload", upload: { selector: "#file_input_0", files: ["/path/to/document.pdf"], success: true } } }
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
For uploading multiple files (if input has `multiple` attribute):
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
Agent: vsl_execute_action(action="upload", target_id="file_input_1", value="/path/file1.jpg, /path/file2.jpg")
|
|
119
119
|
→ { success: true, data: { upload: { files: ["/path/file1.jpg", "/path/file2.jpg"], success: true } } }
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
|
|
122
|
+
**File download example (`download` action):**
|
|
122
123
|
|
|
123
124
|
|
|
124
125
|
Agent: vsl_execute_action(action="download", target_id="btn_download")
|
|
125
126
|
→ { success: true, data: { download: { downloadId: "dl_1", filename: "report.pdf", url: "https://example.com/report.pdf", status: "completed", path: "/downloads/report.pdf" } } }
|
|
126
127
|
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
Direct download by URL with saving to specified path and timeout:
|
|
129
130
|
|
|
130
131
|
|
|
131
132
|
Agent: vsl_execute_action(action="download", target_id="btn_download", value="https://example.com/file.pdf", save_path="/tmp/file.pdf", timeout=15000)
|
|
@@ -134,106 +135,106 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
|
|
|
134
135
|
|
|
135
136
|
|
|
136
137
|
**Lazy Navigation (DEC-028):**
|
|
137
|
-
|
|
138
|
-
1.
|
|
139
|
-
2.
|
|
140
|
-
3.
|
|
138
|
+
Before executing an action, the system automatically checks if the browser is on the URL from the current snapshot. If not — it automatically navigates to the required URL. This allows the agent to:
|
|
139
|
+
1. Read the page via HTTP path (fast, without browser)
|
|
140
|
+
2. Get VSL JSON with semantic structure
|
|
141
|
+
3. Call `vsl_execute_action` — the system will automatically launch the browser and navigate to the URL
|
|
141
142
|
|
|
142
|
-
|
|
143
|
+
The agent does NOT need to explicitly call `vsl_navigate` before executing actions.
|
|
143
144
|
|
|
144
145
|
### vsl_navigate
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
Navigate to a URL.
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
- `url` (string, required) — URL
|
|
149
|
+
**Parameters:**
|
|
150
|
+
- `url` (string, required) — URL to navigate to
|
|
150
151
|
|
|
151
|
-
|
|
152
|
+
**Returns:** navigation success/failure.
|
|
152
153
|
|
|
153
154
|
### vsl_clear_cache
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
Clear the VSL snapshot cache. The next `vsl_get_snapshot` call will create a new snapshot from scratch.
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
**Parameters:** none.
|
|
158
159
|
|
|
159
160
|
### vsl_get_visual
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
Get a visual fragment for an element (base64 WebP image). Automatically scrolls the page to the element if it's outside the viewport.
|
|
162
163
|
|
|
163
|
-
|
|
164
|
-
- `element_id` (string, required) — ID
|
|
165
|
-
- `auto_scroll` (boolean, optional, default: true) —
|
|
166
|
-
- `auto_refresh` (boolean, optional, default: false) —
|
|
164
|
+
**Parameters:**
|
|
165
|
+
- `element_id` (string, required) — element ID in VSL JSON
|
|
166
|
+
- `auto_scroll` (boolean, optional, default: true) — automatically scroll to element if it's outside viewport
|
|
167
|
+
- `auto_refresh` (boolean, optional, default: false) — automatically refresh snapshot before searching
|
|
167
168
|
|
|
168
|
-
|
|
169
|
+
**Returns:** base64 image of the element. If auto-scroll was performed, the result contains `scroll_info: { scrolled: true, scroll_offset: { x, y } }`.
|
|
169
170
|
|
|
170
171
|
### vsl_read_page
|
|
171
172
|
|
|
172
|
-
|
|
173
|
+
Hybrid web page reading with automatic strategy. HTTP-first for static pages; automatic switching to browser rendering for SPAs.
|
|
173
174
|
|
|
174
|
-
|
|
175
|
-
- `url` (string, required) — URL
|
|
176
|
-
- `readable` (boolean, optional) —
|
|
175
|
+
**Parameters:**
|
|
176
|
+
- `url` (string, required) — page URL to read
|
|
177
|
+
- `readable` (boolean, optional) — noise filtering (nav, footer, cookie banners)
|
|
177
178
|
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
- SPA
|
|
180
|
+
**Automatic strategy:**
|
|
181
|
+
- The system determines the optimal path itself: HTTP for static pages, Render for SPAs
|
|
182
|
+
- The agent does NOT choose the mode — there is no `mode` parameter
|
|
183
|
+
- SPA markers (id="root", id="app", data-reactroot, ng-app) automatically switch to Render path
|
|
183
184
|
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
- Readable
|
|
187
|
-
- HTTP
|
|
188
|
-
- Render
|
|
185
|
+
**Features:**
|
|
186
|
+
- Repeated reads return diff (Snapshot Session)
|
|
187
|
+
- Readable mode filters nav, footer, cookie banners
|
|
188
|
+
- HTTP path returns VSL JSON with semantic structure without coordinates (objects without `p`/`s` transparently pass viewport filter)
|
|
189
|
+
- Render path returns full VSL JSON with absolute pixel coordinates for executing actions
|
|
189
190
|
|
|
190
|
-
|
|
191
|
+
**Returns:** VSL JSON structure of the page (full document or diff).
|
|
191
192
|
|
|
192
193
|
### vsl_get_text_block
|
|
193
194
|
|
|
194
|
-
|
|
195
|
+
Get the full text by `txt_ref` from lazy text loading. Texts longer than ~200 characters in the snapshot are automatically replaced with `txt_preview` (first ~50 characters) + `txt_ref` (reference like `tb_001`).
|
|
195
196
|
|
|
196
|
-
|
|
197
|
-
- `block_id` (string, required) —
|
|
197
|
+
**Parameters:**
|
|
198
|
+
- `block_id` (string, required) — text block ID from the `txt_ref` field of the snapshot object (format `tb_xxx`)
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
**Returns:** `{ block_id, text }` — full content of the text block.
|
|
200
201
|
|
|
201
|
-
##
|
|
202
|
+
## Unified Delivery Pipeline: Full Cache + Filtering on Delivery
|
|
202
203
|
|
|
203
|
-
|
|
204
|
+
All delivery paths (`vsl_get_snapshot`, `vsl_navigate`, `vsl_execute_action` with `return_state`, browser path `vsl_read_page`) use a unified pipeline:
|
|
204
205
|
|
|
205
|
-
1.
|
|
206
|
-
2.
|
|
207
|
-
3.
|
|
208
|
-
4.
|
|
209
|
-
5.
|
|
206
|
+
1. **Full extraction** — the FULL DOM tree is extracted from the browser, including elements outside the visible area (no truncation at the extraction stage).
|
|
207
|
+
2. **Full cache** — the session stores the full `VslDocument`; diffs are calculated on full documents.
|
|
208
|
+
3. **Absolute coordinates** — the `p` field of an object: absolute page-relative pixels `[x, y]` (accounting for page scroll); `s` — size `[width, height]`. Coordinates are invariant to window resize.
|
|
209
|
+
4. **Filtering on delivery** — visible window = `[scroll, scroll + viewport]`; first viewport filter (container lives as long as there are visible descendants), then `detail_level` filter.
|
|
210
|
+
5. **Scroll metadata** — the result contains `scrollable: { top, bottom }`: whether there is content above/below the visible window (guide for `scroll` actions).
|
|
210
211
|
|
|
211
|
-
|
|
212
|
+
**Mode differences:**
|
|
212
213
|
|
|
213
|
-
| |
|
|
214
|
+
| | HTTP mode (`vsl_read_page`) | Browser mode |
|
|
214
215
|
|---|---|---|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
|
|
|
216
|
+
| When | static pages | SPA and interactive pages |
|
|
217
|
+
| Coordinates | absent (`p`/`s` = null) | absolute pixels |
|
|
218
|
+
| Viewport filter | transparent (all objects pass) | cuts off invisible elements |
|
|
219
|
+
| Actions | not directly available — `vsl_execute_action` will launch the browser itself (lazy navigation) | full set of actions |
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
**Repeated requests without browser:** changing `detail_level` or `full` within the cache re-filters the document from cache — without re-extraction.
|
|
221
222
|
|
|
222
|
-
##
|
|
223
|
+
## Resources (MCP Resources)
|
|
223
224
|
|
|
224
225
|
### vsl://current
|
|
225
226
|
|
|
226
|
-
|
|
227
|
+
Current VSL snapshot of the page. Contains the full semantic structure of elements.
|
|
227
228
|
|
|
228
229
|
### vsl://diff
|
|
229
230
|
|
|
230
|
-
|
|
231
|
+
Latest VSL diff since the previous snapshot. Contains only changes (added/modified/removed).
|
|
231
232
|
|
|
232
|
-
##
|
|
233
|
+
## Integration with AI Agents
|
|
233
234
|
|
|
234
235
|
### Claude Desktop
|
|
235
236
|
|
|
236
|
-
|
|
237
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
237
238
|
|
|
238
239
|
{
|
|
239
240
|
"mcpServers": {
|
|
@@ -248,14 +249,14 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
|
|
|
248
249
|
}
|
|
249
250
|
### Cline
|
|
250
251
|
|
|
251
|
-
|
|
252
|
+
Add to Cline settings (VS Code → Settings → Cline → MCP Servers → Add Server → Local (stdio)):
|
|
252
253
|
|
|
253
254
|
- **Server Name:** `vsl`
|
|
254
255
|
- **Command:** `node`
|
|
255
256
|
- **Arguments:** `/absolute/path/to/visual-scene-language/packages/mcp-server/dist/index.js`
|
|
256
257
|
- **Environment variables:**
|
|
257
258
|
OPENAI_API_KEY=sk-...
|
|
258
|
-
|
|
259
|
+
Or JSON format:
|
|
259
260
|
|
|
260
261
|
{
|
|
261
262
|
"vsl": {
|
|
@@ -268,7 +269,7 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
|
|
|
268
269
|
}
|
|
269
270
|
### TaoCoder
|
|
270
271
|
|
|
271
|
-
|
|
272
|
+
Add to `.taocoder/mcp.json`:
|
|
272
273
|
|
|
273
274
|
{
|
|
274
275
|
"servers": {
|
|
@@ -283,7 +284,7 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
|
|
|
283
284
|
}
|
|
284
285
|
### Cursor
|
|
285
286
|
|
|
286
|
-
|
|
287
|
+
Add to `.cursor/mcp.json`:
|
|
287
288
|
|
|
288
289
|
{
|
|
289
290
|
"mcpServers": {
|
|
@@ -296,17 +297,17 @@ Agent: vsl_execute_action(action="download", target_id="btn_download", value="ht
|
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
> **💡
|
|
300
|
+
> **💡 Tip:** Replace `/absolute/path/to/visual-scene-language` with the actual path to your repository. If you configured vision via `~/.vsl/config.json`, you don't need to specify env vars.
|
|
300
301
|
|
|
301
|
-
##
|
|
302
|
+
## Usage Examples
|
|
302
303
|
|
|
303
|
-
###
|
|
304
|
+
### Reading a Static Page
|
|
304
305
|
|
|
305
306
|
Agent: vsl_read_page(url="https://example.com/article")
|
|
306
307
|
→ { status: "success", data: { mode: "http", content: "...", vslDocument: {...}, metadata: { title: "Example Article", wordCount: 1500 } } }
|
|
307
|
-
###
|
|
308
|
+
### Reading an SPA (automatic switching to Render)
|
|
308
309
|
|
|
309
|
-
#
|
|
310
|
+
# The system automatically detects SPA markers and switches to Render path
|
|
310
311
|
Agent: vsl_read_page(url="https://spa-app.com/dashboard")
|
|
311
312
|
→ { status: "success", data: { mode: "render", vslDocument: {...}, hasDiff: false } }
|
|
312
313
|
|
|
@@ -315,12 +316,12 @@ Agent: vsl_execute_action(action="click", target_id="btn_refresh")
|
|
|
315
316
|
|
|
316
317
|
Agent: vsl_read_page(url="https://spa-app.com/dashboard")
|
|
317
318
|
→ { status: "success", data: { mode: "render", diff: { added: [...], modified: [...] }, hasDiff: true } }
|
|
318
|
-
###
|
|
319
|
+
### Getting Full Snapshot When Context is Lost
|
|
319
320
|
|
|
320
|
-
#
|
|
321
|
+
# Agent history was truncated — request full document without filters
|
|
321
322
|
Agent: vsl_get_snapshot(full=true)
|
|
322
|
-
→ { vsl_version: "1.0.0", canvas: {...}, objects: [
|
|
323
|
-
##
|
|
323
|
+
→ { vsl_version: "1.0.0", canvas: {...}, objects: [ ...all elements, including invisible... ] }
|
|
324
|
+
## Architecture
|
|
324
325
|
|
|
325
326
|
┌─────────────────────────────────────────────┐
|
|
326
327
|
│ AI Agent (Claude Desktop / Cline / etc.) │
|
|
@@ -347,39 +348,39 @@ Agent: vsl_get_snapshot(full=true)
|
|
|
347
348
|
│ ├── Diff Engine → VslDiff │
|
|
348
349
|
│ └── Vision Classifier (LLM flash models) │
|
|
349
350
|
└─────────────────────────────────────────────┘
|
|
350
|
-
##
|
|
351
|
+
## Bug Fixes
|
|
351
352
|
|
|
352
|
-
> **ID Stability
|
|
353
|
+
> **ID Stability after fill action** — elements retain their short IDs after DOM changes.
|
|
353
354
|
|
|
354
|
-
> **Iframe ID Resolution** —
|
|
355
|
+
> **Iframe ID Resolution** — fixed ID resolution for elements inside iframes (uses full `target_id` with `iframe_N:` prefix).
|
|
355
356
|
|
|
356
|
-
> **Lazy Text Loading** —
|
|
357
|
+
> **Lazy Text Loading** — texts longer than ~200 characters are automatically replaced with `txt_preview` + `txt_ref` to save tokens.
|
|
357
358
|
|
|
358
|
-
> **Lazy Navigation** —
|
|
359
|
+
> **Lazy Navigation** — automatic navigation to URL before executing actions if the browser is not on the correct page.
|
|
359
360
|
|
|
360
|
-
##
|
|
361
|
+
## Requirements
|
|
361
362
|
|
|
362
363
|
- Node.js ≥ 18
|
|
363
|
-
- Playwright (
|
|
364
|
-
- API
|
|
364
|
+
- Playwright (optional, for SPA rendering): `npx playwright install chromium`
|
|
365
|
+
- API key for at least one provider (OpenAI / Anthropic / Custom) for vision-backend
|
|
365
366
|
|
|
366
367
|
## Vision-backend
|
|
367
368
|
|
|
368
|
-
|
|
369
|
+
For classifying elements without A11y semantics, cheap flash models are used:
|
|
369
370
|
|
|
370
|
-
|
|
|
371
|
+
| Provider | Model | Env var |
|
|
371
372
|
|-----------|--------|---------|
|
|
372
373
|
| OpenAI | gpt-6-luna | `OPENAI_API_KEY` |
|
|
373
374
|
| Anthropic | claude-haiku-4-5 | `ANTHROPIC_API_KEY` |
|
|
374
|
-
| Custom |
|
|
375
|
+
| Custom | any OpenAI-compatible | `VSL_VISION_BASE_URL` + `VSL_VISION_API_KEY` + `VSL_VISION_MODEL` |
|
|
375
376
|
|
|
376
|
-
|
|
377
|
+
The model is configured via `vision.provider` and `vision.model` in the config file.
|
|
377
378
|
|
|
378
|
-
###
|
|
379
|
+
### Custom Providers
|
|
379
380
|
|
|
380
|
-
|
|
381
|
+
Any OpenAI-compatible APIs are supported (Together AI, Groq, OpenRouter, local models via Ollama/vLLM, etc.). Specify `provider: "custom"`, `baseUrl`, `apiKey`, and `model` in the config or via env vars.
|
|
381
382
|
|
|
382
|
-
|
|
383
|
+
**Example for Together AI:**
|
|
383
384
|
|
|
384
385
|
{
|
|
385
386
|
"vision": {
|
|
@@ -389,7 +390,7 @@ Agent: vsl_get_snapshot(full=true)
|
|
|
389
390
|
"model": "meta-llama/Llama-Vision"
|
|
390
391
|
}
|
|
391
392
|
}
|
|
392
|
-
|
|
393
|
+
**Example for Groq:**
|
|
393
394
|
|
|
394
395
|
{
|
|
395
396
|
"vision": {
|
|
@@ -399,6 +400,6 @@ Agent: vsl_get_snapshot(full=true)
|
|
|
399
400
|
"model": "llama-3.2-90b-vision-preview"
|
|
400
401
|
}
|
|
401
402
|
}
|
|
402
|
-
##
|
|
403
|
+
## License
|
|
403
404
|
|
|
404
405
|
SEE LICENSE IN LICENSE.txt
|