/**
 * Model registry — UI-relevant metadata for all platform-supported LLM models.
 *
 * Fetches from the public model registry API endpoint at runtime and caches
 * the result in the {@link StigmerProvider} context. This eliminates the
 * static JSON file that previously shipped in the npm package.
 *
 * Platform consumers (React SDK, cursor-runner, graphton) all fetch from the
 * same endpoint, each with their own local TTL cache.
 */
import type { HarnessOption } from "./harness";
/**
 * Pricing bracket for a model.
 *
 * - `economy` — lowest-cost models suitable for high-volume or latency-sensitive tasks
 * - `standard` — balanced cost-to-capability, the default choice for most workloads
 * - `premium` — highest-capability models for complex reasoning or critical tasks
 */
export type CostTier = "economy" | "standard" | "premium";
/**
 * Latency characteristic of a model, shown as a badge in the selector.
 *
 * - `fastest` — minimal latency, small models (Haiku, Mini, Nano, Flash)
 * - `fast` — good balance of speed and capability (Sonnet, Codex, standard)
 * - `balanced` — moderate latency, larger context (Pro, GPT-4 Turbo)
 * - `slow` — highest capability, longer response times (Opus, GPT-5.5, o1)
 */
export type SpeedTier = "fastest" | "fast" | "balanced" | "slow";
/**
 * LLM provider identifier. Each provider maps to a distinct inference
 * backend (or intermediary, in the case of Cursor-served third-party
 * models). The model registry uses this for grouping in the
 * "Show All" expanded view.
 */
export type Provider = "anthropic" | "openai" | "google" | "xai" | "cursor" | "moonshot" | "ollama";
/**
 * Providers whose models should be hidden from the UI.
 *
 * The model entries themselves stay in the registry so backend
 * compatibility is preserved. The useModelRegistry hook filters
 * them out before anything reaches a component.
 *
 * To re-enable a provider, simply remove it from this set.
 */
export declare const DISABLED_PROVIDERS: ReadonlySet<Provider>;
/**
 * UI-relevant metadata for a single platform-supported LLM model.
 *
 * @example
 * ```tsx
 * const { getModel, defaultModel } = useModelRegistry();
 * const model = getModel(selectedId) ?? defaultModel;
 *
 * <span>{model.displayName} ({model.costTier})</span>
 * ```
 */
export interface ModelInfo {
    /** Unique model identifier sent to the backend (e.g. `"claude-sonnet-4.5"`). */
    readonly modelId: string;
    /** LLM provider that serves this model. */
    readonly provider: Provider;
    /** Human-readable name shown in the model picker. */
    readonly displayName: string;
    /** 3-6 word pitch explaining why to pick this model. Shown in the curated view. */
    readonly shortDescription: string;
    /** Latency characteristic shown as a badge (Fastest / Fast / Balanced / Slow). */
    readonly speedTier: SpeedTier;
    /** Pricing bracket used for cost-tier indicators in the UI. */
    readonly costTier: CostTier;
    /** Which execution engine serves this model. */
    readonly harness: HarnessOption;
    /**
     * When `true`, appears in the curated default list (the short view
     * before "Show All Models" is expanded or search is used).
     */
    readonly featured: boolean;
}
/**
 * Per-model cost entry for programmatic access to pricing data.
 * Re-exported for consumers that need dollar-level pricing beyond the
 * coarse `CostTier` label.
 */
export interface ModelCostEntry {
    readonly modelId: string;
    readonly inputPricePerMillion: number;
    readonly outputPricePerMillion: number;
    readonly cacheWritePricePerMillion: number;
    readonly cacheReadPricePerMillion: number;
}
/**
 * Build a compound key that uniquely identifies a model across harnesses.
 *
 * The same underlying model name (e.g. `claude-4.6-sonnet`) can exist in
 * both native and cursor harnesses. The compound key disambiguates.
 */
export declare function modelKey(harness: HarnessOption, modelId: string): string;
/** Parsed result of a compound `harness/modelId` key. */
export interface ParsedModelKey {
    /** Harness portion of the compound key. */
    harness: HarnessOption;
    /** Model ID portion of the compound key. */
    modelId: string;
}
/**
 * Parse a compound key back into its `(harness, modelId)` parts.
 * Returns `undefined` for malformed keys.
 */
export declare function parseModelKey(key: string): ParsedModelKey | undefined;
/**
 * Parse raw registry JSON (from the API or a static file) into `ModelInfo[]`.
 *
 * Expects the shape `{ models: RegistryJsonEntry[] }`. Filters out comment
 * entries and invalid rows, then maps to the `ModelInfo` interface.
 */
export declare function parseRegistryJson(data: unknown): ModelInfo[];
/**
 * Fetch the model registry from the authenticated API endpoint.
 *
 * @param apiUrl - Base URL of the Stigmer Cloud API (e.g. `https://api.stigmer.ai`)
 * @param token - Bearer token for authentication (from `client.getAuthCredential()`)
 * @param customFetch - Optional custom `fetch` implementation. Required in
 *   Tauri where the global `fetch` is restricted by webview CSP/CORS policies.
 *   When omitted, the global `fetch` is used.
 * @returns Parsed `ModelInfo[]`.
 */
export declare function fetchModelRegistry(apiUrl: string, token: string | null, customFetch?: typeof globalThis.fetch): Promise<ModelInfo[]>;
/**
 * Model ID used when no user preference is set (native harness).
 *
 * @deprecated Use {@link resolveDefaultModelId} for dynamic resolution
 * based on the active harness and featured models. This constant is kept
 * as the last-resort platform fallback.
 */
export declare const DEFAULT_MODEL_ID = "claude-sonnet-4.6";
/** Model ID used when the Cursor harness is selected and no user preference is set. */
export declare const DEFAULT_CURSOR_MODEL_ID = "default";
/**
 * Resolution source for the default model selection.
 *
 * Tells the caller how the default was determined, enabling
 * UI affordances like "Using org default" or "Your last choice."
 */
export type DefaultModelSource = "user_preference" | "org_default" | "agent_default" | "harness_default" | "platform_fallback";
/** Result of the default model resolution. */
export interface DefaultModelResolution {
    readonly modelId: string;
    readonly source: DefaultModelSource;
}
/**
 * Resolve the default model for a given harness using a priority chain.
 *
 * Priority (Phase 1 — no backend):
 * 1. localStorage user preference (passed in as `userPreference`)
 * 2. First featured model for the harness from the registry
 * 3. Hardcoded platform fallback
 *
 * Future phases will add org-level and agent-level defaults between
 * user preference and harness default.
 */
export declare function resolveDefaultModelId(harness: HarnessOption, models: readonly ModelInfo[], options?: {
    userPreference?: string;
    orgDefault?: string;
    agentDefault?: string;
}): DefaultModelResolution;
//# sourceMappingURL=registry.d.ts.map