clearRoleChain method
"use the main model" escape of the settings-hub agent-models flow).
Implementation
void clearRoleChain(String role) {
if (role == defaultModelRole) {
throw ArgumentError.value(role, 'role', 'the default role is required');
}
if (!config.roles.containsKey(role)) return;
final roles = {...config.roles}..remove(role);
config = ModelRolesConfig(
roles: roles,
pathOverrides: config.pathOverrides,
retry: config.retry,
);
_wrappers.remove(role);
}