isCopilotBaseUrl function
Whether baseUrl points at a Copilot API endpoint (any account type).
The one detection shared by model listing and by surface code that must
recognize a connected Copilot entry (e.g. key cleanup on delete).
Implementation
bool isCopilotBaseUrl(String baseUrl) =>
Uri.tryParse(baseUrl)?.host.endsWith('githubcopilot.com') == true;