const result: ModelSelection = { id: value.id };
if (value.config && typeof value.config === 'object') {
for (const [key, configValue] of Object.entries(value.config)) {
if (typeof configValue === 'string') {
config[key] = configValue;
}
}
if (Object.keys(config).length > 0) {
result.config = config;
}
}
return result;
}