Commit c4adf90
committed
feat: support multiple provider configs per provider family
Adds multi-provider-config support to the chat system, allowing
administrators to define multiple separate credentials and endpoints
for the same provider family (e.g., separate OpenAI instances for
different environments).
Key changes:
- Migration 000460: drops unique constraint on chat_providers.provider,
adds nullable UUID FK (provider_config_id) on chat_model_configs
with ON DELETE SET NULL, and backfills existing models.
- Oldest-enabled-config precedence for deterministic fallback.
- Auto-bind on model creation to oldest enabled config.
- Application-level soft-delete of bound models on provider deletion
to preserve customer tracking and chat history.
- Per-config effective API key reporting in provider listings.
- Frontend: config dropdown in ModelForm, family-level availability
aggregation, multi-config provider display.
- Comprehensive tests for migration backfills, precedence, binding,
soft-delete, and non-admin visibility filtering.1 parent 1c4a9ed commit c4adf90
File tree
63 files changed
+4783
-2258
lines changed- cli
- coderd
- apidoc
- database
- dbauthz
- dbmetrics
- dbmock
- migrations
- queries
- prebuilds
- provisionerdserver
- x/chatd
- codersdk
- agentsdk
- docs/reference/api
- enterprise
- coderd/x/chatd
- dbcrypt
- site/src
- api
- pages/AgentsPage
- components
- ChatElements
- ChatModelAdminPanel
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+4783
-2258
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | | - | |
277 | | - | |
278 | | - | |
| 275 | + | |
279 | 276 | | |
280 | 277 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 278 | + | |
| 279 | + | |
284 | 280 | | |
285 | 281 | | |
286 | 282 | | |
| |||
347 | 343 | | |
348 | 344 | | |
349 | 345 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
376 | 349 | | |
377 | 350 | | |
378 | 351 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
1734 | 1741 | | |
1735 | 1742 | | |
1736 | 1743 | | |
| |||
2671 | 2678 | | |
2672 | 2679 | | |
2673 | 2680 | | |
2674 | | - | |
2675 | | - | |
2676 | | - | |
2677 | | - | |
2678 | | - | |
2679 | | - | |
2680 | | - | |
2681 | 2681 | | |
2682 | 2682 | | |
2683 | 2683 | | |
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
2878 | 2885 | | |
2879 | 2886 | | |
2880 | 2887 | | |
| |||
5641 | 5648 | | |
5642 | 5649 | | |
5643 | 5650 | | |
| 5651 | + | |
| 5652 | + | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
5644 | 5658 | | |
5645 | 5659 | | |
5646 | 5660 | | |
| |||
5667 | 5681 | | |
5668 | 5682 | | |
5669 | 5683 | | |
| 5684 | + | |
| 5685 | + | |
| 5686 | + | |
| 5687 | + | |
| 5688 | + | |
| 5689 | + | |
| 5690 | + | |
5670 | 5691 | | |
5671 | 5692 | | |
5672 | 5693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | 647 | | |
654 | 648 | | |
655 | 649 | | |
| |||
0 commit comments