2026-04-13 04:52:01 -04:00
|
|
|
import PropTypes from "prop-types";
|
|
|
|
|
|
feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
runwayml, stability-ai, topaz, black-forest-labs
2026-05-04 23:32:59 -04:00
|
|
|
export default function ModelRow({ model, fullModel, alias, copied, onCopy, testStatus, isCustom, isFree, onDeleteAlias, onTest, isTesting, onDisable }) {
|
2026-04-13 04:52:01 -04:00
|
|
|
const borderColor = testStatus === "ok"
|
|
|
|
|
? "border-green-500/40"
|
|
|
|
|
: testStatus === "error"
|
|
|
|
|
? "border-red-500/40"
|
|
|
|
|
: "border-border";
|
|
|
|
|
|
|
|
|
|
const iconColor = testStatus === "ok"
|
|
|
|
|
? "#22c55e"
|
|
|
|
|
: testStatus === "error"
|
|
|
|
|
? "#ef4444"
|
|
|
|
|
: undefined;
|
|
|
|
|
|
|
|
|
|
return (
|
2026-05-01 05:34:07 -04:00
|
|
|
<div className={`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${borderColor} hover:bg-sidebar/50`}>
|
|
|
|
|
<div className="flex min-w-0 items-start gap-2 sm:items-center">
|
2026-04-13 04:52:01 -04:00
|
|
|
<span
|
2026-05-01 05:34:07 -04:00
|
|
|
className="material-symbols-outlined shrink-0 text-base"
|
2026-04-13 04:52:01 -04:00
|
|
|
style={iconColor ? { color: iconColor } : undefined}
|
|
|
|
|
>
|
|
|
|
|
{testStatus === "ok" ? "check_circle" : testStatus === "error" ? "cancel" : "smart_toy"}
|
|
|
|
|
</span>
|
2026-05-01 05:34:07 -04:00
|
|
|
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
|
|
|
<code className="max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]">{fullModel}</code>
|
|
|
|
|
{model.name && <span className="truncate pl-1 text-[9px] italic text-text-muted/70">{model.name}</span>}
|
2026-04-13 04:52:01 -04:00
|
|
|
</div>
|
|
|
|
|
{onTest && (
|
2026-05-01 05:34:07 -04:00
|
|
|
<div className="relative shrink-0 group/btn">
|
2026-04-13 04:52:01 -04:00
|
|
|
<button
|
|
|
|
|
onClick={onTest}
|
|
|
|
|
disabled={isTesting}
|
2026-05-01 05:34:07 -04:00
|
|
|
className={`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${isTesting ? "opacity-100" : "opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`}
|
2026-04-13 04:52:01 -04:00
|
|
|
>
|
|
|
|
|
<span className="material-symbols-outlined text-sm" style={isTesting ? { animation: "spin 1s linear infinite" } : undefined}>
|
|
|
|
|
{isTesting ? "progress_activity" : "science"}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
<span className="pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity">
|
|
|
|
|
{isTesting ? "Testing..." : "Test"}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-05-01 05:34:07 -04:00
|
|
|
<div className="relative shrink-0 group/btn">
|
2026-04-13 04:52:01 -04:00
|
|
|
<button
|
|
|
|
|
onClick={() => onCopy(fullModel, `model-${model.id}`)}
|
2026-05-01 05:34:07 -04:00
|
|
|
className="rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary"
|
2026-04-13 04:52:01 -04:00
|
|
|
>
|
|
|
|
|
<span className="material-symbols-outlined text-sm">
|
|
|
|
|
{copied === `model-${model.id}` ? "check" : "content_copy"}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
<span className="pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity">
|
|
|
|
|
{copied === `model-${model.id}` ? "Copied!" : "Copy"}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
runwayml, stability-ai, topaz, black-forest-labs
2026-05-04 23:32:59 -04:00
|
|
|
{isCustom ? (
|
2026-04-13 04:52:01 -04:00
|
|
|
<button
|
|
|
|
|
onClick={onDeleteAlias}
|
2026-05-01 05:34:07 -04:00
|
|
|
className="ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100"
|
2026-04-13 04:52:01 -04:00
|
|
|
title="Remove custom model"
|
|
|
|
|
>
|
|
|
|
|
<span className="material-symbols-outlined text-sm">close</span>
|
|
|
|
|
</button>
|
feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
runwayml, stability-ai, topaz, black-forest-labs
2026-05-04 23:32:59 -04:00
|
|
|
) : onDisable ? (
|
|
|
|
|
<button
|
|
|
|
|
onClick={onDisable}
|
|
|
|
|
className="ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100"
|
|
|
|
|
title="Disable this model"
|
|
|
|
|
>
|
|
|
|
|
<span className="material-symbols-outlined text-sm">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
) : null}
|
2026-04-13 04:52:01 -04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ModelRow.propTypes = {
|
|
|
|
|
model: PropTypes.shape({
|
|
|
|
|
id: PropTypes.string.isRequired,
|
|
|
|
|
}).isRequired,
|
|
|
|
|
fullModel: PropTypes.string.isRequired,
|
|
|
|
|
alias: PropTypes.string,
|
|
|
|
|
copied: PropTypes.string,
|
|
|
|
|
onCopy: PropTypes.func.isRequired,
|
|
|
|
|
testStatus: PropTypes.oneOf(["ok", "error"]),
|
|
|
|
|
isCustom: PropTypes.bool,
|
|
|
|
|
isFree: PropTypes.bool,
|
|
|
|
|
onDeleteAlias: PropTypes.func,
|
|
|
|
|
onTest: PropTypes.func,
|
|
|
|
|
isTesting: PropTypes.bool,
|
feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
runwayml, stability-ai, topaz, black-forest-labs
2026-05-04 23:32:59 -04:00
|
|
|
onDisable: PropTypes.func,
|
2026-04-13 04:52:01 -04:00
|
|
|
};
|