| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$true)][string]$Model, | |
| [ValidateSet("ollama","gguf")][string]$Backend="ollama" | |
| ) | |
| $Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path | |
| if ($Backend -eq "ollama") { | |
| $OllamaExe = Join-Path $Root "backends\ollama\windows\ollama.exe" | |
| if (!(Test-Path $OllamaExe)) { throw "Missing Ollama binary." } | |
| $env:OLLAMA_MODELS = Join-Path $Root "models\ollama" | |
| & $OllamaExe pull $Model | |
| exit $LASTEXITCODE | |
| } | |
| throw "GGUF add requires a signed model pack or a URL in manifest/model-sources.json." | |