/**
 * Model registry — UI-relevant metadata for all platform-supported LLM models.
 *
 * Reads from the unified JSON registry at backend/libs/model-registry.json,
 * which is the single source of truth for model IDs, display names, pricing,
 * and cost tiers across all harnesses and runtimes.
 *
 * Update it with: @update-model-registry
 */
import registryData from "../../data/model-registry.json";
/**
 * Providers whose models should be hidden from the UI.
 *
 * The model entries themselves stay in MODEL_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 const DISABLED_PROVIDERS = new Set([
    "ollama",
]);
/**
 * 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 function modelKey(harness, modelId) {
    return `${harness}/${modelId}`;
}
/**
 * Parse a compound key back into its `(harness, modelId)` parts.
 * Returns `undefined` for malformed keys.
 */
export function parseModelKey(key) {
    const idx = key.indexOf("/");
    if (idx < 1)
        return undefined;
    const harness = key.slice(0, idx);
    if (harness !== "native" && harness !== "cursor")
        return undefined;
    return { harness, modelId: key.slice(idx + 1) };
}
const VALID_COST_TIERS = new Set(["economy", "standard", "premium"]);
const VALID_HARNESSES = new Set(["native", "cursor"]);
function isModelEntry(entry) {
    return (typeof entry.id === "string" &&
        typeof entry.displayName === "string" &&
        typeof entry.provider === "string" &&
        typeof entry.harness === "string" && VALID_HARNESSES.has(entry.harness) &&
        typeof entry.costTier === "string" && VALID_COST_TIERS.has(entry.costTier));
}
/**
 * Static catalog of all platform-supported LLM models, loaded from the
 * unified JSON registry.
 *
 * {@link useModelRegistry} filters out disabled providers and provides
 * lookup helpers on top of this list.
 */
export const MODEL_REGISTRY = registryData.models
    .filter(isModelEntry)
    .map((m) => ({
    modelId: m.id,
    provider: m.provider,
    displayName: m.displayName,
    costTier: m.costTier,
    harness: m.harness,
    featured: m.featured ?? false,
}));
/** Model ID used when no user preference is set (native harness). */
export const DEFAULT_MODEL_ID = "claude-sonnet-4.5";
/** Model ID used when the Cursor harness is selected and no user preference is set. */
export const DEFAULT_CURSOR_MODEL_ID = "default";
//# sourceMappingURL=registry.js.map