Commit 81d0c98
Assistant: Improve managing language models (#9799)
This PR makes a few changes in an attempt to improve managing LLM
provider models.
The manage models quickpick menu has been improved:
* Copilot's BYOK providers, particularly ones that Assistant does not
currently support (e.g. Grok) are no longer shown.
* Only providers that the user has signed in with are shown
* The `managementCommand` property has been added to Assistant
providers, so that the cog icon works.
* These changes address #9283.
A new configuration setting `positron.assistant.filterModels` has been
added. With this users (and in the future admins) can set glob filters.
Models will only be shown if they match one of the given globs.
* This addresses #9788.
A `positron.assistant.preferredModel` setting has been added. With this,
when the Positron window first loads it should default to loading the
model given in that setting. Here we use partial matching on the ID or
model names.
* This partially addresses #9388, in that IIUC it matches the behaviour
requested in the [final
comment](#9388 (comment))
of that thread.
A `positron.assistant.defaultModels` settings has been added. With this,
users can specify the default model for a particular provider, which we
will pre-select in the model selector if the user hasn't specified a
preferred model instead.
* This addresses the remaining parts of
#9388 based on
#9799 (comment).
* We have set the default model for Anthropic to `Claude Sonnet 4` and
Bedrock to `Claude 4 Sonnet Bedrock`
---
### Release Notes
#### New Features
- Assistant: added setting `positron.assistant.filterModels` to
configure available models (#9788)
- Assistant: added setting `positron.assistant.preferredModel` to set
the preferred model to pre-select in the model selector (#9388)
- Assistant: added setting `positron.assistant.defaultModels` to set the
default model per provider (#9388)
#### Bug Fixes
- Assistant: non-functional providers removed from "Manage models..."
quickpick (#9283)
### QA Notes
#### Manage models quickpick
1. First, ensure you have multiple providers configured and signed in. I
used Anthropic, AWS Bedrock, and GitHub Copilot Chat.
2. In the Assistant panel, invoke the model picker: <img width="403"
height="173" alt="Screenshot 2025-10-06 at 15 42 22"
src="https://github.com/user-attachments/assets/2cc33831-37c3-4f46-a1fc-887f32d93311"
/>
3. Ensure only useful entries are shown: <img width="620" height="196"
alt="Screenshot 2025-10-06 at 15 42 27"
src="https://github.com/user-attachments/assets/d644d1ea-f198-4bdb-bc3c-752c0fe8e20a"
/>
4. Select a _signed in_ model, ensure a model list appears:
<img width="617" height="297" alt="Screenshot 2025-10-06 at 15 42 39"
src="https://github.com/user-attachments/assets/9fcef6a6-f623-4349-8529-27f1e6713bb3"
/>
5. Do the same but select a signed out model, ensure the model
configuration modal appears.
6. Do the same thing with a _signed in_ model but click the cog on the
far right, the model configuration modal should again appear.
#### Model filtering
1. In your user settings, set the following two filters:
```
"positron.assistant.filterModels": ["Claude*", "GPT-5"],
```
2. Restart Positron or Reload the window.
3. Ensure that only Claude family models or GPT-5 can be used:
<img width="366" height="238" alt="Screenshot 2025-10-06 at 15 49 04"
src="https://github.com/user-attachments/assets/3e7ac3ed-b9bd-41a8-b8a4-ca7b2bf0aca3"
/>
4. This should also work with IDs, useful for e.g. OpenRouter:
```
"positron.assistant.filterModels": ["**/google/gemini-*"],
```
<img width="431" height="389" alt="Screenshot 2025-10-06 at 16 07 43"
src="https://github.com/user-attachments/assets/c54e9720-ab3b-429b-a33d-4485dbc454fd"
/>
5. Finally, this should also restrict the manage models quickpick:
<img width="604" height="476" alt="Screenshot 2025-10-06 at 16 08 20"
src="https://github.com/user-attachments/assets/e1c45c9e-ca16-46c6-9f51-0ca3140dd954"
/>
#### Setting preferred model
1. In your user settings, remove the `positron.assistant.filterModels`
setting and set the following:
```
"positron.assistant.preferredModel": "GPT-5",
```
2. In the Assistant chat panel, switch to another provider and model,
e.g. AWS Bedrock and Claude 4 Sonnet.
3. Create a new chat, ensure selected model does not change.
4. Reload the window, ensure that on reload the preferred model set in
the configuration is first selected. In this case, it should switch to
GPT-5 from the Copilot provider on reload.
#### Setting default model per provider
1. Sign into multiple providers, at least Anthropic and AWS Bedrock.
2. Try switching between them, confirm that the defaults we want by
default are selected.
3. Set the following settings,
```
"positron.assistant.defaultModels": { "anthropic-api": "Opus", "amazon-bedrock": "Opus" },
```
4. Reload the window, confirm that switching between the models now
selects Opus models by default.
Note 1: Upstream has code to remember your last selection, so after the
reload window you have to change providers to see the default kick in.
Note 2: Sometimes Assistant gets stuck in a state showing "Pick
Model..." in the selector. Switching providers does nothing to clear
that, but selecting a model first, and then switching providers, gets
things working again. I don't know if this is related to this commit, or
the changes in #9799.
---------
Co-authored-by: sharon wang <[email protected]>
Co-authored-by: Tim Mok <[email protected]>1 parent 839c705 commit 81d0c98
File tree
11 files changed
+327
-42
lines changed- extensions/positron-assistant
- src
- src/vs/workbench/contrib/chat
- browser
- actions
- positron
- common
- test/common
- test/e2e/pages
11 files changed
+327
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
290 | 331 | | |
291 | 332 | | |
292 | 333 | | |
293 | 334 | | |
294 | 335 | | |
295 | 336 | | |
296 | 337 | | |
297 | | - | |
| 338 | + | |
| 339 | + | |
298 | 340 | | |
299 | 341 | | |
300 | 342 | | |
301 | | - | |
| 343 | + | |
| 344 | + | |
302 | 345 | | |
303 | 346 | | |
304 | 347 | | |
305 | | - | |
| 348 | + | |
| 349 | + | |
306 | 350 | | |
307 | 351 | | |
308 | 352 | | |
309 | | - | |
| 353 | + | |
| 354 | + | |
310 | 355 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
315 | 361 | | |
316 | 362 | | |
317 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
63 | | - | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
| |||
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
311 | | - | |
312 | 326 | | |
313 | 327 | | |
314 | 328 | | |
| |||
334 | 348 | | |
335 | 349 | | |
336 | 350 | | |
337 | | - | |
| 351 | + | |
338 | 352 | | |
339 | 353 | | |
340 | | - | |
341 | 354 | | |
342 | 355 | | |
343 | 356 | | |
| |||
346 | 359 | | |
347 | 360 | | |
348 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
349 | 382 | | |
350 | 383 | | |
351 | 384 | | |
| |||
429 | 462 | | |
430 | 463 | | |
431 | 464 | | |
432 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
433 | 468 | | |
434 | 469 | | |
435 | | - | |
| 470 | + | |
436 | 471 | | |
437 | 472 | | |
438 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | 350 | | |
352 | 351 | | |
353 | 352 | | |
| |||
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
362 | | - | |
363 | | - | |
| 361 | + | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
368 | 374 | | |
369 | 375 | | |
370 | 376 | | |
| |||
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
432 | | - | |
433 | | - | |
| 438 | + | |
| 439 | + | |
434 | 440 | | |
435 | 441 | | |
436 | 442 | | |
| |||
456 | 462 | | |
457 | 463 | | |
458 | 464 | | |
459 | | - | |
| 465 | + | |
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
| |||
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
471 | | - | |
| 477 | + | |
472 | 478 | | |
473 | 479 | | |
474 | 480 | | |
| |||
485 | 491 | | |
486 | 492 | | |
487 | 493 | | |
488 | | - | |
| 494 | + | |
489 | 495 | | |
490 | 496 | | |
491 | 497 | | |
| |||
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
497 | | - | |
| 503 | + | |
498 | 504 | | |
499 | 505 | | |
500 | 506 | | |
| |||
515 | 521 | | |
516 | 522 | | |
517 | 523 | | |
518 | | - | |
| 524 | + | |
519 | 525 | | |
520 | 526 | | |
521 | 527 | | |
| |||
545 | 551 | | |
546 | 552 | | |
547 | 553 | | |
548 | | - | |
| 554 | + | |
549 | 555 | | |
550 | 556 | | |
551 | 557 | | |
| |||
605 | 611 | | |
606 | 612 | | |
607 | 613 | | |
608 | | - | |
| 614 | + | |
609 | 615 | | |
610 | 616 | | |
611 | 617 | | |
612 | 618 | | |
613 | 619 | | |
614 | 620 | | |
615 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
616 | 633 | | |
617 | 634 | | |
618 | 635 | | |
| |||
629 | 646 | | |
630 | 647 | | |
631 | 648 | | |
632 | | - | |
633 | | - | |
| 649 | + | |
| 650 | + | |
634 | 651 | | |
635 | 652 | | |
636 | 653 | | |
| |||
960 | 977 | | |
961 | 978 | | |
962 | 979 | | |
963 | | - | |
| 980 | + | |
964 | 981 | | |
965 | 982 | | |
966 | 983 | | |
967 | | - | |
968 | | - | |
| 984 | + | |
| 985 | + | |
969 | 986 | | |
970 | 987 | | |
971 | 988 | | |
972 | 989 | | |
973 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
974 | 997 | | |
975 | 998 | | |
976 | 999 | | |
| |||
1011 | 1034 | | |
1012 | 1035 | | |
1013 | 1036 | | |
1014 | | - | |
| 1037 | + | |
1015 | 1038 | | |
1016 | 1039 | | |
1017 | 1040 | | |
| |||
0 commit comments