import type { AIProviderName } from "../constants/enums.js"; import type { NeurolinkCredentials } from "../types/index.js"; import { OpenAIChatCompletionsProvider } from "./openaiChatCompletionsBase.js"; /** * HuggingFace Provider — direct HTTP, no AI SDK. * * OpenAI-compatible chat completions at router.huggingface.co/v1 (unified * router endpoint, 2025). Supports the full HuggingFace model hub including * Llama 3.x, Qwen 2.5, Mistral, DeepSeek, and tool-calling capable variants. * All request/stream/tool-loop orchestration lives in * `OpenAIChatCompletionsProvider`; this class only declares configuration * and provider-specific error mapping. * * @see https://huggingface.co/docs/api-inference/index */ export declare class HuggingFaceProvider extends OpenAIChatCompletionsProvider { constructor(modelName?: string, sdk?: unknown, credentials?: NeurolinkCredentials["huggingFace"]); protected getProviderName(): AIProviderName; protected getDefaultModel(): string; protected getFallbackModelName(): string; /** * HuggingFace serves a huge variety of models, many of which reject the * OpenAI `tools` field. The base reports supportsTools() === true * unconditionally, which would merge tools into requests for models * (including the default DialoGPT-medium) that don't accept them. Preserve * the pre-migration allowlist: only known tool-calling-capable model * families opt in; everything else runs tool-free. */ supportsTools(): boolean; protected formatProviderError(error: unknown): Error; }