export function getLiveKitURL(region: string | null): string { let targetKey = 'LIVEKIT_URL'; if (region) { targetKey = `LIVEKIT_URL_${region}`.toUpperCase(); } const url = process.env[targetKey]; if (!url) { throw new Error(`${targetKey} is not defined`); } return url; }