mirror of
https://github.com/ollama/ollama.git
synced 2026-04-23 17:29:54 +02:00
Reapply "don't require pulling stubs for cloud models" again (#14608)
* Revert "Revert "Reapply "don't require pulling stubs for cloud models"" (#14606)"
This reverts commit 39982a954e.
* fix test + do cloud lookup only when seeing cloud models
---------
Co-authored-by: ParthSareen <parth.sareen@ollama.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/ollama/ollama/api"
|
||||
"github.com/ollama/ollama/cmd/config"
|
||||
"github.com/ollama/ollama/internal/modelref"
|
||||
"github.com/ollama/ollama/version"
|
||||
)
|
||||
|
||||
@@ -147,7 +148,13 @@ type signInCheckMsg struct {
|
||||
type clearStatusMsg struct{}
|
||||
|
||||
func (m *model) modelExists(name string) bool {
|
||||
if m.availableModels == nil || name == "" {
|
||||
if name == "" {
|
||||
return false
|
||||
}
|
||||
if modelref.HasExplicitCloudSource(name) {
|
||||
return true
|
||||
}
|
||||
if m.availableModels == nil {
|
||||
return false
|
||||
}
|
||||
if m.availableModels[name] {
|
||||
@@ -209,7 +216,7 @@ func (m *model) openMultiModelModal(integration string) {
|
||||
}
|
||||
|
||||
func isCloudModel(name string) bool {
|
||||
return strings.HasSuffix(name, ":cloud") || strings.HasSuffix(name, "-cloud")
|
||||
return modelref.HasExplicitCloudSource(name)
|
||||
}
|
||||
|
||||
func cloudStatusDisabled(client *api.Client) bool {
|
||||
|
||||
Reference in New Issue
Block a user