feat(docs): real provider logos in the models catalog

Vendor 29 mono brand logos (currentColor SVG) from @hanzoai/icons — OpenAI,
Anthropic, Google, Qwen, Mistral, DeepSeek, NVIDIA, Meta, Cohere, Perplexity,
xAI, Amazon, Microsoft, HuggingFace, Zhipu, MiniMax, Moonshot, and more —
inlined as strings so the static export needs no runtime dep or CDN. ProviderChip
renders the real logo when available, monogram chip otherwise (long-tail
community providers with no brand mark). Keyed by normalized provider name.
This commit is contained in:
Hanzo AI
2026-07-24 01:33:34 -07:00
parent 5a025b09b4
commit 19008cdf85
2 changed files with 54 additions and 0 deletions
+12
View File
@@ -6,6 +6,7 @@
// theme-aware via Fumadocs fd-* tokens.
import { useEffect, useMemo, useState } from 'react';
import { Search, Copy, Check, Cpu, Sparkles, Zap, Box } from 'lucide-react';
import { PROVIDER_ICONS, providerKey } from '@/components/provider-icons';
const ENDPOINT = 'https://api.hanzo.ai/v1/models';
@@ -56,6 +57,17 @@ function initials(name: string): string {
return name.replace(/[^\p{L}\p{N}]/gu, '').slice(0, 2).toUpperCase() || '?';
}
function ProviderChip({ name }: { name: string }) {
// Real brand logo (mono, currentColor) when we have one; monogram otherwise.
const svg = PROVIDER_ICONS[providerKey(name)];
if (svg) {
return (
<span
aria-hidden
className="inline-flex size-5 shrink-0 items-center justify-center text-fd-foreground [&>svg]:size-[18px]"
dangerouslySetInnerHTML={{ __html: svg }}
/>
);
}
const hue = hashHue(name.toLowerCase());
return (
<span
File diff suppressed because one or more lines are too long