Reapply "don't require pulling stubs for cloud models"

This reverts commit 97d2f05a6d.
This commit is contained in:
Jeffrey Morgan
2026-03-03 13:17:10 -08:00
committed by GitHub
parent e8fcb29586
commit 799e51d419
23 changed files with 2849 additions and 114 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/envconfig"
internalcloud "github.com/ollama/ollama/internal/cloud"
"github.com/ollama/ollama/internal/modelref"
"github.com/ollama/ollama/logutil"
)
@@ -919,7 +920,7 @@ func hasWebSearchTool(tools []anthropic.Tool) bool {
}
func isCloudModelName(name string) bool {
return strings.HasSuffix(name, ":cloud") || strings.HasSuffix(name, "-cloud")
return modelref.HasExplicitCloudSource(name)
}
// extractQueryFromToolCall extracts the search query from a web_search tool call