ensureModelReady static method
Ensures a model is ready, applying replace policy
Implementation
static Future<void> ensureModelReady(ModelSpec spec) async {
// print('Ensuring model ready: ${spec.name}');
// Check if target model is already ready
if (await isModelInstalled(spec)) {
// print('Model ${spec.name} already ready');
return;
}
// Handle model switching with replace policy
await _handleModelSwitching(spec);
// Route based on URL scheme
await _routeModelByScheme(spec);
}