/**
 * Provider-specific type definitions for NeuroLink
 */
import { AIProviderName, AnthropicModels, BedrockModels, DeepSeekModels, GoogleAIModels, LlamaCppModels, LMStudioModels, NvidiaNimModels, OpenAIModels, VertexModels, } from "../constants/enums.js";
/**
 * Type guard to check if a configuration is an AnthropicProviderConfig
 *
 * @param config - The configuration object to check
 * @returns True if the configuration is an AnthropicProviderConfig
 *
 * @example
 * ```typescript
 * const config = getProviderConfig();
 * if (isAnthropicConfig(config)) {
 *   // TypeScript knows config is AnthropicProviderConfig here
 *   console.log(config.subscriptionTier);
 *   console.log(config.oauthConfig?.clientId);
 * }
 * ```
 */
export function isAnthropicConfig(config) {
    if (config === null || config === undefined) {
        return false;
    }
    if (typeof config !== "object") {
        return false;
    }
    const configObj = config;
    // Check for Anthropic-specific properties
    // A config is considered Anthropic if it has:
    // 1. An authMethod that is a valid AnthropicAuthMethod, OR
    // 2. A subscriptionTier that is a valid ClaudeSubscriptionTier, OR
    // 3. An oauthConfig object
    const validAuthMethods = ["api_key", "oauth"];
    const validSubscriptionTiers = [
        "free",
        "pro",
        "max",
        "max_5",
        "max_20",
        "api",
    ];
    // Check for authMethod
    if (configObj.authMethod !== undefined &&
        typeof configObj.authMethod === "string" &&
        validAuthMethods.includes(configObj.authMethod)) {
        return true;
    }
    // Check for subscriptionTier
    if (configObj.subscriptionTier !== undefined &&
        typeof configObj.subscriptionTier === "string" &&
        validSubscriptionTiers.includes(configObj.subscriptionTier)) {
        return true;
    }
    // Check for oauthConfig
    if (configObj.oauthConfig !== undefined &&
        typeof configObj.oauthConfig === "object" &&
        configObj.oauthConfig !== null) {
        return true;
    }
    // Check for authConfig (AnthropicAuthConfig)
    if (configObj.authConfig !== undefined &&
        typeof configObj.authConfig === "object" &&
        configObj.authConfig !== null) {
        const authConfig = configObj.authConfig;
        if (authConfig.method !== undefined &&
            typeof authConfig.method === "string" &&
            validAuthMethods.includes(authConfig.method)) {
            return true;
        }
    }
    return false;
}
/**
 * Default model aliases for easy reference
 */
export const DEFAULT_MODEL_ALIASES = {
    // Latest recommended models per provider
    LATEST_OPENAI: OpenAIModels.GPT_4O,
    FASTEST_OPENAI: OpenAIModels.GPT_4O_MINI,
    LATEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_SONNET,
    FASTEST_ANTHROPIC: AnthropicModels.CLAUDE_3_5_HAIKU,
    LATEST_GOOGLE: GoogleAIModels.GEMINI_2_5_PRO,
    FASTEST_GOOGLE: GoogleAIModels.GEMINI_2_5_FLASH,
    // Best models by use case
    BEST_CODING: AnthropicModels.CLAUDE_3_5_SONNET,
    BEST_ANALYSIS: GoogleAIModels.GEMINI_2_5_PRO,
    BEST_CREATIVE: AnthropicModels.CLAUDE_3_5_SONNET,
    BEST_VALUE: GoogleAIModels.GEMINI_2_5_FLASH,
};
/**
 * @deprecated Use DEFAULT_MODEL_ALIASES instead. Will be removed in future version.
 */
export const ModelAliases = DEFAULT_MODEL_ALIASES;
/**
 * Default provider configurations
 */
export const DEFAULT_PROVIDER_CONFIGS = [
    {
        provider: AIProviderName.BEDROCK,
        models: [BedrockModels.CLAUDE_3_7_SONNET, BedrockModels.CLAUDE_3_5_SONNET],
    },
    {
        provider: AIProviderName.VERTEX,
        models: [VertexModels.CLAUDE_4_0_SONNET, VertexModels.GEMINI_2_5_FLASH],
    },
    {
        provider: AIProviderName.OPENAI,
        models: [OpenAIModels.GPT_4O, OpenAIModels.GPT_4O_MINI],
    },
];
//# sourceMappingURL=providers.js.map