fix(confidence-engine): preserve successful chat detection

This commit is contained in:
2026-09-05 19:41:01 +01:00
parent cd1c6f4fc5
commit 7070342fb1
3 changed files with 14 additions and 8 deletions
+4 -4
View File
@@ -84,13 +84,13 @@ async function detectChatSupport(baseUrl, modelName) {
});
if (res.ok) {
await res.body?.consume();
await res.text();
_chatSupported = true;
} else if (res.status === 405 || res.status === 501) {
await res.body?.consume();
await res.text();
_chatSupported = false;
} else {
await res.body?.consume();
await res.text();
_chatSupported = false;
}
} catch {
@@ -160,7 +160,7 @@ class OllamaLlmProvider {
: JSON.stringify(fullResponseData.message?.content ?? null);
apiUsed = "/api/chat";
} else {
await res.body?.consume();
await res.text();
}
} catch (e) {
if (!e.message.includes("abort")) { /* non-fatal */ }