/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Shared type for API-key-based quota providers. */ export type ApiKeyQuotaProvider = 'zai' | 'synthetic' | 'chutes' | 'kimi'; /** * Map of provider names to their canonical quota provider type. * Includes primary names and aliases. */ export declare const API_KEY_PROVIDER_NAME_MAP: Readonly>; /** * Identifies the API-key-based provider from a provider name. * Returns null if the name doesn't match a known provider. */ export declare function detectApiKeyProviderFromName(providerName: string | undefined): ApiKeyQuotaProvider | null; /** * Identifies the API-key-based provider from a base URL string. * Uses safe hostname parsing to prevent misclassification. * Returns null if the URL doesn't match a known provider. */ export declare function detectApiKeyProvider(baseUrl: string | undefined): ApiKeyQuotaProvider | null; /** * Result from fetching API key provider quota */ export interface ApiKeyQuotaResult { provider: string; lines: string[]; } /** * Fetch and format quota information for an API-key-based provider. * * @param provider - The detected provider name * @param apiKey - The API key to use for the request * @param baseUrl - The base URL (used by some providers to derive endpoint) * @returns Formatted lines, or null if the fetch failed */ export declare function fetchApiKeyQuota(provider: ApiKeyQuotaProvider, apiKey: string, baseUrl?: string): Promise;