| [CmdletBinding()] | |
| param([string[]]$Models = @("qwen3.5:2b","qwen3.5:4b","qwen3.5:9b","qwen3-vl:4b")) | |
| $ErrorActionPreference = "Stop" | |
| $Root = Resolve-Path (Join-Path $PSScriptRoot "..\..") | |
| $OllamaExe = Join-Path $Root "backends\ollama\windows\ollama.exe" | |
| if (!(Test-Path $OllamaExe)) { throw "Missing Ollama binary: $OllamaExe" } | |
| $env:OLLAMA_MODELS = Join-Path $Root "models\ollama" | |
| New-Item -ItemType Directory -Force -Path $env:OLLAMA_MODELS | Out-Null | |
| foreach ($m in $Models) { | |
| Write-Host "Pulling $m into $env:OLLAMA_MODELS" | |
| & $OllamaExe pull $m | |
| if ($LASTEXITCODE -ne 0) { throw "ollama pull failed: $m" } | |
| } | |
| # Qwen3.6-27B is a Hugging Face power profile. It is not pulled with Ollama by default. | |
| # Use the SaaS Builder manifest to download a vetted HF or GGUF artifact and pin its SHA256 before shipping. | |