mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-04-24 10:40:27 +00:00
feat: dynamic model fetching for GitHub Copilot
- Add ListModels/ListModelsWithGitHubToken to CopilotAuth for querying the /models endpoint at api.githubcopilot.com - Add FetchGitHubCopilotModels in executor with static fallback on failure - Update service.go to use dynamic fetching (15s timeout) instead of hardcoded GetGitHubCopilotModels() - Add GitHubCopilotAliasesFromModels for auto-generating dot-to-hyphen model aliases from dynamic model lists
This commit is contained in:
@@ -866,7 +866,9 @@ func (s *Service) registerModelsForAuth(a *coreauth.Auth) {
|
||||
models = registry.GetKimiModels()
|
||||
models = applyExcludedModels(models, excluded)
|
||||
case "github-copilot":
|
||||
models = registry.GetGitHubCopilotModels()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
|
||||
models = executor.FetchGitHubCopilotModels(ctx, a, s.cfg)
|
||||
cancel()
|
||||
models = applyExcludedModels(models, excluded)
|
||||
case "kiro":
|
||||
models = s.fetchKiroModels(a)
|
||||
|
||||
Reference in New Issue
Block a user