Repository navigation
Commit 057f2ee
fix(web_search): gate web tools on model SIZE, not coder-ness (fixes Auto->llama3)
Testing "check online ... SpaceX IPO" in AUTO mode surfaced a distinct bug from
the qwen2.5-coder path. Auto resolved to a capable GENERAL model (llama3:8b),
which was DENIED web_search and fell back to stale training knowledge:
Search the web "SpaceX IPO date"
Error: The web_search tool isn't available for this model. Use one of: read_file, ...
-> "SpaceX has not gone public through an IPO..." (WRONG)
Root cause: web tools (web_search/browse_url) were gated on isCapableLocalCoder
-- a CODER >=7B (codingModelScoreBonus>=25 AND >=7B). llama3:8b is capable but
not a coder, so it got the COMPACT toolset (no web). Web search is a GENERAL
capability, not coding-specific -- any sufficiently large local model should
have it.
Fix: new size-only gate isCapableLocalModel (>=7B, or unnumbered/flagship tag),
used for the web-tool toolset decision at BOTH the prompt catalog
(convertToLLMMessageService) AND the execution chokepoint (chatThreadService).
Renamed the threaded toolset boolean isCapableLocalCoder -> isCapableLocalModel
through prompts.ts/chatThreadService/convertToLLMMessageService for honesty;
isCapableLocalCoder the FUNCTION stays (onboarding/routing still want a coder).
Live-verified over CDP (fresh thread each, real chat):
- Auto -> qwen2.5-coder:7b (7.6B): gate true, answers "June 12, 2026" correctly.
- llama3:latest (8.0B, GENERAL, the original failure): gate now true at BOTH the
chokepoint and the prompt; searches "SpaceX IPO date" (5 results) and answers
"Based on the search results ... IPO on June 12, 2026 ... ticker SPCX." CORRECT.
- llama3.2:3b (3.2B): gate correctly FALSE -- small models stay web-less.
909->913 node tests (+4 isCapableLocalModel cases incl. the llama3:8b regression),
tsgo 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fcfd3ab commit 057f2ee
6 files changed
Lines changed: 92 additions & 41 deletions
File tree
- src/vs/workbench/contrib/cortexide
- browser
- common
- prompt
- routing
- test/common
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
2344 | 2344 | | |
2345 | 2345 | | |
2346 | 2346 | | |
2347 | | - | |
| 2347 | + | |
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| |||
2633 | 2633 | | |
2634 | 2634 | | |
2635 | 2635 | | |
2636 | | - | |
| 2636 | + | |
2637 | 2637 | | |
2638 | 2638 | | |
2639 | 2639 | | |
| |||
2680 | 2680 | | |
2681 | 2681 | | |
2682 | 2682 | | |
2683 | | - | |
| 2683 | + | |
2684 | 2684 | | |
2685 | 2685 | | |
2686 | 2686 | | |
| |||
3265 | 3265 | | |
3266 | 3266 | | |
3267 | 3267 | | |
3268 | | - | |
| 3268 | + | |
3269 | 3269 | | |
3270 | 3270 | | |
3271 | 3271 | | |
| |||
3278 | 3278 | | |
3279 | 3279 | | |
3280 | 3280 | | |
3281 | | - | |
3282 | | - | |
3283 | | - | |
3284 | | - | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
3285 | 3287 | | |
3286 | 3288 | | |
3287 | 3289 | | |
| |||
4626 | 4628 | | |
4627 | 4629 | | |
4628 | 4630 | | |
4629 | | - | |
| 4631 | + | |
4630 | 4632 | | |
4631 | 4633 | | |
4632 | 4634 | | |
| |||
4711 | 4713 | | |
4712 | 4714 | | |
4713 | 4715 | | |
4714 | | - | |
| 4716 | + | |
4715 | 4717 | | |
4716 | 4718 | | |
4717 | 4719 | | |
| |||
4835 | 4837 | | |
4836 | 4838 | | |
4837 | 4839 | | |
4838 | | - | |
| 4840 | + | |
4839 | 4841 | | |
4840 | 4842 | | |
4841 | 4843 | | |
| |||
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
1550 | | - | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1551 | 1553 | | |
1552 | 1554 | | |
1553 | 1555 | | |
| |||
1600 | 1602 | | |
1601 | 1603 | | |
1602 | 1604 | | |
1603 | | - | |
| 1605 | + | |
1604 | 1606 | | |
1605 | 1607 | | |
1606 | 1608 | | |
| |||
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
563 | 565 | | |
564 | 566 | | |
565 | | - | |
566 | | - | |
567 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
568 | 570 | | |
569 | 571 | | |
570 | 572 | | |
| |||
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
578 | | - | |
| 580 | + | |
579 | 581 | | |
580 | 582 | | |
581 | 583 | | |
| |||
587 | 589 | | |
588 | 590 | | |
589 | 591 | | |
590 | | - | |
| 592 | + | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
| |||
637 | 639 | | |
638 | 640 | | |
639 | 641 | | |
640 | | - | |
641 | | - | |
| 642 | + | |
| 643 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
| |||
840 | 842 | | |
841 | 843 | | |
842 | 844 | | |
843 | | - | |
| 845 | + | |
844 | 846 | | |
845 | 847 | | |
846 | 848 | | |
| |||
850 | 852 | | |
851 | 853 | | |
852 | 854 | | |
853 | | - | |
| 855 | + | |
854 | 856 | | |
855 | 857 | | |
856 | 858 | | |
857 | | - | |
858 | | - | |
859 | | - | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
860 | 862 | | |
861 | 863 | | |
862 | 864 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
114 | 130 | | |
115 | 131 | | |
116 | 132 | | |
| |||
0 commit comments