(props: {
models: ProviderModelEntry[];
mode: "model" | "provider";
showLab?: boolean;
})
| 1099 | } |
| 1100 | |
| 1101 | function ProviderModelsTable(props: { |
| 1102 | models: ProviderModelEntry[]; |
| 1103 | mode: "model" | "provider"; |
| 1104 | showLab?: boolean; |
| 1105 | }) { |
| 1106 | const showLab = props.showLab ?? props.mode === "model"; |
| 1107 | const columns = showLab ? 10 : 9; |
| 1108 | |
| 1109 | return ( |
| 1110 | <table data-enhanced-table> |
| 1111 | <thead> |
| 1112 | <tr> |
| 1113 | {props.mode === "model" ? ( |
| 1114 | <SortableTh>Provider</SortableTh> |
| 1115 | ) : ( |
| 1116 | <SortableTh>Model</SortableTh> |
| 1117 | )} |
| 1118 | {showLab && <SortableTh>Lab</SortableTh>} |
| 1119 | <SortableTh>Model ID</SortableTh> |
| 1120 | <SortableTh type="number">Context</SortableTh> |
| 1121 | <SortableTh type="number">Output</SortableTh> |
| 1122 | <SortableTh type="number">Price</SortableTh> |
| 1123 | <SortableTh>Reasoning</SortableTh> |
| 1124 | <SortableTh>Tool Call</SortableTh> |
| 1125 | <SortableTh>Structured</SortableTh> |
| 1126 | <SortableTh>Temperature</SortableTh> |
| 1127 | </tr> |
| 1128 | </thead> |
| 1129 | <tbody> |
| 1130 | {props.models.map((entry) => { |
| 1131 | const canonical = entry.canonical; |
| 1132 | const displayName = displayModelName(entry); |
| 1133 | const lab = canonical |
| 1134 | ? { id: canonical.labId, name: canonical.labName } |
| 1135 | : undefined; |
| 1136 | |
| 1137 | return ( |
| 1138 | <tr |
| 1139 | data-search={`${displayName} ${entry.model.description} ${entry.modelId} ${entry.provider.name} ${entry.providerId} ${lab?.name ?? ""} ${entry.model.family ?? ""} ${booleanText(entry.model.reasoning)} ${booleanText(entry.model.tool_call)} ${booleanText(entry.model.structured_output)} ${booleanText(entry.model.temperature)}`} |
| 1140 | > |
| 1141 | {props.mode === "model" ? ( |
| 1142 | <td data-sort={entry.provider.name}> |
| 1143 | <ProviderLink providerId={entry.providerId} provider={entry.provider} /> |
| 1144 | </td> |
| 1145 | ) : ( |
| 1146 | <td data-sort={displayName}> |
| 1147 | {canonical ? ( |
| 1148 | <a class="primary-link" href={modelHref(canonical.id)}> |
| 1149 | {displayName} |
| 1150 | </a> |
| 1151 | ) : ( |
| 1152 | <span>{displayName}</span> |
| 1153 | )} |
| 1154 | {canonical ? ( |
| 1155 | <span class="subtle mono">{canonical.id}</span> |
| 1156 | ) : ( |
| 1157 | <span class="subtle">Provider-specific</span> |
| 1158 | )} |
nothing calls this directly
no test coverage detected