mirror of
https://github.com/ollama/ollama.git
synced 2026-04-18 09:54:18 +02:00
The staleness check compared the local manifest digest (SHA256 of the file on disk) against the registry's Ollama-Content-Digest header. These never matched because PullModel re-serializes the manifest JSON before writing, producing different bytes than the registry's original. The fallback comparison (local modified_at vs upstream push time) was also broken: the generated TypeScript Time class discards the actual timestamp value, so Date parsing always produced NaN. Fix by moving the staleness comparison server-side where we have reliable access to both the local manifest file mtime and the upstream push time. The /api/v1/model/upstream endpoint now returns a simple `stale` boolean instead of raw digests for the frontend to compare. Also adds User-Agent to the CORS allowed headers for dev mode.