{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-model-selector",
  "title": "AI: Model Selector",
  "description": "A command-palette model picker with provider logos and keyboard shortcuts.",
  "registryDependencies": [
    "@nx-ui/utils",
    "@nx-ui/command",
    "@nx-ui/dialog"
  ],
  "files": [
    {
      "path": "components/ai/model-selector.tsx",
      "content": "import type { ComponentProps, ReactNode } from \"react\"\n\nimport {\n  Command,\n  CommandDialog,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n  CommandShortcut,\n} from \"@/components/ui/command\"\nimport {\n  Dialog,\n  DialogContent,\n  DialogTitle,\n  DialogTrigger,\n} from \"@/components/ui/dialog\"\nimport { cn } from \"@/lib/utils\"\n\nexport type ModelSelectorProps = ComponentProps<typeof Dialog>\n\nexport const ModelSelector = (props: ModelSelectorProps) => (\n  <Dialog {...props} />\n)\n\nexport type ModelSelectorTriggerProps = ComponentProps<typeof DialogTrigger>\n\nexport const ModelSelectorTrigger = (props: ModelSelectorTriggerProps) => (\n  <DialogTrigger {...props} />\n)\n\nexport type ModelSelectorContentProps = ComponentProps<typeof DialogContent> & {\n  title?: ReactNode\n}\n\nexport const ModelSelectorContent = ({\n  className,\n  children,\n  title = \"Model Selector\",\n  ...props\n}: ModelSelectorContentProps) => (\n  <DialogContent className={cn(\"p-0\", className)} {...props}>\n    <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n    <Command className=\"**:data-[slot=command-input-wrapper]:h-auto\">\n      {children}\n    </Command>\n  </DialogContent>\n)\n\nexport type ModelSelectorDialogProps = ComponentProps<typeof CommandDialog>\n\nexport const ModelSelectorDialog = (props: ModelSelectorDialogProps) => (\n  <CommandDialog {...props} />\n)\n\nexport type ModelSelectorInputProps = ComponentProps<typeof CommandInput>\n\nexport const ModelSelectorInput = ({\n  className,\n  ...props\n}: ModelSelectorInputProps) => (\n  <CommandInput className={cn(\"h-auto py-3.5\", className)} {...props} />\n)\n\nexport type ModelSelectorListProps = ComponentProps<typeof CommandList>\n\nexport const ModelSelectorList = (props: ModelSelectorListProps) => (\n  <CommandList {...props} />\n)\n\nexport type ModelSelectorEmptyProps = ComponentProps<typeof CommandEmpty>\n\nexport const ModelSelectorEmpty = (props: ModelSelectorEmptyProps) => (\n  <CommandEmpty {...props} />\n)\n\nexport type ModelSelectorGroupProps = ComponentProps<typeof CommandGroup>\n\nexport const ModelSelectorGroup = (props: ModelSelectorGroupProps) => (\n  <CommandGroup {...props} />\n)\n\nexport type ModelSelectorItemProps = ComponentProps<typeof CommandItem>\n\nexport const ModelSelectorItem = (props: ModelSelectorItemProps) => (\n  <CommandItem {...props} />\n)\n\nexport type ModelSelectorShortcutProps = ComponentProps<typeof CommandShortcut>\n\nexport const ModelSelectorShortcut = (props: ModelSelectorShortcutProps) => (\n  <CommandShortcut {...props} />\n)\n\nexport type ModelSelectorSeparatorProps = ComponentProps<\n  typeof CommandSeparator\n>\n\nexport const ModelSelectorSeparator = (props: ModelSelectorSeparatorProps) => (\n  <CommandSeparator {...props} />\n)\n\nexport type ModelSelectorLogoProps = Omit<\n  ComponentProps<\"img\">,\n  \"src\" | \"alt\"\n> & {\n  provider:\n    | \"moonshotai-cn\"\n    | \"lucidquery\"\n    | \"moonshotai\"\n    | \"zai-coding-plan\"\n    | \"alibaba\"\n    | \"xai\"\n    | \"vultr\"\n    | \"nvidia\"\n    | \"upstage\"\n    | \"groq\"\n    | \"github-copilot\"\n    | \"mistral\"\n    | \"vercel\"\n    | \"nebius\"\n    | \"deepseek\"\n    | \"alibaba-cn\"\n    | \"google-vertex-anthropic\"\n    | \"venice\"\n    | \"chutes\"\n    | \"cortecs\"\n    | \"github-models\"\n    | \"togetherai\"\n    | \"azure\"\n    | \"baseten\"\n    | \"huggingface\"\n    | \"opencode\"\n    | \"fastrouter\"\n    | \"google\"\n    | \"google-vertex\"\n    | \"cloudflare-workers-ai\"\n    | \"inception\"\n    | \"wandb\"\n    | \"openai\"\n    | \"zhipuai-coding-plan\"\n    | \"perplexity\"\n    | \"openrouter\"\n    | \"zenmux\"\n    | \"v0\"\n    | \"iflowcn\"\n    | \"synthetic\"\n    | \"deepinfra\"\n    | \"zhipuai\"\n    | \"submodel\"\n    | \"zai\"\n    | \"inference\"\n    | \"requesty\"\n    | \"morph\"\n    | \"lmstudio\"\n    | \"anthropic\"\n    | \"aihubmix\"\n    | \"fireworks-ai\"\n    | \"modelscope\"\n    | \"llama\"\n    | \"scaleway\"\n    | \"amazon-bedrock\"\n    | \"cerebras\"\n    | (string & {})\n}\n\nexport const ModelSelectorLogo = ({\n  provider,\n  className,\n  ...props\n}: ModelSelectorLogoProps) => (\n  <img\n    {...props}\n    alt={`${provider} logo`}\n    className={cn(\"size-3 dark:invert\", className)}\n    height={12}\n    src={`https://models.dev/logos/${provider}.svg`}\n    width={12}\n  />\n)\n\nexport type ModelSelectorLogoGroupProps = ComponentProps<\"div\">\n\nexport const ModelSelectorLogoGroup = ({\n  className,\n  ...props\n}: ModelSelectorLogoGroupProps) => (\n  <div\n    className={cn(\n      \"-space-x-1 flex shrink-0 items-center [&>img]:rounded-full [&>img]:bg-background [&>img]:p-px [&>img]:ring-1 dark:[&>img]:bg-foreground\",\n      className\n    )}\n    {...props}\n  />\n)\n\nexport type ModelSelectorNameProps = ComponentProps<\"span\">\n\nexport const ModelSelectorName = ({\n  className,\n  ...props\n}: ModelSelectorNameProps) => (\n  <span className={cn(\"flex-1 truncate text-left\", className)} {...props} />\n)\n",
      "type": "registry:ui",
      "target": "components/ai/model-selector.tsx"
    }
  ],
  "type": "registry:ui"
}