Commit 0904a72
committed
fix(api): provider endpoint mismatches preventing Copilot save, test, and remove
Fix #415
Three endpoint mismatches between frontend and backend caused the
GitHub Copilot provider's save, test, and remove buttons to fail
with 405 Method Not Allowed. These affected all providers for save.
- change update_provider annotation from post to put to match frontend
- fix test button URL from /providers/test to /providers/test-model
- add github-copilot entry in build_test_llm_config since
default_provider_config returns None for providers that require
token exchange
- widen GITHUB_COPILOT_DEFAULT_BASE_URL visibility to pub(crate)
- add unit test for build_test_llm_config with github-copilot
fix(api): Copilot provider shows as available after remove when env var is set
get_providers fell back to the GITHUB_COPILOT_API_KEY env var when the
TOML key was absent, so the provider stayed visible in settings after
a remove — the env var can't be unset from a running process.
Only check the TOML key for Copilot status in the config-exists path.
The env var fallback remains for the no-config-file case (fresh install).1 parent 66846e5 commit 0904a72
File tree
4 files changed
+49
-4
lines changed- interface/src/api
- src
- api
- config
4 files changed
+49
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
195 | 210 | | |
196 | 211 | | |
197 | 212 | | |
| |||
431 | 446 | | |
432 | 447 | | |
433 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
434 | 458 | | |
435 | 459 | | |
436 | 460 | | |
| |||
454 | 478 | | |
455 | 479 | | |
456 | 480 | | |
457 | | - | |
| 481 | + | |
458 | 482 | | |
459 | 483 | | |
460 | 484 | | |
| |||
794 | 818 | | |
795 | 819 | | |
796 | 820 | | |
797 | | - | |
| 821 | + | |
798 | 822 | | |
799 | 823 | | |
800 | 824 | | |
| |||
1083 | 1107 | | |
1084 | 1108 | | |
1085 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1086 | 1130 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments