mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
getModels() and the _isNativeBackend() probe both set isOllamaNative = false in their catch blocks for ANY failure of GET /api/tags - including a plain 5s timeout while Ollama is busy or still starting, or a refused connection while the container is down. The probe memoized that verdict for the process lifetime. Every model download then failed with 'Model is not available in your AI host... (model pulling is only supported for Ollama backends)' on stock single-Ollama installs (#1349, two reporters on GA). The fix separates 'the backend answered and is not Ollama' from 'the request failed'. Only an actual HTTP response - a non-2xx status, or a 200 whose body fails the Ollama shape check - proves a live non-Ollama server and classifies false. No response at all leaves the classification untouched (null, or a previously proven value), the probe unmemoized for re-probing, and the download path falls through to the pull attempt, whose existing error handling reports the real network error as a retryable failure. Verified live (v1.35.0-rc.1 + this patch, Ollama container stopped): - stock behavior reproduced verbatim: dispatch fails with the 'only supported for Ollama backends' message - patched: the same dispatch fails with 'Failed to download model: getaddrinfo ENOTFOUND nomad_ollama' and stays retryable - after starting Ollama again, the retrying BullMQ job recovered on its own and installed the model with no user action Fixes #1349 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| bin | ||
| commands | ||
| config | ||
| constants | ||
| database | ||
| docs | ||
| inertia | ||
| providers | ||
| public | ||
| resources | ||
| scripts | ||
| start | ||
| tests | ||
| types | ||
| util | ||
| views | ||
| .editorconfig | ||
| .env.example | ||
| ace.js | ||
| adonisrc.ts | ||
| eslint.config.js | ||
| package-lock.json | ||
| package.json | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||