Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cli/commands/run-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export async function resolveModelCollections(configModels: any[], collectionsRe
logger.warn(`Malformed model entry string '${modelEntry}' contains unexpected whitespace. Correcting to '${correctedEntry}'. Please fix this in your blueprint file.`);
}
normalizedConfigModels.push(correctedEntry);
} else if (typeof modelEntry === 'object' && modelEntry !== null && !Array.isArray(modelEntry) && modelEntry.id) {
// This is a custom model definition (has id, url, modelName, inherit). Add it directly.
normalizedConfigModels.push(modelEntry);
} else if (typeof modelEntry === 'object' && modelEntry !== null && !Array.isArray(modelEntry)) {
const keys = Object.keys(modelEntry);
if (keys.length === 1) {
Expand All @@ -85,9 +88,6 @@ export async function resolveModelCollections(configModels: any[], collectionsRe
} else {
logger.warn(`Invalid object entry in models array: Must have exactly one key (the provider). Found ${keys.length} keys. Skipping: ${JSON.stringify(modelEntry)}.`);
}
} else if (typeof modelEntry === 'object' && modelEntry !== null && !Array.isArray(modelEntry) && modelEntry.id) {
// This is a custom model definition. Add it directly.
normalizedConfigModels.push(modelEntry);
} else {
logger.warn(`Invalid entry in models array found: ${JSON.stringify(modelEntry)}. It is not a string or a single key-value object. Skipping this entry.`);
}
Expand Down