import { ChevronUp, ChevronDown, Eye, Zap, Shield, FileText, Brain, StopCircle } from 'lucide-react'
import { ModelInfo, SortConfig } from '../types'
import { formatPrice, formatContextLength, truncateText } from '../utils/formatters'
interface ModelTableProps {
models: ModelInfo[]
selectedModel?: string
onModelSelect: (modelId: string) => void
sortConfig: SortConfig
onSort: (key: keyof ModelInfo | null, direction?: 'asc' | 'desc') => void
}
export function ModelTable({
models,
selectedModel,
onModelSelect,
sortConfig,
onSort
}: ModelTableProps) {
const getSortIcon = (key: keyof ModelInfo) => {
if (sortConfig.key !== key) {
return
| Features | Description | ||||
|---|---|---|---|---|---|
|
{model.name}
{model.id}
|
{model.provider} |
{model.costTier.charAt(0).toUpperCase() + model.costTier.slice(1)}
{model.pricing && (
In: {formatPrice(model.pricing.input)} | Out: {formatPrice(model.pricing.output)}
)}
|
{formatContextLength(model.context)} | {renderFeatureTags(model.features)} |
{truncateText(model.description, 100)} |
Try adjusting your search terms or clearing some filters to see more results.