diff --git a/src/app/layout.tsx b/src/app/layout.tsx index dbf2a83..b3343af 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -94,7 +94,7 @@ const PLATFORM_ORIGINS_JSON = JSON.stringify([product.origin, `https://www.${pro * React 往往还没水合,先在这里收下并派发事件,再由 embed-bridge.tsx 消费。 * 只认直接父窗口与产品主站的两个入口域名。 */ -const IFRAME_SCRIPT = `(function(){var d=document.documentElement,f=false;try{f=window.self!==window.top}catch(e){f=true}if(!f)return;d.classList.add('in-iframe');if(window.origin==='null')window.__cfBeacon={load:'single'};var O=${PLATFORM_ORIGINS_JSON};window.addEventListener('message',function(e){var m=e.data;if(e.source!==window.parent||!m||typeof m!=='object'||O.indexOf(e.origin)<0)return;if(m.themeMode==='light'||m.themeMode==='dark'){window.__embedTheme=m.themeMode;window.dispatchEvent(new Event('fishxcode:embed-theme'))}if(typeof m.lang==='string'){window.__embedLang=m.lang;window.dispatchEvent(new Event('fishxcode:embed-lang'))}})})();`; +const IFRAME_SCRIPT = `(function(){var d=document.documentElement,f=false;try{f=window.self!==window.top}catch(e){f=true}if(f&&(location.hostname==='localhost'||location.hostname==='127.0.0.1'))f=false;if(!f)return;d.classList.add('in-iframe');if(window.origin==='null')window.__cfBeacon={load:'single'};var O=${PLATFORM_ORIGINS_JSON};window.addEventListener('message',function(e){var m=e.data;if(e.source!==window.parent||!m||typeof m!=='object'||O.indexOf(e.origin)<0)return;if(m.themeMode==='light'||m.themeMode==='dark'){window.__embedTheme=m.themeMode;window.dispatchEvent(new Event('fishxcode:embed-theme'))}if(typeof m.lang==='string'){window.__embedLang=m.lang;window.dispatchEvent(new Event('fishxcode:embed-lang'))}})})();`; /** * 浏览器语言探测:只在站点根路径触发(已带语言前缀的路径不干预)。 @@ -104,7 +104,7 @@ const IFRAME_SCRIPT = `(function(){var d=document.documentElement,f=false;try{f= * navigator.languages 顺序匹配——zh-TW/HK/MO/Hant 归繁体,其余 zh 归简体, * 其他语言按前缀匹配;找不到就留在默认语言。 */ -const LOCALE_DETECTION_SCRIPT = `(function(){try{if(document.documentElement.classList.contains('in-iframe'))return;var L=${LOCALES_JSON},def=${DEFAULT_LOCALE_JSON},seg=location.pathname.split('/').filter(Boolean);if(seg.length&&L.indexOf(seg[0])>=0)return;if(location.pathname!=='/'&&location.pathname!=='')return;var pick=null;try{var s=localStorage.getItem('docs-lang');if(s&&L.indexOf(s)>=0)pick=s}catch(e){}if(!pick){var list=navigator.languages||[navigator.language||''];for(var i=0;i=0?'zh-TW':L.indexOf('zh')>=0?'zh':null;continue}for(var j=0;j=0)return;if(location.pathname!=='/'&&location.pathname!=='')return;var pick=null;try{var s=localStorage.getItem('docs-lang');if(s&&L.indexOf(s)>=0)pick=s}catch(e){}if(!pick){var list=navigator.languages||[navigator.language||''];for(var i=0;i=0?'zh-TW':L.indexOf('zh')>=0?'zh':null;continue}for(var j=0;j,首帧前按路径前缀同步 */ const HTML_LANG_SCRIPT = `(function(){try{var m=${HTML_LANG_JSON},s=location.pathname.split('/').filter(Boolean)[0];if(s&&m[s])document.documentElement.lang=m[s]}catch(e){}})();`; diff --git a/src/components/home/live-data.tsx b/src/components/home/live-data.tsx new file mode 100644 index 0000000..652031d --- /dev/null +++ b/src/components/home/live-data.tsx @@ -0,0 +1,279 @@ +'use client'; + +import { useEffect, useMemo, useState } from 'react'; +import Link from '@/components/app-link'; +import type { HomeRedesignCopy } from '@/lib/home-redesign-copy'; +import { localePath, type Locale } from '@/lib/i18n'; +import { statusFamilyLabel } from '@/lib/status-copy'; +import { FAMILY_ORDER, STATUS_DATA_ROUTES, toSnapshot, type StatusModel } from '@/lib/status'; +import { container, Eyebrow, narrowHeadingClass, Phrases, TextLink } from './primitives'; + +interface PricingResponse { + data?: unknown[] | Record; + vendors?: Array<{ id: number; name?: string }>; +} + +interface PerfResponse { + data?: { + summary?: { + avg_latency_ms?: number; + success_rate?: number; + avg_tps?: number; + }; + }; +} + +interface LiveData { + modelCount: number | null; + vendorCount: number | null; + successRate: number | null; + avgLatencyMs: number | null; + avgTps: number | null; + models: StatusModel[]; +} + +const EMPTY: LiveData = { + modelCount: null, + vendorCount: null, + successRate: null, + avgLatencyMs: null, + avgTps: null, + models: [], +}; + +const STATE_ORDER = ['ok', 'warn', 'bad', 'unknown'] as const; +type ModelState = (typeof STATE_ORDER)[number]; + +const STATE_COLOR: Record = { + ok: 'bg-[#1D9E75]', + warn: 'bg-[#BA7517]', + bad: 'bg-[#E24B4A]', + unknown: 'bg-fd-border', +}; + +function countStates(models: StatusModel[]): Record { + const counts: Record = { ok: 0, warn: 0, bad: 0, unknown: 0 }; + for (const model of models) counts[model.state in counts ? model.state : 'unknown'] += 1; + return counts; +} + +async function readJson(url: string, signal: AbortSignal): Promise { + const response = await fetch(url, { headers: { Accept: 'application/json' }, cache: 'no-store', signal }); + if (!response.ok) throw new Error(`HTTP ${response.status}`); + return response.json() as Promise; +} + +function formatLatency(ms: number | null, lang: Locale): string { + if (ms === null || !Number.isFinite(ms)) return '—'; + if (ms >= 1000) return `${new Intl.NumberFormat(lang, { maximumFractionDigits: 1 }).format(ms / 1000)}s`; + return `${Math.round(ms)}ms`; +} + +/** 首屏数据带与可靠性区块:全部从公开接口读取,失败时显示占位符而不写死假数据 */ +export function LiveMetricsSections({ lang, redesign }: { lang: Locale; redesign: HomeRedesignCopy }) { + const [data, setData] = useState(EMPTY); + const [active, setActive] = useState(null); + const [loadState, setLoadState] = useState<'loading' | 'ready' | 'error'>('loading'); + const [reloadKey, setReloadKey] = useState(0); + + useEffect(() => { + const controller = new AbortController(); + const { signal } = controller; + setLoadState('loading'); + + Promise.all([ + readJson(STATUS_DATA_ROUTES.pricing, signal), + readJson(STATUS_DATA_ROUTES.overview, signal), + readJson(`${STATUS_DATA_ROUTES.perfSummary}?hours=24`, signal), + ]) + .then(([pricing, statusPayload, perf]) => { + const models = Array.isArray(pricing.data) + ? pricing.data + : pricing.data && typeof pricing.data === 'object' + ? Object.values(pricing.data) + : []; + const vendorIds = new Set( + models + .map((model) => (model as { vendor_id?: number }).vendor_id) + .filter((id): id is number => typeof id === 'number'), + ); + const snapshot = toSnapshot(statusPayload, Date.now()); + const liveModels = snapshot?.models ?? []; + setData({ + modelCount: models.length || null, + vendorCount: pricing.vendors?.length || vendorIds.size || null, + successRate: perf.data?.summary?.success_rate ?? null, + avgLatencyMs: perf.data?.summary?.avg_latency_ms ?? null, + avgTps: perf.data?.summary?.avg_tps ?? null, + models: liveModels, + }); + setActive(liveModels[0] ?? null); + setLoadState('ready'); + }) + .catch(() => { + if (!signal.aborted) { + setData(EMPTY); + setActive(null); + setLoadState('error'); + } + }); + + return () => controller.abort(); + }, [reloadKey]); + + const counts = useMemo(() => countStates(data.models), [data.models]); + const families = useMemo( + () => + FAMILY_ORDER.map((family) => ({ + family, + models: data.models.filter((model) => model.family === family), + })).filter((entry) => entry.models.length > 0), + [data.models], + ); + + const { stats, reliability, status } = redesign; + const values = [ + data.modelCount === null ? '—' : new Intl.NumberFormat(lang).format(data.modelCount), + data.vendorCount === null ? '—' : new Intl.NumberFormat(lang).format(data.vendorCount), + data.successRate === null ? '—' : `${data.successRate.toFixed(2)}%`, + formatLatency(data.avgLatencyMs, lang), + ]; + + const activeIndex = active ? STATE_ORDER.indexOf(active.state as ModelState) : -1; + const activeLabel = activeIndex >= 0 ? status.legend[activeIndex] : ''; + const activeDetail = + loadState === 'loading' + ? status.loading + : loadState === 'error' + ? status.error + : active + ? `${active.model} · ${activeLabel} · 24h ${active.successRate === null ? '—' : `${active.successRate.toFixed(0)}%`} · ${formatLatency(active.latency, lang)}` + : status.note; + + return ( + <> +
+
+ {stats.map((stat, index) => ( +
+

{stat.label}

+ {loadState === 'loading' ? ( +
+ ))} +
+
+ +
+
+
+ {reliability.eyebrow} +

+ +

+

{reliability.description}

+
+ {reliability.linkLabel} +
+
+ +
+
+

{status.title}

+
    + {status.legend.map((item, index) => { + const key = STATE_ORDER[index]; + return ( +
  • +
  • + ); + })} +
+
+ + {loadState === 'loading' ? ( + + ) : loadState === 'error' ? ( +
+

{status.error}

+ +
+ ) : families.length > 0 ? ( +
+ {families.map(({ family, models: list }) => { + const familyHref = localePath(lang, `/status/${family}`); + return ( +
+ + {statusFamilyLabel(lang, family)} + +
+ {list.map((model) => { + const index = STATE_ORDER.indexOf(model.state as ModelState); + const label = index >= 0 ? status.legend[index] : ''; + const title = `${model.model} · ${label} · ${formatLatency(model.latency, lang)}`; + const modelHref = localePath(lang, `/status/model/${encodeURIComponent(model.model)}`); + return ( + setActive(model)} + onFocus={() => setActive(model)} + className={`block size-2.5 rounded-sm transition-opacity focus-visible:ring-2 focus-visible:ring-fd-ring focus-visible:outline-none ${STATE_COLOR[model.state as ModelState] ?? STATE_COLOR.unknown} ${active?.model === model.model ? 'ring-1 ring-fd-foreground' : ''}`} + /> + ); + })} +
+
+ ); + })} +
+ ) : ( +
+ )} + +
+

{activeDetail}

+ {reliability.linkLabel} +
+ {data.avgTps !== null ? ( +

+ {new Intl.NumberFormat(lang, { maximumFractionDigits: 1 }).format(data.avgTps)} TPS +

+ ) : null} +
+
+
+ + ); +} diff --git a/src/components/home/sections.tsx b/src/components/home/sections.tsx index c6abd75..f8e17eb 100644 --- a/src/components/home/sections.tsx +++ b/src/components/home/sections.tsx @@ -1,12 +1,11 @@ import Image from 'next/image'; import Link from '@/components/app-link'; -import { Check, MessageCircle } from 'lucide-react'; +import { Boxes, Brain, Check, MessageCircle, type LucideIcon } from 'lucide-react'; import { fmt, HOME_CLIENTS, HOME_ENDPOINTS, HOME_GROUPS, - HOME_LOWEST_PLAN_RATIO, HOME_MODELS_PATH, HOME_PLANS, HOME_PROVIDERS, @@ -15,6 +14,7 @@ import { type HomeCopy, type HomePageCopy, } from '@/lib/home-copy'; +import type { HomeRedesignCopy } from '@/lib/home-redesign-copy'; import { localePath, type Locale } from '@/lib/i18n'; import { siteConfig } from '@/lib/site'; import { CodeWindow, type CodeTab } from './code-window'; @@ -56,6 +56,20 @@ const HERO_POINT_LINKS: ReadonlyArray<{ href: string; external: boolean; absolut /** 「为什么选择」四张卡片的英文等宽标签(版式元素,各语言共用),与 shared.features 按下标对应 */ const WHY_LABELS = ['Official', 'Groups', 'Pay as you go', 'Enterprise']; +/** 供应商图标:优先用仓库里的品牌图片,缺图的用 Lucide 图标,不再用首字母占位 */ +const PROVIDER_IMAGES: Readonly> = { + OpenAI: '/img/clients/openai.jpg', + 'Anthropic Claude': '/img/clients/claude.jpg', + 'Google Gemini': '/img/clients/gemini.png', + 'xAI Grok': '/img/clients/grok.png', + Qwen: '/img/clients/qwen.png', +}; + +const PROVIDER_ICONS: Readonly> = { + DeepSeek: Brain, + GLM: Boxes, +}; + /** 「三步上手」各步链接的教程,与 copy.steps.items 按下标对应 */ const STEP_PATHS = ['/account', BILLING_PATH, HOME_START_PATH] as const; @@ -75,7 +89,13 @@ function withInlineCode(text: string, term: string) { } /** 首屏:左侧主张与行动,右侧客户端图标与可切换、可复制的接入代码 */ -export function HeroSection({ lang, shared, copy, codeTabs }: SectionProps & { codeTabs: CodeTab[] }) { +export function HeroSection({ + lang, + shared, + copy, + redesign, + codeTabs, +}: SectionProps & { redesign: HomeRedesignCopy; codeTabs: CodeTab[] }) { return (
@@ -88,13 +108,13 @@ export function HeroSection({ lang, shared, copy, codeTabs }: SectionProps & { c className={`inline-flex items-center gap-2 rounded-md border border-fd-border bg-paper px-2.5 py-1 text-xs font-medium text-fd-muted-foreground transition-colors hover:border-brand/40 hover:text-brand ${focusRing}`} >
diff --git a/src/components/localized-home-page.tsx b/src/components/localized-home-page.tsx index 07bcfbe..d16dc70 100644 --- a/src/components/localized-home-page.tsx +++ b/src/components/localized-home-page.tsx @@ -15,11 +15,13 @@ import { StepsSection, WhySection, } from '@/components/home/sections'; +import { LiveMetricsSections } from '@/components/home/live-data'; import { docAlternates, localePath, OG_LOCALE, type Locale } from '@/lib/i18n'; import { getRepoDates } from '@/lib/content-dates'; import { getHomeMarkdownUrl } from '@/lib/discovery'; import { machineResourceTypes } from '@/lib/machine-resources'; import { HOME_COPY, HOME_COPY_SOURCE, HOME_PAGE_COPY, getHomeImage } from '@/lib/home-copy'; +import { HOME_REDESIGN_COPY } from '@/lib/home-redesign-copy'; import { siteConfig } from '@/lib/site'; /** @@ -75,6 +77,7 @@ export function createLocalizedHomePage(lang: Locale) { async Page() { const shared = HOME_COPY[lang]; const copy = HOME_PAGE_COPY[lang]; + const redesign = HOME_REDESIGN_COPY[lang]; const codeTabs = await getHeroCodeTabs(); // 首页可见内容全部来自 home-copy.ts,它就是「决定首页内容的文件」; // sitemap 的首页 lastmod 也取它(HOME_COPY_SOURCE),两处同源 @@ -91,7 +94,8 @@ export function createLocalizedHomePage(lang: Locale) { {/* HomeLayout 的根节点就是 flex-1 的
,区块直接放进去;页脚因此贴在短页面的底部 */}
- + + diff --git a/src/lib/home-copy.ts b/src/lib/home-copy.ts index 56ede6f..27fdfd4 100644 --- a/src/lib/home-copy.ts +++ b/src/lib/home-copy.ts @@ -120,7 +120,9 @@ requires_openai_auth = true`, -H "Content-Type: application/json" \\ -d '{ "model": "gpt-5.4", - "messages": [{ "role": "user", "content": "Hello, FishXCode!" }] + "messages": [ + { "role": "user", "content": "Hello" } + ] }'`, }, ]; diff --git a/src/lib/home-redesign-copy.ts b/src/lib/home-redesign-copy.ts new file mode 100644 index 0000000..8a8639c --- /dev/null +++ b/src/lib/home-redesign-copy.ts @@ -0,0 +1,247 @@ +import type { Locale } from './i18n'; + +export type HomeRedesignCopy = { + heroTitle: readonly [string, string]; + badge: string; + stats: readonly [ + { label: string; value: string }, + { label: string; value: string }, + { label: string; value: string }, + { label: string; value: string }, + ]; + reliability: { eyebrow: string; title: string; description: string; linkLabel: string }; + status: { + title: string; + legend: readonly [string, string, string]; + note: string; + loading: string; + error: string; + retry: string; + }; +}; + +export const HOME_REDESIGN_COPY: Record = { + zh: { + heroTitle: ['企业级 LLM API', '网关,开箱即用'], + badge: '统一网关 · 官方直连 · 实时状态', + stats: [ + { label: '在售模型', value: '85+' }, + { label: '上游厂商', value: '9' }, + { label: '24h 可用率', value: '99.94%' }, + { label: '平均延迟', value: '1.2s' }, + ], + reliability: { + eyebrow: '可靠性', + title: '自建官方账号池,自动故障切换', + description: '每个模型背后有多个官方账号;失败自动重试下一个,客户端无需任何配置。', + linkLabel: '了解容灾机制 →', + }, + status: { + title: '实时模型状态', + legend: ['正常', '缓慢', '故障'], + note: '每个方块 = 一个在测模型,悬停查看详情', + loading: '正在读取状态数据…', + error: '状态数据暂时不可用', + retry: '重试', + }, + }, + en: { + heroTitle: ['Enterprise-grade LLM API', 'gateway, ready out of the box'], + badge: 'Unified gateway · Direct upstreams · Live status', + stats: [ + { label: 'Models available', value: '85+' }, + { label: 'Upstream providers', value: '9' }, + { label: '24h uptime', value: '99.94%' }, + { label: 'Average latency', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Reliability', + title: 'Self-built official account pools with automatic failover', + description: + 'Every model is backed by multiple official accounts. If one fails, the next is retried automatically, with no client-side configuration needed.', + linkLabel: 'Learn about failover →', + }, + status: { + title: 'Live model status', + legend: ['Operational', 'Degraded', 'Outage'], + note: 'Each square represents a monitored model — hover for details', + loading: 'Loading status data…', + error: 'Status data is temporarily unavailable', + retry: 'Retry', + }, + }, + fr: { + heroTitle: ['API LLM de niveau entreprise,', 'clé en main'], + badge: 'Passerelle unifiée · Flux directs · État en direct', + stats: [ + { label: 'Modèles disponibles', value: '85+' }, + { label: 'Fournisseurs en amont', value: '9' }, + { label: 'Disponibilité sur 24 h', value: '99.94%' }, + { label: 'Latence moyenne', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Fiabilité', + title: 'Pools de comptes officiels internes et basculement automatique', + description: + 'Chaque modèle s’appuie sur plusieurs comptes officiels : en cas d’échec, la requête est automatiquement réessayée sur le compte suivant, sans aucune configuration côté client.', + linkLabel: 'Découvrir la tolérance aux pannes →', + }, + status: { + title: 'État des modèles en direct', + legend: ['Normal', 'Lent', 'Indisponible'], + note: 'Chaque carré correspond à un modèle surveillé ; survolez-le pour plus de détails', + loading: 'Chargement des données de statut…', + error: 'Données de statut temporairement indisponibles', + retry: 'Réessayer', + }, + }, + es: { + heroTitle: ['API LLM de nivel empresarial,', 'lista para usar'], + badge: 'Puerta de enlace unificada · Conexión directa · Estado en vivo', + stats: [ + { label: 'Modelos disponibles', value: '85+' }, + { label: 'Proveedores de origen', value: '9' }, + { label: 'Disponibilidad 24 h', value: '99.94%' }, + { label: 'Latencia media', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Fiabilidad', + title: 'Pools de cuentas oficiales propios con conmutación automática por error', + description: + 'Cada modelo cuenta con varias cuentas oficiales: si una falla, se reintenta automáticamente con la siguiente, sin necesidad de configuración en el cliente.', + linkLabel: 'Conocer el mecanismo de tolerancia a fallos →', + }, + status: { + title: 'Estado de los modelos en tiempo real', + legend: ['Normal', 'Lento', 'Caído'], + note: 'Cada cuadrado representa un modelo monitorizado; pase el cursor para ver los detalles', + loading: 'Cargando datos de estado…', + error: 'Datos de estado no disponibles temporalmente', + retry: 'Reintentar', + }, + }, + pt: { + heroTitle: ['API LLM de nível empresarial,', 'pronta para usar'], + badge: 'Gateway unificado · Conexão direta · Status ao vivo', + stats: [ + { label: 'Modelos disponíveis', value: '85+' }, + { label: 'Provedores de origem', value: '9' }, + { label: 'Disponibilidade em 24h', value: '99.94%' }, + { label: 'Latência média', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Confiabilidade', + title: 'Pools de contas oficiais próprios com failover automático', + description: + 'Cada modelo conta com várias contas oficiais; em caso de falha, a próxima é tentada automaticamente, sem qualquer configuração no cliente.', + linkLabel: 'Saiba mais sobre a tolerância a falhas →', + }, + status: { + title: 'Status dos modelos em tempo real', + legend: ['Normal', 'Lento', 'Indisponível'], + note: 'Cada quadrado representa um modelo monitorado; passe o mouse para ver os detalhes', + loading: 'Carregando dados de status…', + error: 'Dados de status temporariamente indisponíveis', + retry: 'Tentar novamente', + }, + }, + ru: { + heroTitle: ['Корпоративный LLM API-шлюз', 'готов к работе сразу'], + badge: 'Единый шлюз · Прямые каналы · Живой статус', + stats: [ + { label: 'Доступные модели', value: '85+' }, + { label: 'Провайдеры', value: '9' }, + { label: 'Доступность за 24 ч', value: '99.94%' }, + { label: 'Средняя задержка', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Надёжность', + title: 'Собственные пулы официальных аккаунтов с автоматическим переключением', + description: + 'За каждой моделью закреплено несколько официальных аккаунтов: при сбое запрос автоматически повторяется на следующем, без каких-либо настроек на стороне клиента.', + linkLabel: 'Подробнее об отказоустойчивости →', + }, + status: { + title: 'Статус моделей в реальном времени', + legend: ['Норма', 'Медленно', 'Сбой'], + note: 'Каждый квадрат — модель, за которой ведётся мониторинг; наведите курсор для подробностей', + loading: 'Загрузка данных о состоянии…', + error: 'Данные о состоянии временно недоступны', + retry: 'Повторить', + }, + }, + ja: { + heroTitle: ['エンタープライズ向け LLM API', 'ゲートウェイ、すぐに使えます'], + badge: '統一ゲートウェイ · 公式直結 · リアルタイム状態', + stats: [ + { label: '提供モデル数', value: '85+' }, + { label: 'アップストリーム事業者', value: '9' }, + { label: '24 時間稼働率', value: '99.94%' }, + { label: '平均レイテンシー', value: '1.2s' }, + ], + reliability: { + eyebrow: '信頼性', + title: '公式アカウントプールを自前で構築し、自動フェイルオーバー', + description: + '各モデルの背後には複数の公式アカウントがあり、失敗時には次のアカウントへ自動的に再試行します。クライアント側の設定は不要です。', + linkLabel: '障害復旧の仕組みを見る →', + }, + status: { + title: 'リアルタイムのモデルステータス', + legend: ['正常', '遅延', '障害'], + note: '各四角は監視中のモデルです。ホバーすると詳細を確認できます', + loading: 'ステータスデータを読み込み中…', + error: 'ステータスデータを一時的に取得できません', + retry: '再試行', + }, + }, + vi: { + heroTitle: ['API LLM cấp doanh nghiệp,', 'sẵn sàng dùng ngay'], + badge: 'Gateway thống nhất · Kết nối trực tiếp · Trạng thái trực tiếp', + stats: [ + { label: 'Mô hình đang cung cấp', value: '85+' }, + { label: 'Nhà cung cấp phía trên', value: '9' }, + { label: 'Tỷ lệ sẵn sàng 24h', value: '99.94%' }, + { label: 'Độ trễ trung bình', value: '1.2s' }, + ], + reliability: { + eyebrow: 'Độ tin cậy', + title: 'Tự xây dựng pool tài khoản chính thức, tự động chuyển đổi dự phòng', + description: + 'Mỗi mô hình có nhiều tài khoản chính thức phía sau; khi một tài khoản lỗi, hệ thống tự động thử tài khoản tiếp theo, không cần cấu hình gì ở phía client.', + linkLabel: 'Tìm hiểu cơ chế chịu lỗi →', + }, + status: { + title: 'Trạng thái mô hình thời gian thực', + legend: ['Bình thường', 'Chậm', 'Lỗi'], + note: 'Mỗi ô vuông là một mô hình đang được theo dõi; di chuột để xem chi tiết', + loading: 'Đang tải dữ liệu trạng thái…', + error: 'Dữ liệu trạng thái tạm thời không khả dụng', + retry: 'Thử lại', + }, + }, + 'zh-TW': { + heroTitle: ['企業級 LLM API', '閘道,開箱即用'], + badge: '統一閘道 · 官方直連 · 即時狀態', + stats: [ + { label: '在售模型', value: '85+' }, + { label: '上游廠商', value: '9' }, + { label: '24h 可用率', value: '99.94%' }, + { label: '平均延遲', value: '1.2s' }, + ], + reliability: { + eyebrow: '可靠性', + title: '自建官方帳號池,自動故障切換', + description: '每個模型背後有多個官方帳號;失敗時自動重試下一個,客戶端無需任何設定。', + linkLabel: '瞭解容災機制 →', + }, + status: { + title: '即時模型狀態', + legend: ['正常', '緩慢', '故障'], + note: '每個方塊 = 一個在測模型,將游標移入查看詳情', + loading: '正在讀取狀態資料…', + error: '狀態資料暫時無法使用', + retry: '重試', + }, + }, +};