(props: {
models: ModelEntry[];
title: string;
hideHeading?: boolean;
showLab?: boolean;
})
| 991 | } |
| 992 | |
| 993 | function ModelTable(props: { |
| 994 | models: ModelEntry[]; |
| 995 | title: string; |
| 996 | hideHeading?: boolean; |
| 997 | showLab?: boolean; |
| 998 | }) { |
| 999 | const showLab = props.showLab ?? true; |
| 1000 | const columns = showLab ? 14 : 13; |
| 1001 | |
| 1002 | return ( |
| 1003 | <TableSection |
| 1004 | title={props.title} |
| 1005 | count={props.models.length} |
| 1006 | columns={columns} |
| 1007 | hideHeading={props.hideHeading} |
| 1008 | > |
| 1009 | <table data-enhanced-table> |
| 1010 | <thead> |
| 1011 | <tr> |
| 1012 | <SortableTh>Model</SortableTh> |
| 1013 | {showLab && <SortableTh>Lab</SortableTh>} |
| 1014 | <SortableTh type="number">Providers</SortableTh> |
| 1015 | <SortableTh type="number">Context</SortableTh> |
| 1016 | <SortableTh type="number">Output</SortableTh> |
| 1017 | <SortableTh>Input</SortableTh> |
| 1018 | <SortableTh>Reasoning</SortableTh> |
| 1019 | <SortableTh>Tool Call</SortableTh> |
| 1020 | <SortableTh>Structured</SortableTh> |
| 1021 | <SortableTh>Temperature</SortableTh> |
| 1022 | <SortableTh>Weights</SortableTh> |
| 1023 | <SortableTh type="number">Price</SortableTh> |
| 1024 | <SortableTh>Release</SortableTh> |
| 1025 | <SortableTh>Updated</SortableTh> |
| 1026 | </tr> |
| 1027 | </thead> |
| 1028 | <tbody> |
| 1029 | {props.models.map((model) => { |
| 1030 | const metadata = model.metadata; |
| 1031 | |
| 1032 | return ( |
| 1033 | <tr |
| 1034 | data-search={`${metadata.name} ${metadata.description} ${model.id} ${model.labName} ${metadata.family ?? ""} ${weightsText(metadata.open_weights)} ${booleanText(metadata.reasoning)} ${booleanText(metadata.tool_call)} ${booleanText(metadata.structured_output)} ${booleanText(metadata.temperature)}`} |
| 1035 | > |
| 1036 | <td data-sort={metadata.name}> |
| 1037 | <a class="primary-link" href={modelHref(model.id)}> |
| 1038 | {metadata.name} |
| 1039 | </a> |
| 1040 | <span class="subtle mono">{model.id}</span> |
| 1041 | </td> |
| 1042 | {showLab && ( |
| 1043 | <td data-sort={model.labName}> |
| 1044 | <LabLink labId={model.labId} labName={model.labName} /> |
| 1045 | </td> |
| 1046 | )} |
| 1047 | <td data-sort={String(model.providers.length)}> |
| 1048 | <a href={`${modelHref(model.id)}#providers`}> |
| 1049 | {model.providers.length} |
| 1050 | </a> |
nothing calls this directly
no test coverage detected