/**
 * Built-in fallback model list. Forge prefers the public-info repo's
 * registry (see `lib/public-info/fetch.ts`), but falls back to this
 * when the network is unreachable, the file is malformed, or the
 * user is on first-run before the cache is populated.
 *
 * Keep this list reasonably current — if the registry is permanently
 * unreachable, this is what users see. New models in the wild should
 * land in the public-info repo first (no code change required), and
 * trickle into this fallback whenever the next forge release happens.
 */

import type { ModelsRegistry } from '../public-info/types';

export const KNOWN_MODELS_FALLBACK: ModelsRegistry = {
  version: 1,
  updatedAt: '2026-05-30',
  note: 'Bundled fallback — actual current list lives in forge-public-info/models/registry.json',
  agents: {
    'claude-code': {
      displayName: 'Claude Code',
      default: 'claude-sonnet-4-6',
      aliases: [
        { id: 'default', label: 'default (CLI decides)' },
        { id: 'sonnet',  label: 'sonnet (alias)' },
        { id: 'opus',    label: 'opus (alias)' },
        { id: 'haiku',   label: 'haiku (alias)' },
      ],
      models: [
        { id: 'claude-opus-4-8',           label: 'Opus 4.8',   tier: 'premium'  },
        { id: 'claude-sonnet-4-6',         label: 'Sonnet 4.6', tier: 'standard', default: true },
        { id: 'claude-haiku-4-5-20251001', label: 'Haiku 4.5',  tier: 'fast'     },
      ],
    },
    codex: {
      displayName: 'OpenAI Codex',
      default: 'o4-mini',
      aliases: [{ id: 'default', label: 'default (CLI decides)' }],
      models: [
        { id: 'o4-mini', label: 'o4-mini', tier: 'fast',     default: true },
        { id: 'o3-mini', label: 'o3-mini', tier: 'fast'                    },
        { id: 'gpt-4.1', label: 'GPT-4.1', tier: 'standard'                },
      ],
    },
    aider: {
      displayName: 'Aider',
      default: 'default',
      aliases: [{ id: 'default', label: 'default (CLI decides)' }],
      models: [],
    },
  },
  providers: {
    anthropic: {
      displayName: 'Anthropic API',
      default: 'claude-sonnet-4-6',
      aliases: [],
      models: [
        { id: 'claude-opus-4-8',           label: 'Opus 4.8',   tier: 'premium'  },
        { id: 'claude-sonnet-4-6',         label: 'Sonnet 4.6', tier: 'standard', default: true },
        { id: 'claude-haiku-4-5-20251001', label: 'Haiku 4.5',  tier: 'fast'     },
      ],
    },
    openai: {
      displayName: 'OpenAI API',
      default: 'gpt-4.1',
      aliases: [],
      models: [
        { id: 'gpt-4.1', label: 'GPT-4.1', tier: 'premium', default: true },
        { id: 'gpt-4o',  label: 'GPT-4o',  tier: 'standard' },
        { id: 'o4-mini', label: 'o4-mini', tier: 'fast' },
        { id: 'o3-mini', label: 'o3-mini', tier: 'fast' },
      ],
    },
  },
};
