fix: harden AI analysis and seed defaults

This commit is contained in:
2026-07-08 04:38:22 -07:00
parent 9a437f4cbf
commit 6a1add3422
15 changed files with 653 additions and 167 deletions

View File

@@ -67,7 +67,7 @@ export type ElderAiRecommendation = {
export type ElderAiModelSummary = {
provider: "openai-compatible";
chatModel: string;
embeddingModel: string;
knowledgeRetrieval: "keyword";
};
export type ElderAiAnalysisOutput = {
@@ -241,14 +241,14 @@ function validateModelSummary(value: unknown): ElderAiModelSummary | null {
if (
value.provider !== "openai-compatible" ||
typeof value.chatModel !== "string" ||
typeof value.embeddingModel !== "string"
value.knowledgeRetrieval !== "keyword"
) {
return null;
}
return {
provider: "openai-compatible",
chatModel: value.chatModel,
embeddingModel: value.embeddingModel,
knowledgeRetrieval: "keyword",
};
}