import type { ConfiguredModel } from './model-registry.js';
import { type ProviderKind } from './provider-kind.js';
export type { ProviderKind } from './provider-kind.js';
export interface ProviderProbeResult {
    ok: boolean;
    status: number;
    latencyMs: number;
    detail: string;
    /** Provider template id the probe ran against (e.g. 'kimi', 'openai-compat'). Truthful breadcrumb so callers can verify which provider was actually hit. */
    provider: string;
    /** Fully-resolved URL the probe sent its request to. Empty string when the probe short-circuited before URL resolution (missing endpoint, fetch unavailable). */
    endpoint: string;
    /** Backend model id that the probe sent in the request body (or asserted should be visible for /models listings). */
    backendModel: string;
    /** Where the API key for this probe came from: 'config' if explicit in OwlCoda config, 'env' if resolved through apiKeyEnv, 'unset' if no key was available. */
    credentialSource?: 'env' | 'config' | 'unset';
    /** Raw response body snippet (truncated) when the probe failed at the HTTP layer. Omitted on success and on connection-level failures (no body to read). */
    bodySnippet?: string;
}
export type ProviderProbeMode = 'models' | 'chat' | 'messages';
export interface DryRunProviderPayload {
    provider?: string;
    id?: string;
    label?: string;
    backendModel?: string;
    aliases?: string[];
    endpoint?: string;
    apiKey?: string;
    apiKeyEnv?: string;
    headers?: Record<string, string>;
    timeoutMs?: number;
    role?: string;
    contextWindow?: number;
    testPath?: string;
    testMode?: ProviderProbeMode;
}
export interface ProviderProbeDeps {
    fetch: typeof globalThis.fetch;
    now: () => number;
}
export interface ProviderProbeOptions {
    deps?: Partial<ProviderProbeDeps>;
}
export interface ProviderTemplate {
    id: string;
    provider: ProviderKind;
    label: string;
    tier?: 'cloud' | 'local' | 'custom';
    endpoint: string;
    defaultModelId?: string;
    defaultModelLabel?: string;
    defaultBackendModel?: string;
    defaultAliases?: string[];
    defaultContextWindow?: number;
    headers?: Record<string, string>;
    testPath?: string;
    testMode: ProviderProbeMode;
    family: 'single-model' | 'multi-model';
    description?: string;
    endpointHint?: string;
    backendModelHint?: string;
    requiresBackendModel?: boolean;
    featured?: boolean;
    docs?: string;
}
export declare class ProviderProbe {
    private readonly deps;
    constructor(options?: ProviderProbeOptions);
    test(input: ConfiguredModel | DryRunProviderPayload): Promise<ProviderProbeResult>;
}
export declare function getProviderTemplates(): ProviderTemplate[];
