"use strict";
// src/orchestrator/router/ProviderCapabilityCatalog.ts
// v1.14.0 — Per-CLI model roster tagged by tier.
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_CATALOG = void 0;
exports.findProvider = findProvider;
exports.pickModel = pickModel;
exports.DEFAULT_CATALOG = [
    {
        provider: 'openai-cli',
        cliBinary: 'codex',
        apiAvailable: false,
        cliAvailable: false,
        models: [
            { id: 'gpt-5.4-mini-2026-03-17', tier: 'fast' },
            { id: 'gpt-5.4', tier: 'smart' },
            { id: 'gpt-5.5', tier: 'deep' },
        ],
    },
    {
        provider: 'gemini-cli',
        cliBinary: 'gemini',
        apiAvailable: false,
        cliAvailable: false,
        models: [
            { id: 'gemini-3.1-flash-lite-preview', tier: 'fast' },
            { id: 'gemini-3.1-flash', tier: 'fast' },
            { id: 'gemini-3.1-pro-preview', tier: 'smart' },
        ],
    },
    {
        provider: 'anthropic',
        cliBinary: 'claude',
        apiAvailable: false,
        cliAvailable: false,
        models: [
            { id: 'haiku', tier: 'fast' },
            { id: 'sonnet', tier: 'smart' },
            { id: 'opus', tier: 'deep' },
        ],
    },
    {
        provider: 'ollama',
        cliBinary: 'ollama',
        apiAvailable: false,
        cliAvailable: false,
        models: [
            { id: 'qwen2.5-coder:7b', tier: 'fast' },
            { id: 'qwen2.5-coder:14b', tier: 'smart' },
            { id: 'nomic-embed-text', tier: 'embed' },
        ],
    },
];
function findProvider(name, catalog = exports.DEFAULT_CATALOG) {
    return catalog.find(p => p.provider === name) || null;
}
function pickModel(provider, tier) {
    // Exact tier match preferred; for "deep" requests fall back to "smart" then "fast".
    const tiered = provider.models.filter(m => m.tier === tier);
    if (tiered.length > 0)
        return tiered[0];
    if (tier === 'deep') {
        const sm = provider.models.find(m => m.tier === 'smart');
        if (sm)
            return sm;
    }
    if (tier === 'smart') {
        const sm = provider.models.find(m => m.tier === 'fast');
        if (sm)
            return sm;
    }
    return provider.models[0] || null;
}
