fix(confidence-engine): resolve synthesis model configuration
This commit is contained in:
@@ -213,11 +213,20 @@ export async function synthesizeCurrentUnderstanding(
|
||||
throw new Error("Invalid dependency: provider must have generateReconstruction");
|
||||
}
|
||||
|
||||
// Resolve configured model: explicit dep > config dep (assertConfig) > process.env > null
|
||||
let modelName = dependencies.modelName;
|
||||
if (modelName == null && dependencies.config?.OLLAMA_MODEL != null) {
|
||||
modelName = dependencies.config.OLLAMA_MODEL;
|
||||
}
|
||||
if (modelName == null) {
|
||||
modelName = process.env.OLLAMA_MODEL ?? null;
|
||||
}
|
||||
|
||||
let rawResponse;
|
||||
try {
|
||||
rawResponse = await provider.generateReconstruction(
|
||||
prompt,
|
||||
dependencies.modelName ?? null
|
||||
modelName
|
||||
);
|
||||
} catch (error) {
|
||||
const err = new Error(error.message ?? "Synthesis provider call failed");
|
||||
|
||||
Reference in New Issue
Block a user