Equinix Metal facilities based provisioning was deprecated earlier this year in April 2023. https://feedback.equinixmetal.com/changelog/bye-facilities-hello-again-metros
Beginning in June 2023, new Equinix Metal users may only deploy using Metro options.
https://feedback.equinixmetal.com/changelog/reminder-facilities-turns-to-metros-on-may-30
In terms of code change, generally, facility/facilities API request parameters can be replaced with metro.
Device API responses that included the facility field will continue to do so.
EIPs and VLANs created in facilities are portable throughout the metro the facility is a member of: https://deploy.equinix.com/developers/docs/metal/locations/metros/
Support for Metro provisioning was added to the Metal CLI in April 2021: https://github.com/equinix/metal-cli/pulls?q=is%3Apr+metro+is%3Aclosed