fix(confidence-engine): use configured model for chat detection
This commit is contained in:
+3
-3
@@ -60,7 +60,7 @@ function recoverJson(raw) {
|
||||
|
||||
let _chatSupported = null;
|
||||
|
||||
async function detectChatSupport(baseUrl) {
|
||||
async function detectChatSupport(baseUrl, modelName) {
|
||||
if (_chatSupported !== null) return _chatSupported;
|
||||
|
||||
try {
|
||||
@@ -68,7 +68,7 @@ async function detectChatSupport(baseUrl) {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
model: "dummy-check",
|
||||
model: modelName,
|
||||
messages: [{ role: "user", content: "test" }],
|
||||
stream: false,
|
||||
}),
|
||||
@@ -109,7 +109,7 @@ class OllamaLlmProvider {
|
||||
// Step 1: Detect whether /api/chat exists (cache result)
|
||||
// ================================================================
|
||||
try {
|
||||
chatSupported = await detectChatSupport(baseUrl);
|
||||
chatSupported = await detectChatSupport(baseUrl, modelName);
|
||||
} catch { /* failed silently — defaults to false */ }
|
||||
|
||||
// ================================================================
|
||||
|
||||
Reference in New Issue
Block a user