Commit 80a69de
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 5c85557 commit 80a69de
3 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
210 | 225 | | |
211 | 226 | | |
212 | 227 | | |
| |||
447 | 462 | | |
448 | 463 | | |
449 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
450 | 474 | | |
451 | 475 | | |
452 | 476 | | |
| |||
470 | 494 | | |
471 | 495 | | |
472 | 496 | | |
473 | | - | |
474 | 497 | | |
475 | 498 | | |
476 | 499 | | |
477 | 500 | | |
478 | 501 | | |
479 | 502 | | |
| 503 | + | |
480 | 504 | | |
481 | 505 | | |
482 | 506 | | |
| |||
819 | 843 | | |
820 | 844 | | |
821 | 845 | | |
822 | | - | |
| 846 | + | |
823 | 847 | | |
824 | 848 | | |
825 | 849 | | |
| |||
1607 | 1631 | | |
1608 | 1632 | | |
1609 | 1633 | | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
1610 | 1654 | | |
| 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