auto-model-router 0.4.9 → 0.4.10
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/.omp-plugin/marketplace.json +2 -2
- package/README.md +79 -8
- package/package.json +1 -1
- package/src/config/defaults.ts +5 -0
- package/test/fixtures/harness/cline-cli.json +815 -0
- package/test/fixtures/harness/kilo.json +487 -0
- package/test/fixtures/harness/roo.json +456 -0
- package/test/harness-requests.test.ts +34 -0
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "auto-model-router: a local cost/complexity-aware model router for Oh My Pi, backed by OpenRouter",
|
|
10
|
-
"version": "0.4.
|
|
10
|
+
"version": "0.4.10",
|
|
11
11
|
"pluginRoot": "."
|
|
12
12
|
},
|
|
13
13
|
"plugins": [
|
|
14
14
|
{
|
|
15
15
|
"name": "auto-model-router",
|
|
16
16
|
"description": "Local cost/complexity-aware model router for Oh My Pi, backed by OpenRouter. Runs in-process, routes per turn by price and task complexity, with budget caps, mid-stream escalation, and cache-aware hysteresis.",
|
|
17
|
-
"version": "0.4.
|
|
17
|
+
"version": "0.4.10",
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "drewappling",
|
|
20
20
|
"email": "drewappling@gmail.com"
|
package/README.md
CHANGED
|
@@ -462,16 +462,84 @@ settings file in the project adds the harness id (verified live):
|
|
|
462
462
|
|
|
463
463
|
No session id or hooks.
|
|
464
464
|
|
|
465
|
-
### Cline
|
|
465
|
+
### Cline CLI
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
cline auth -p openai -b http://127.0.0.1:8788/v1 -k local -m auto
|
|
469
|
+
cline -P openai -m auto "your task"
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Verified live with cline 3.0 (captured request:
|
|
473
|
+
`test/fixtures/harness/cline-cli.json`). The CLI sends native tool calls
|
|
474
|
+
(`read_files`, `search_codebase`, `run_commands`, `fetch_web_content`, …),
|
|
475
|
+
all in `digest.toolAliases`, and no custom headers, so its rows carry no
|
|
476
|
+
harness id. No session id or hooks.
|
|
477
|
+
|
|
478
|
+
### Kilo Code CLI
|
|
479
|
+
|
|
480
|
+
Kilo's CLI is built on OpenCode, so its config is OpenCode's with a different
|
|
481
|
+
file name:
|
|
482
|
+
|
|
483
|
+
```json
|
|
484
|
+
// kilo.json in the project (or ~/.config/kilo/kilo.json)
|
|
485
|
+
{
|
|
486
|
+
"provider": {
|
|
487
|
+
"auto-model-router": {
|
|
488
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
489
|
+
"name": "auto-model-router",
|
|
490
|
+
"options": { "baseURL": "http://127.0.0.1:8788/v1", "apiKey": "local", "headers": { "X-Omp-Harness": "kilo" } },
|
|
491
|
+
"models": { "auto": { "name": "auto" }, "auto-cheap": { "name": "auto-cheap" } }
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"model": "auto-model-router/auto"
|
|
495
|
+
}
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Verified live with kilo 7.5 (captured request:
|
|
499
|
+
`test/fixtures/harness/kilo.json`); tool names match OpenCode's. The
|
|
500
|
+
OpenCode plugin was not picked up from `.kilo/plugin`, `.opencode/plugin` or
|
|
501
|
+
the config's `plugin` list in this test, so Kilo is config-only for now.
|
|
502
|
+
|
|
503
|
+
### Roo Code (VS Code)
|
|
504
|
+
|
|
505
|
+
Roo's welcome screen has *Import Settings*; a profile file skips the form:
|
|
506
|
+
|
|
507
|
+
```json
|
|
508
|
+
{
|
|
509
|
+
"providerProfiles": {
|
|
510
|
+
"currentApiConfigName": "auto-model-router",
|
|
511
|
+
"apiConfigs": {
|
|
512
|
+
"auto-model-router": {
|
|
513
|
+
"apiProvider": "openai",
|
|
514
|
+
"openAiBaseUrl": "http://127.0.0.1:8788/v1",
|
|
515
|
+
"openAiApiKey": "local",
|
|
516
|
+
"openAiModelId": "auto",
|
|
517
|
+
"openAiHeaders": { "X-Omp-Harness": "roo" },
|
|
518
|
+
"openAiCustomModelInfo": { "maxTokens": 8192, "contextWindow": 400000, "supportsImages": true, "supportsPromptCache": true, "inputPrice": 0, "outputPrice": 0 },
|
|
519
|
+
"id": "amr-0001"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Verified live with Roo Code 3.54 (captured request:
|
|
527
|
+
`test/fixtures/harness/roo.json`, including a tool round trip): native tool
|
|
528
|
+
calls (`read_file`, `search_files`, `list_files`, `apply_diff`, …), all in
|
|
529
|
+
`digest.toolAliases`, and the harness header through `openAiHeaders`. Two
|
|
530
|
+
cautions: 3.54 announces itself as the last Roo Code release, and its
|
|
531
|
+
Architect mode loops on a model that never calls `attempt_completion`, so
|
|
532
|
+
start in Code mode or pin a stronger profile (`auto-max`) for it. No session
|
|
533
|
+
id or hooks: the digest applies only through summarising compaction.
|
|
534
|
+
|
|
535
|
+
### Cline (VS Code)
|
|
466
536
|
|
|
467
537
|
Choose the *OpenAI Compatible* provider in the extension's settings, set the
|
|
468
538
|
base URL to `http://127.0.0.1:8788/v1`, any API key, and the model id `auto`
|
|
469
|
-
(or `auto-cheap` / `auto-max`)
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
digest applies only through summarising compaction
|
|
474
|
-
(`compaction.digestToolResults`), which runs inside the router.
|
|
539
|
+
(or `auto-cheap` / `auto-max`); add `X-Omp-Harness` under custom headers if
|
|
540
|
+
offered. Not verified live here (the CLI above was); its tool names are in
|
|
541
|
+
`digest.toolAliases`, and the digest applies only through summarising
|
|
542
|
+
compaction.
|
|
475
543
|
|
|
476
544
|
### OpenCode
|
|
477
545
|
|
|
@@ -1139,7 +1207,10 @@ plus a harness header; the rest needs the harness's own hook API.
|
|
|
1139
1207
|
| Hermes | provider plugin | yes | yes (native plugin) | yes (native plugin) | no | text | yes (native plugin) | on demand | no |
|
|
1140
1208
|
| Codex CLI | Responses API wire | yes | yes (from body) | yes (from body) | no | no | compaction only | no | no |
|
|
1141
1209
|
| Aider | config only | via model settings | no | no | no | no | no tools | no | no |
|
|
1142
|
-
| Cline
|
|
1210
|
+
| Cline CLI | config only | no | no | no | no | no | compaction only | no | no |
|
|
1211
|
+
| Kilo Code CLI | config only | yes | no | no | no | no | compaction only | no | no |
|
|
1212
|
+
| Roo Code (VS Code) | config only | yes | no | no | no | no | compaction only | no | no |
|
|
1213
|
+
| Cline (VS Code) | config only, unverified | if headers supported | no | no | no | no | compaction only | no | no |
|
|
1143
1214
|
| OpenCode | config + plugin | yes | yes (plugin) | yes (plugin) | yes (plugin) | no | yes (plugin) | no | no |
|
|
1144
1215
|
| Claude Code | needs an Anthropic Messages wire module | — | — | — | — | — | — | — | — |
|
|
1145
1216
|
|
package/package.json
CHANGED
package/src/config/defaults.ts
CHANGED
|
@@ -322,6 +322,11 @@ export const DEFAULT_CONFIG: RouterConfig = {
|
|
|
322
322
|
shell: "bash",
|
|
323
323
|
web_extract: "web_fetch",
|
|
324
324
|
fetch_url: "web_fetch",
|
|
325
|
+
// Cline CLI 3.x
|
|
326
|
+
read_files: "read",
|
|
327
|
+
search_codebase: "grep",
|
|
328
|
+
run_commands: "bash",
|
|
329
|
+
fetch_web_content: "web_fetch",
|
|
325
330
|
},
|
|
326
331
|
},
|
|
327
332
|
report: {
|