import type { ChatMsg, ChatOpts, ChatResult, LLMHealth, LLMProvider } from '../../contracts/llm.js'; /** * Generic OpenAI-`/v1/chat/completions`-compatible provider. Works against * the real OpenAI API, Groq, vLLM, LM Studio, or any other server that * speaks the same wire shape — only `baseUrl` + `model` differ per target. * * `apiKey` is optional: some self-hosted endpoints (local vLLM, LM Studio) * require no auth at all. When present, it is sent as a standard * `Authorization: Bearer` header; when absent, the header is simply omitted * rather than treating a missing key as a hard config error (unlike Azure, * where every deployment requires one). */ export interface OpenAICompatibleLLMConfig { baseUrl: string; model: string; apiKey?: string; } export declare class OpenAICompatibleLLMProvider implements LLMProvider { readonly name: "openai-compatible"; readonly model: string; /** Public (unlike the private fields on the ollama/azure providers) so * doctor probes can reachability-check the configured endpoint without * threading the raw config through a second path — see * doctor/probes/openai-compatible-probe.ts. */ readonly baseUrl: string; private readonly apiKey?; constructor(config: OpenAICompatibleLLMConfig); private get chatUrl(); private authHeaders; chat(messages: ChatMsg[], opts?: ChatOpts): Promise; health(): Promise; }