UNPKG

manifest

Version:

Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard

25 lines 936 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeProviderBaseUrl = normalizeProviderBaseUrl; exports.normalizeMinimaxSubscriptionBaseUrl = normalizeMinimaxSubscriptionBaseUrl; function normalizeProviderBaseUrl(baseUrl) { return baseUrl.replace(/\/+$/, '').replace(/\/v1$/, ''); } const MINIMAX_SUBSCRIPTION_BASE_URLS = new Set([ 'https://api.minimax.io/anthropic', 'https://api.minimaxi.com/anthropic', ]); function normalizeMinimaxSubscriptionBaseUrl(baseUrl) { try { const url = new URL(baseUrl); if (url.protocol !== 'https:' || url.username || url.password) { return null; } const normalized = normalizeProviderBaseUrl(`${url.origin}${url.pathname}`); return MINIMAX_SUBSCRIPTION_BASE_URLS.has(normalized) ? normalized : null; } catch { return null; } } //# sourceMappingURL=provider-base-url.js.map