chore: fix models

Kujtim Hoxha created

Change summary

internal/tui/components/chat/splash/splash.go    | 12 ++----------
internal/tui/components/dialogs/models/models.go | 12 ++----------
2 files changed, 4 insertions(+), 20 deletions(-)

Detailed changes

internal/tui/components/chat/splash/splash.go 🔗

@@ -3,7 +3,6 @@ package splash
 import (
 	"fmt"
 	"os"
-	"slices"
 	"strings"
 	"time"
 
@@ -107,16 +106,9 @@ func (s *splashCmp) SetOnboarding(onboarding bool) {
 			return
 		}
 		filteredProviders := []catwalk.Provider{}
-		simpleProviders := []string{
-			"anthropic",
-			"openai",
-			"gemini",
-			"xai",
-			"groq",
-			"openrouter",
-		}
+
 		for _, p := range providers {
-			if slices.Contains(simpleProviders, string(p.ID)) {
+			if strings.HasPrefix(p.APIKey, "$") && p.ID != catwalk.InferenceProviderAzure {
 				filteredProviders = append(filteredProviders, p)
 			}
 		}

internal/tui/components/dialogs/models/models.go 🔗

@@ -2,7 +2,7 @@ package models
 
 import (
 	"fmt"
-	"slices"
+	"strings"
 	"time"
 
 	"github.com/charmbracelet/bubbles/v2/help"
@@ -99,16 +99,8 @@ func (m *modelDialogCmp) Init() tea.Cmd {
 	providers, err := config.Providers()
 	if err == nil {
 		filteredProviders := []catwalk.Provider{}
-		simpleProviders := []string{
-			"anthropic",
-			"openai",
-			"gemini",
-			"xai",
-			"groq",
-			"openrouter",
-		}
 		for _, p := range providers {
-			if slices.Contains(simpleProviders, string(p.ID)) {
+			if strings.HasPrefix(p.APIKey, "$") && p.ID != catwalk.InferenceProviderAzure {
 				filteredProviders = append(filteredProviders, p)
 			}
 		}