Normalise and validate an API base URL for a provider connection.
HTTPS is required except for loopback hosts, so a remembered key can only travel encrypted to the configured server or to the user's own machine.
User-entered URL.
The canonical origin plus path without a trailing slash.
Error with user-facing text for an unusable URL.
normalizePajaLlmBaseUrl('https://api.openai.com/v1/'); // 'https://api.openai.com/v1' Copy
normalizePajaLlmBaseUrl('https://api.openai.com/v1/'); // 'https://api.openai.com/v1'
Normalise and validate an API base URL for a provider connection.
HTTPS is required except for loopback hosts, so a remembered key can only travel encrypted to the configured server or to the user's own machine.