Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix: stale-manifest regex also matches Rust-proxy-wrapped errors

PurpleDoubleDe93418b85217
diff --git a/src/api/providers/ollama-provider.ts b/src/api/providers/ollama-provider.ts
index b1f3ac36..13eae5c2 100644
--- a/src/api/providers/ollama-provider.ts
+++ b/src/api/providers/ollama-provider.ts
@@ -245,7 +245,9 @@ export class OllamaProvider implements ProviderClient {
// Ollama 0.20+ strict-rejects models with stale `capabilities` metadata
// (pulled before Ollama 0.15). Give the user an actionable remediation
// instead of the cryptic "X does not support chat/completion".
- const m = typeof raw === 'string' && raw.match(/^['"]?([^'"]+?)['"]?\s+does not support (chat|completion)$/i)
+ // Regex is tolerant to prefixes (e.g. Rust proxy wraps as "HTTP 400: {...}")
+ // and to the model name being quoted or not.
+ const m = typeof raw === 'string' && raw.match(/['"]?([\w.:/\-]+?)['"]?\s+does not support (chat|completion)/i)
if (m) {
const name = m[1]
return `Ollama rejected "${name}" — its manifest is stale (pulled before Ollama 0.15). Open a terminal and run: ollama pull ${name} Then reload the model.`