List Model Node
Overview
The List Model node publishes the list of available AI models from the connected Firebase configuration. Similar to List Dataset, it automatically emits model lists on startup and when models change in Firebase.
Key Features
- Auto-emit on startup: Sends model list when flow starts
- Real-time updates: Emits when models change in Firebase
- Manual trigger: Trigger via input message
- Dataset resolution: Automatically links models to their datasets
- Task normalization: Standardizes task types (detection, classification, etc.)
- Sorted output: Models alphabetically sorted by name
Configuration
Properties
Output Field
- Type: Message property path
- Default:
payload - Description: Where the model array will be stored
Firebase Config
- Type: Node reference (firebase-config)
- Required: Yes
- Description: Reference to firebase-config node
Output
Message Structure
javascript
{
payload: [
{
name: "yolo-v8-detection",
datasetName: "Product Inspection",
datasetId: "prod-inspect-v2",
task: "det", // Normalized task type
updatedAt: "2024-01-15T10:00:00.000Z"
},
{
name: "product-classifier",
datasetName: "Quality Control",
datasetId: "qc-dataset-001",
task: "class",
updatedAt: "2024-01-10T15:30:00.000Z"
}
],
reason: "startup", // "startup", "update", "manual", "reset", "error"
modelsCount: 2,
timestamp: "2024-01-15T10:30:00.000Z"
}Task Types
The node normalizes task types to standard values:
| Input Values | Normalized Output |
|---|---|
| detection, det, object_detection, object-detection | det |
| segmentation, seg, semantic_segmentation, instance_segmentation | seg |
| classification, class, multiclass, multilabel | class |
| ocr, text, text_detection | ocr |
| anomaly, anomaly_detection | anomaly |
| Other values | Original value (lowercase) |
Usage Examples
Example 1: Filter Models by Task
javascript
// Function node after List Model
const detectionModels = msg.payload.filter(model => model.task === "det");
const classificationModels = msg.payload.filter(model => model.task === "class");
msg.payload = {
detection: detectionModels,
classification: classificationModels
};
return msg;Example 2: Group by Dataset
javascript
// Function node: Group models by dataset
const grouped = msg.payload.reduce((acc, model) => {
const dataset = model.datasetName || "Unknown";
if (!acc[dataset]) acc[dataset] = [];
acc[dataset].push(model);
return acc;
}, {});
msg.payload = grouped;
return msg;Example 3: Model Selection UI
javascript
// Function node: Format for dropdown
msg.options = msg.payload.map(model => ({
label: `${model.name} (${model.task})`,
value: model.name
}));
return msg;Example 4: Find Latest Model
javascript
// Function node: Get most recently updated model
const latest = msg.payload.reduce((newest, model) => {
if (!newest || new Date(model.updatedAt) > new Date(newest.updatedAt)) {
return model;
}
return newest;
}, null);
msg.payload = latest;
return msg;See Also
- List Dataset Node - List available datasets
- Inferencer Node - Use models for inference
- Firebase Config Node - Configure Firebase connection