HTML 77.2%
TypeScript 10.5%
Python 9.6%
JavaScript 2.5%
1import { RangeBar, distDomain } from '@/components/intelligence/bits';2import { DataStrip, type StripItem } from '@/components/layout/terminal';3import { fmtInt, fmtSigned, num } from '@/lib/format';4import type { ProviderIntelRow } from '@/lib/types';56/**7 * Provider aggregates as a `DataStrip` (provider page header): models served · organizations covered · input / output price8 * distributions (range bars) · price changes 30 d · models added / removed 30 d. `domain` lets the caller share the log axis9 * with a table of every provider; alone, the provider's own extent is used.10 */11export function ProviderStrip({ p, note, domainIn, domainOut }: { p: ProviderIntelRow; note?: string | null; domainIn?: [number, number]; domainOut?: [number, number] }) {12 const din = domainIn ?? distDomain([p.input_price_distribution]);13 const dout = domainOut ?? distDomain([p.output_price_distribution]);14 const items: StripItem[] = [15 { label: 'Models served', value: fmtInt(p.model_count), definition: 'Canonical models with at least one current offer at this provider.' },16 { label: 'Organizations covered', value: fmtInt(p.organizations_covered), definition: 'Distinct organizations behind the models this provider currently lists.' },17 { label: 'Input price', value: <RangeBar d={p.input_price_distribution} domain={din} label="Input price distribution" />, definition: note ?? 'min · p25 · median · p75 · max of live input prices (USD / 1M tokens) over current offers with a positive price.' },18 { label: 'Output price', value: <RangeBar d={p.output_price_distribution} domain={dout} label="Output price distribution" />, definition: 'min · p25 · median · p75 · max of live output prices over current offers with a positive price.' },19 { label: 'Price changes · 30 d', value: fmtInt(p.price_changes_30d), definition: 'PRICE_CHANGED events (not back-filled) in the last 30 days on models this provider currently lists.' },20 { label: 'Added / removed · 30 d', value: <span className="tnum">{fmtSigned(p.models_added_30d)} <span className="text-ink-3">/</span> {num(p.models_removed_30d) ? `−${fmtInt(p.models_removed_30d)}` : '0'}</span>, definition: 'Model listings first opened / last closed at this provider in the last 30 days.' },21 ];22 return <DataStrip items={items} dense />;23}24