Repository navigation
Commit 630c1aa
committed
connect-opencode: write the catalog, because opencode never reads /v1/models
opencode builds its picker from models.dev plus the static `models` map in
opencode.json. It does not call a custom provider's /v1/models — discovery is
hardcoded to Ollama, LM Studio and vLLM at their default ports. A provider
written with only npm + baseURL shows up as "Provider not found" with an empty
list. Verified on 1.18.3, where `opencode models archrouter` listed nothing at
all; general discovery is still an open PR (anomalyco/opencode#42660), so there
is nothing to wait for.
So the static list is now the default and --variants becomes --no-models, which
only exists to clean up an older install. The key is resolved from
ARCHROUTER_KEY, then first-key.txt, then whatever /connect saved, and written
into options.apiKey: auth is required by default, so /v1/models answers 401
without it — including the probe this command runs to fetch that list, which is
why --variants died on every auth-on install with "router not answering".
Models opencode cannot reach are still listed, with the measurements kept in
modelCaps.js and opencodeConfig.js rather than hidden: muse-spark-*-contributor-
free and jev-1.13-free answer only on /v1/responses and /v1/messages and 500 on
the chat path, and ling-3.0-flash-fin-free (400) plus ling-3.1-flash-free (429)
are reproducibly dead upstream, 3/3 attempts each on 2026-10-04. The other 7
answer 200 through /v1/chat/completions.
206 tests pass: test-p0 52, test-auth-store 6, test-setup-sh 40,
test-uninstall 48, test-setup-flow 60. The suite carried a test whose name
asserted the false premise above; it is inverted now, and two more cover the
apiKey and the default shape.
Not tested: WARP registration end to end (it burns real Cloudflare slots), and
opencode's own picker — the catalog was confirmed through `opencode --pure
models`, because a local plugin's dependency install deadlocks the plain CLI
(anomalyco/opencode#47212, unrelated to this repo).1 parent c68464f commit 630c1aa
5 files changed
Lines changed: 211 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
163 | 202 | | |
164 | 203 | | |
165 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
460 | 468 | | |
461 | | - | |
| 469 | + | |
| 470 | + | |
462 | 471 | | |
463 | | - | |
464 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
465 | 475 | | |
466 | 476 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
475 | 496 | | |
476 | 497 | | |
477 | 498 | | |
478 | 499 | | |
479 | | - | |
480 | | - | |
481 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
482 | 536 | | |
483 | 537 | | |
484 | | - | |
| 538 | + | |
| 539 | + | |
485 | 540 | | |
486 | 541 | | |
487 | 542 | | |
488 | | - | |
| 543 | + | |
489 | 544 | | |
490 | 545 | | |
491 | 546 | | |
| |||
875 | 930 | | |
876 | 931 | | |
877 | 932 | | |
878 | | - | |
| 933 | + | |
879 | 934 | | |
880 | 935 | | |
881 | 936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
15 | 31 | | |
16 | 32 | | |
17 | 33 | | |
| |||
34 | 50 | | |
35 | 51 | | |
36 | 52 | | |
37 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
38 | 67 | | |
39 | 68 | | |
| 69 | + | |
40 | 70 | | |
41 | 71 | | |
| 72 | + | |
42 | 73 | | |
43 | 74 | | |
44 | 75 | | |
| |||
49 | 80 | | |
50 | 81 | | |
51 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
52 | 97 | | |
53 | 98 | | |
54 | 99 | | |
| |||
102 | 147 | | |
103 | 148 | | |
104 | 149 | | |
105 | | - | |
| 150 | + | |
0 commit comments