/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Endpoint validation utilities for provider authentication */ /** * Known Qwen endpoints that support Qwen OAuth */ export declare const QWEN_ENDPOINTS: readonly ["https://dashscope.aliyuncs.com", "https://api.qwen.com", "https://portal.qwen.ai"]; /** * Known OpenAI endpoints */ export declare const OPENAI_ENDPOINTS: readonly ["https://api.openai.com/v1", "https://api.openai.com"]; export interface EndpointValidationResult { isQwenEndpoint: boolean; isOpenAIEndpoint: boolean; supportsQwenOAuth: boolean; normalizedBaseURL: string; } /** * Validates and categorizes an endpoint URL * @param baseURL The base URL to validate * @returns Endpoint validation information */ export declare function validateEndpoint(baseURL: string): EndpointValidationResult; /** * Checks if a base URL is a Qwen endpoint that supports Qwen OAuth * @param baseURL The base URL to check * @returns true if the endpoint supports Qwen OAuth */ export declare function isQwenEndpoint(baseURL: string): boolean; /** * Checks if a base URL is an OpenAI endpoint * @param baseURL The base URL to check * @returns true if the endpoint is an OpenAI endpoint */ export declare function isOpenAIEndpoint(baseURL: string): boolean; /** * Determines if Qwen OAuth should be used for a given endpoint * @param baseURL The base URL to check * @param isOAuthEnabled Whether OAuth is enabled in configuration * @returns true if Qwen OAuth should be used */ export declare function shouldUseQwenOAuth(baseURL: string, isOAuthEnabled: boolean): boolean; /** * Generates a helpful error message for OAuth endpoint mismatches * @param baseURL The base URL that doesn't support the requested OAuth * @param oauthProvider The OAuth provider that was requested * @returns Helpful error message */ export declare function generateOAuthEndpointMismatchError(baseURL: string, oauthProvider: string): string; /** * Gets suggested endpoints for a given OAuth provider * @param oauthProvider The OAuth provider * @returns Array of suggested endpoints */ export declare function getSuggestedEndpoints(oauthProvider: string): string[];