Skip to content

Commit

Permalink
feat: Updated gateway/internal/api/v1/models.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 22, 2024
1 parent 4ddece2 commit 81cf996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gateway/internal/api/v1/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ func (s *V1Handler) ListModels(ctx context.Context, req *connect.Request[llmv1.M
allProviderModels := map[string]*llmv1.ProviderModels{}

for name := range base.ProviderRegistry {
// Check if the provider is healthy before fetching models
if !router.DefaultHealthChecker{}.IsHealthy(name) {
continue
}

provider, err := s.iProviderService.GetProvider(provider.Provider{Name: name})
if err != nil {
continue
Expand Down

0 comments on commit 81cf996

Please sign in to comment.