According to the release notes it currently requires Apple Intelligence to be enabled at system level for it to work in Xcode:
https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes
Topic:
Developer Tools & Services
SubTopic:
Xcode