fix(stats): add missing lab logos to the top models leaderboard (#57314)
Co-authored-by: fwang <83515+fwang@users.noreply.github.com>
@@ -1009,6 +1009,7 @@ function LeaderboardCard(props: {
|
||||
function getProviderIconId(author: string) {
|
||||
if (author === "MiniMax") return "minimax"
|
||||
if (author === "Moonshot") return "moonshotai"
|
||||
if (author === "Qwen") return "alibaba"
|
||||
if (author === "Zhipu") return "zhipuai"
|
||||
return author.toLowerCase()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect, mock, test } from "bun:test"
|
||||
|
||||
mock.module("@solidjs/router", () => ({ query: (load: () => unknown) => load }))
|
||||
|
||||
const { buildModelCatalog, findModelCatalogEntry } = await import("./model-catalog")
|
||||
const { buildModelCatalog, findModelCatalogEntry, isKnownCatalogLab } = await import("./model-catalog")
|
||||
|
||||
describe("model catalog pricing", () => {
|
||||
test("prefers OpenCode Go pricing over a zero-cost coding plan with the same model id", () => {
|
||||
@@ -45,3 +45,11 @@ describe("model catalog pricing", () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe("known catalog labs", () => {
|
||||
test("resolves stats author aliases to their catalog lab", () => {
|
||||
expect(isKnownCatalogLab("qwen", ["alibaba"])).toBe(true)
|
||||
expect(isKnownCatalogLab("zhipu", ["zhipuai"])).toBe(true)
|
||||
expect(isKnownCatalogLab("meta", ["alibaba"])).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -181,8 +181,9 @@ export function isProviderlessLab(lab: string | undefined) {
|
||||
|
||||
export function isKnownCatalogLab(lab: string | undefined, catalogLabs: readonly string[]) {
|
||||
if (!lab || isProviderlessLab(lab)) return false
|
||||
const id = catalogLabSlug(lab)
|
||||
const key = catalogSlug(formatCatalogLabName(lab))
|
||||
return catalogLabs.some((candidate) => catalogSlug(formatCatalogLabName(candidate)) === key)
|
||||
return catalogLabs.some((candidate) => candidate === id || catalogSlug(formatCatalogLabName(candidate)) === key)
|
||||
}
|
||||
|
||||
export function catalogSlug(value: string) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">
|
||||
<g transform="translate(0 0.48)">
|
||||
<path fill-rule="evenodd" d="M1.6654430203094481,29.51981024475098C1.1898620203094483,29.51981024475098,0.8449320203094483,29.066910244750975,0.9713445203094483,28.608410244750978L7.043789020309449,6.584860244750977C7.303349020309448,5.6433932447509765,8.404949020309449,5.227902244750976,9.221609020309447,5.763425244750977L17.21172902030945,11.002880244750976C17.690529020309448,11.316830244750976,18.309829020309447,11.317340244750977,18.78912902030945,11.004100244750976L26.81322902030945,5.760550244750976C27.63062902030945,5.226395244750977,28.73132902030945,5.643421244750977,28.989629020309447,6.5851002447509766L35.030329020309445,28.609310244750976C35.15602902030945,29.067610244750977,34.81112902030945,29.51981024475098,34.33592902030945,29.51981024475098L26.623629020309448,29.51981024475098C28.027629020309448,27.894210244750976,28.80002902030945,25.817910244750976,28.80002902030945,23.670010244750976L28.80002902030945,23.419310244750978C28.80002902030945,21.318310244750975,28.03582902030945,19.289110244750976,26.649829020309447,17.710010244750976L25.660029020309448,12.741890244750977C25.60192902030945,12.450000244750978,25.34572902030945,12.239800244750977,25.04812902030945,12.239800244750977C24.913029020309448,12.239800244750977,24.78162902030945,12.283570244750976,24.67362902030945,12.364580244750977L20.94192902030945,15.163390244750977C20.67612902030945,15.362690244750977,20.332429020309448,15.426190244750977,20.01302902030945,15.334900244750976C18.69732902030945,14.959020244750976,17.30272902030945,14.959020244750976,15.987129020309448,15.334900244750976C15.667629020309448,15.426190244750977,15.323929020309448,15.362690244750977,15.058229020309449,15.163390244750977L11.324829020309448,12.363350244750976C11.217929020309448,12.283140244750976,11.087829020309448,12.239800244750977,10.954129020309448,12.239800244750977C10.656209020309449,12.239800244750977,10.400719020309449,12.452340244750976,10.346539020309448,12.745240244750978L9.386279020309448,17.936610244750977C7.985189020309448,19.361310244750975,7.200069020309448,21.279610244750977,7.200069020309448,23.277810244750977L7.200069020309448,23.752710244750975C7.200069020309448,25.848010244750977,7.949629020309448,27.874310244750976,9.313239020309448,29.465210244750978L9.360069020309448,29.51981024475098L1.6654430203094481,29.51981024475098Z"/>
|
||||
<path d="M14.040008306503296,25.19998077392578L16.200008306503296,25.19998077392578L16.200008306503296,20.15998077392578L14.367281306503296,20.15998077392578L14.040008306503296,25.19998077392578ZM21.960008306503298,25.19998077392578L19.800008306503294,25.19998077392578L19.800008306503294,20.15998077392578L21.632728306503296,20.15998077392578L21.960008306503298,25.19998077392578Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27.1942 9.03509C24.4881 9.03509 22.3726 11.0731 20.4574 13.6623C17.8258 10.3114 15.6255 9.03509 12.9925 9.03509C7.62404 9.03509 3.51001 16.0234 3.51001 23.4181C3.51001 28.0453 5.74831 30.9649 9.49831 30.9649C12.1971 30.9649 14.1387 29.693 17.5904 23.6594C17.5904 23.6594 19.029 21.1199 20.0173 19.3699C20.3643 19.9293 20.7298 20.5327 21.1138 21.1798L22.7322 23.902C25.8843 29.1769 27.6416 30.9649 30.8229 30.9649C34.4778 30.9649 36.51 28.0058 36.51 23.2822C36.51 15.538 32.3039 9.03509 27.1942 9.03509ZM14.9574 22.0263C12.1606 26.4123 11.1928 27.3962 9.63574 27.3962C8.03194 27.3962 7.07872 25.9883 7.07872 23.4781C7.07872 18.1096 9.75562 12.6199 12.9471 12.6199C14.6752 12.6199 16.1197 13.617 18.3316 16.7836C16.2308 20.0058 14.9574 22.0263 14.9574 22.0263ZM25.5202 21.4751L23.5831 18.2456C23.0969 17.4514 22.5938 16.6676 22.0743 15.8947C23.8185 13.2032 25.2556 11.8611 26.9676 11.8611C30.5202 11.8611 33.3638 17.095 33.3638 23.5219C33.3638 25.9722 32.5612 27.3947 30.8989 27.3947C29.3053 27.3947 28.5451 26.3421 25.5188 21.4737" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="64 64 272 272" fill="currentColor">
|
||||
<path d="M129.274 147.769C157.85 147.769 181.099 171.018 181.099 199.594C181.099 228.17 157.85 251.419 129.274 251.419C100.697 251.419 77.4483 228.17 77.4483 199.594C77.4483 171.018 100.697 147.769 129.274 147.769ZM129.274 135.047C93.6209 135.047 64.7266 163.941 64.7266 199.594C64.7266 235.247 93.6209 264.141 129.274 264.141C164.926 264.141 193.821 235.247 193.821 199.594C193.821 163.941 164.926 135.047 129.274 135.047ZM271.09 135.047C235.437 135.047 206.542 163.941 206.542 199.594C206.542 235.247 235.437 264.141 271.09 264.141C306.742 264.141 335.637 235.247 335.637 199.594C335.637 163.941 306.742 135.047 271.09 135.047Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 727 B |
@@ -1,24 +1,16 @@
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
shape-rendering="geometricPrecision"
|
||||
d="M9.8132 15.9038L9 18.75L8.1868 15.9038C7.75968 14.4089 6.59112 13.2403 5.09619 12.8132L2.25 12L5.09619 11.1868C6.59113 10.7597 7.75968 9.59112 8.1868 8.09619L9 5.25L9.8132 8.09619C10.2403 9.59113 11.4089 10.7597 12.9038 11.1868L15.75 12L12.9038 12.8132C11.4089 13.2403 10.2403 14.4089 9.8132 15.9038Z"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M18.2589 8.71454L18 9.75L17.7411 8.71454C17.4388 7.50533 16.4947 6.56117 15.2855 6.25887L14.25 6L15.2855 5.74113C16.4947 5.43883 17.4388 4.49467 17.7411 3.28546L18 2.25L18.2589 3.28546C18.5612 4.49467 19.5053 5.43883 20.7145 5.74113L21.75 6L20.7145 6.25887C19.5053 6.56117 18.5612 7.50533 18.2589 8.71454Z"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M16.8942 20.5673L16.5 21.75L16.1058 20.5673C15.8818 19.8954 15.3546 19.3682 14.6827 19.1442L13.5 18.75L14.6827 18.3558C15.3546 18.1318 15.8818 17.6046 16.1058 16.9327L16.5 15.75L16.8942 16.9327C17.1182 17.6046 17.6454 18.1318 18.3173 18.3558L19.5 18.75L18.3173 19.1442C17.6454 19.3682 17.1182 19.8954 16.8942 20.5673Z"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<g clipPath="url(#clip0_9396_9240)">
|
||||
<path
|
||||
d="M14 0C6.272 0 0 6.272 0 14C0 21.728 6.272 28 14 28C21.728 28 28 21.728 28 14C28 6.272 21.728 0 14 0ZM10.22 22.876H5.11V17.766H10.22V22.876ZM16.548 22.876H11.438V17.766H16.548V22.876ZM16.548 16.562H11.438V11.438H16.548V16.562ZM16.548 10.234H11.438V5.124H16.548V10.234ZM22.876 10.234H17.766V5.11H22.876V10.234Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_9396_9240">
|
||||
<rect width="28" height="28" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 642 B |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 279 KiB |
@@ -25,6 +25,7 @@ export const iconNames = [
|
||||
"scaleway",
|
||||
"sap-ai-core",
|
||||
"requesty",
|
||||
"reflection",
|
||||
"qiniu-ai",
|
||||
"qihang-ai",
|
||||
"privatemode-ai",
|
||||
@@ -52,6 +53,8 @@ export const iconNames = [
|
||||
"minimax-coding-plan",
|
||||
"minimax-cn",
|
||||
"minimax-cn-coding-plan",
|
||||
"meta",
|
||||
"meituan",
|
||||
"meganova",
|
||||
"lucidquery",
|
||||
"lmstudio",
|
||||
|
||||