Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
feat(ui): full provider-UI gap fixes
diegosouzapw1343768de16d
diff --git a/package-lock.json b/package-lock.jsonindex 53511701ad..582f831666 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute",- "version": "2.0.19",+ "version": "2.0.20","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute",- "version": "2.0.19",+ "version": "2.0.20","hasInstallScript": true,"license": "MIT","workspaces": [diff --git a/src/app/(dashboard)/dashboard/agents/page.tsx b/src/app/(dashboard)/dashboard/agents/page.tsxindex 5df960c502..6c62c42fde 100644--- a/src/app/(dashboard)/dashboard/agents/page.tsx+++ b/src/app/(dashboard)/dashboard/agents/page.tsx@@ -192,7 +192,19 @@ export default function AgentsPage() {<div className="flex flex-col gap-4"><p className="text-sm text-text-muted">{ts("cliFingerprintDesc")}</p><div className="flex flex-wrap gap-2">- {(["codex", "claude", "github", "antigravity"] as const).map((providerId) => {+ {(+ [+ "codex",+ "claude",+ "github",+ "antigravity",+ "kiro",+ "cursor",+ "kimi-coding",+ "kilocode",+ "cline",+ ] as const+ ).map((providerId) => {const providerMeta = Object.values(AI_PROVIDERS).find((p: any) => p.id === providerId) as any;diff --git a/src/app/(dashboard)/dashboard/media/MediaPageClient.tsx b/src/app/(dashboard)/dashboard/media/MediaPageClient.tsxindex 431b61329c..ffcb12b604 100644--- a/src/app/(dashboard)/dashboard/media/MediaPageClient.tsx+++ b/src/app/(dashboard)/dashboard/media/MediaPageClient.tsx@@ -3,7 +3,7 @@import { useState } from "react";import { useTranslations } from "next-intl";-type Modality = "image" | "video" | "music" | "speech";+type Modality = "image" | "video" | "music" | "speech" | "transcription";type GenerationResult = {type: Modality;data: any;@@ -13,7 +13,14 @@ type GenerationResult = {const MODALITY_CONFIG: Record<Modality,- { icon: string; endpoint: string; label: string; placeholder: string; color: string }+ {+ icon: string;+ endpoint: string;+ label: string;+ placeholder?: string;+ color: string;+ textLabel?: string;+ }> = {image: {icon: "image",@@ -42,12 +49,229 @@ const MODALITY_CONFIG: Record<label: "Text to Speech",placeholder: "Hello! Welcome to OmniRoute, your intelligent AI gateway...",color: "from-green-500 to-teal-500",+ textLabel: "Text",+ },+ transcription: {+ icon: "mic",+ endpoint: "/api/v1/audio/transcriptions",+ label: "Transcription",+ placeholder: "Upload an audio file to transcribe...",+ color: "from-indigo-500 to-blue-500",},};-// Provider-aware voice options for the TTS speech tab-const PROVIDER_VOICE_PRESETS: Record<string, { id: string; label: string }[]> = {- // OpenAI standard voices (also used as defaults)+// Static provider+model registry (mirrors open-sse/config/*Registry.ts)+// — kept client-side so no API round-trip needed.+const PROVIDER_MODELS: Record<+ Modality,+ { id: string; name: string; models: { id: string; name: string }[] }[]+> = {+ image: [+ {+ id: "openai",+ name: "OpenAI",+ models: [+ { id: "openai/dall-e-3", name: "DALL-E 3" },+ { id: "openai/dall-e-2", name: "DALL-E 2" },+ ],+ },+ { id: "xai", name: "xAI (Grok)", models: [{ id: "xai/grok-2-image", name: "Grok 2 Image" }] },+ {+ id: "together",+ name: "Together AI",+ models: [+ { id: "together/stable-diffusion-xl", name: "SDXL" },+ { id: "together/FLUX.1-schnell-Free", name: "FLUX.1 Schnell" },+ ],+ },+ {+ id: "fireworks",+ name: "Fireworks AI",+ models: [+ { id: "fireworks/stable-diffusion-xl-1024-v1-0", name: "SDXL 1024" },+ { id: "fireworks/flux-1-dev-fp8", name: "FLUX.1 Dev" },+ ],+ },+ {+ id: "nebius",+ name: "Nebius AI",+ models: [+ { id: "nebius/flux-dev", name: "FLUX Dev" },+ { id: "nebius/sdxl", name: "SDXL" },+ ],+ },+ {+ id: "hyperbolic",+ name: "Hyperbolic",+ models: [+ { id: "hyperbolic/SDXL1.0-base", name: "SDXL Base" },+ { id: "hyperbolic/stable-diffusion-2", name: "SD 2" },+ ],+ },+ {+ id: "nanobanana",+ name: "NanoBanana",+ models: [{ id: "nanobanana/flux-schnell", name: "FLUX Schnell" }],+ },+ {+ id: "sdwebui",+ name: "SD WebUI",+ models: [{ id: "sdwebui/sd_xl_base_1.0", name: "SDXL Base (Local)" }],+ },+ {+ id: "comfyui",+ name: "ComfyUI",+ models: [+ { id: "comfyui/flux-dev", name: "FLUX Dev (Local)" },+ { id: "comfyui/sdxl", name: "SDXL (Local)" },+ ],+ },+ ],+ video: [+ {+ id: "comfyui",+ name: "ComfyUI",+ models: [+ { id: "comfyui/animatediff", name: "AnimateDiff" },+ { id: "comfyui/svd", name: "Stable Video Diffusion" },+ ],+ },+ {+ id: "sdwebui",+ name: "SD WebUI",+ models: [{ id: "sdwebui/animatediff", name: "AnimateDiff (Local)" }],+ },+ ],+ music: [+ {+ id: "comfyui",+ name: "ComfyUI",+ models: [+ { id: "comfyui/stable-audio", name: "Stable Audio Open" },+ { id: "comfyui/musicgen", name: "MusicGen" },+ ],+ },+ ],+ speech: [+ {+ id: "openai",+ name: "OpenAI",+ models: [+ { id: "openai/tts-1", name: "TTS-1" },+ { id: "openai/tts-1-hd", name: "TTS-1 HD" },+ { id: "openai/gpt-4o-mini-tts", name: "GPT-4o Mini TTS" },+ ],+ },+ {+ id: "elevenlabs",+ name: "ElevenLabs",+ models: [+ { id: "elevenlabs/eleven_multilingual_v2", name: "Eleven Multilingual v2" },+ { id: "elevenlabs/eleven_turbo_v2_5", name: "Eleven Turbo v2.5" },+ ],+ },+ {+ id: "deepgram",+ name: "Deepgram",+ models: [+ { id: "deepgram/aura-asteria-en", name: "Aura Asteria (EN)" },+ { id: "deepgram/aura-luna-en", name: "Aura Luna (EN)" },+ { id: "deepgram/aura-stella-en", name: "Aura Stella (EN)" },+ ],+ },+ {+ id: "hyperbolic",+ name: "Hyperbolic",+ models: [{ id: "hyperbolic/melo-tts", name: "Melo TTS" }],+ },+ {+ id: "nvidia",+ name: "NVIDIA NIM",+ models: [+ { id: "nvidia/fastpitch", name: "FastPitch" },+ { id: "nvidia/tacotron2", name: "Tacotron2" },+ ],+ },+ {+ id: "inworld",+ name: "Inworld",+ models: [+ { id: "inworld/inworld-tts-1.5-max", name: "Inworld TTS Max" },+ { id: "inworld/inworld-tts-1.5-mini", name: "Inworld TTS Mini" },+ ],+ },+ {+ id: "cartesia",+ name: "Cartesia",+ models: [+ { id: "cartesia/sonic-2", name: "Sonic 2" },+ { id: "cartesia/sonic-3", name: "Sonic 3" },+ ],+ },+ {+ id: "playht",+ name: "PlayHT",+ models: [+ { id: "playht/PlayDialog", name: "PlayDialog" },+ { id: "playht/Play3.0-mini", name: "Play3.0 Mini" },+ ],+ },+ {+ id: "huggingface",+ name: "HuggingFace",+ models: [{ id: "huggingface/espnet/kan-bayashi_ljspeech_vits", name: "VITS LJSpeech" }],+ },+ { id: "qwen", name: "Qwen", models: [{ id: "qwen/qwen3-tts", name: "Qwen3 TTS" }] },+ ],+ transcription: [+ {+ id: "openai",+ name: "OpenAI",+ models: [+ { id: "openai/whisper-1", name: "Whisper 1" },+ { id: "openai/gpt-4o-transcription", name: "GPT-4o Transcription" },+ ],+ },+ {+ id: "groq",+ name: "Groq",+ models: [+ { id: "groq/whisper-large-v3", name: "Whisper Large v3" },+ { id: "groq/whisper-large-v3-turbo", name: "Whisper Turbo" },+ ],+ },+ {+ id: "deepgram",+ name: "Deepgram",+ models: [+ { id: "deepgram/nova-3", name: "Nova 3" },+ { id: "deepgram/nova-2", name: "Nova 2" },+ ],+ },+ {+ id: "assemblyai",+ name: "AssemblyAI",+ models: [+ { id: "assemblyai/universal-3-pro", name: "Universal 3 Pro" },+ { id: "assemblyai/universal-2", name: "Universal 2" },+ ],+ },+ {+ id: "nvidia",+ name: "NVIDIA NIM",+ models: [{ id: "nvidia/nvidia/parakeet-ctc-1.1b-asr", name: "Parakeet CTC 1.1B" }],+ },+ {+ id: "huggingface",+ name: "HuggingFace",+ models: [{ id: "huggingface/openai/whisper-large-v3", name: "Whisper Large v3 (HF)" }],+ },+ { id: "qwen", name: "Qwen", models: [{ id: "qwen/qwen3-asr", name: "Qwen3 ASR" }] },+ ],+};++// Voice presets per TTS provider+const VOICE_PRESETS: Record<string, { id: string; label: string }[]> = {default: [{ id: "alloy", label: "Alloy" },{ id: "echo", label: "Echo" },@@ -56,25 +280,22 @@ const PROVIDER_VOICE_PRESETS: Record<string, { id: string; label: string }[]> ={ id: "nova", label: "Nova" },{ id: "shimmer", label: "Shimmer" },],- // ElevenLabs — popular premade voice IDselevenlabs: [- { id: "21m00Tcm4TlvDq8ikWAM", label: "Rachel (EN, calm)" },- { id: "AZnzlk1XvdvUeBnXmlld", label: "Domi (EN, strong)" },- { id: "EXAVITQu4vr4xnSDxMaL", label: "Bella (EN, soft)" },- { id: "ErXwobaYiN019PkySvjV", label: "Antoni (EN, well-rounded)" },- { id: "MF3mGyEYCl7XYWbV9V6O", label: "Elli (EN, young)" },- { id: "TxGEqnHWrfWFTfGW9XjX", label: "Josh (EN, deep)" },- { id: "VR6AewLTigWG4xSOukaG", label: "Arnold (EN, crisp)" },- { id: "pNInz6obpgDQGcFmaJgB", label: "Adam (EN, deep)" },- { id: "yoZ06aMxZJJ28mfd3POQ", label: "Sam (EN, raspy)" },+ { id: "21m00Tcm4TlvDq8ikWAM", label: "Rachel (EN)" },+ { id: "AZnzlk1XvdvUeBnXmlld", label: "Domi (EN)" },+ { id: "EXAVITQu4vr4xnSDxMaL", label: "Bella (EN)" },+ { id: "ErXwobaYiN019PkySvjV", label: "Antoni (EN)" },+ { id: "MF3mGyEYCl7XYWbV9V6O", label: "Elli (EN)" },+ { id: "TxGEqnHWrfWFTfGW9XjX", label: "Josh (EN)" },+ { id: "VR6AewLTigWG4xSOukaG", label: "Arnold (EN)" },+ { id: "pNInz6obpgDQGcFmaJgB", label: "Adam (EN)" },+ { id: "yoZ06aMxZJJ28mfd3POQ", label: "Sam (EN)" },],- // Cartesia — Sonic model default voicecartesia: [{ id: "a0e99841-438c-4a64-b679-ae501e7d6091", label: "Barbershop Man" },{ id: "694f9389-aac1-45b6-b726-9d9369183238", label: "Friendly Reading Man" },{ id: "b7d50908-b17c-442d-ad8d-810c63997ed9", label: "California Girl" },],- // Deepgram Aura voicesdeepgram: [{ id: "aura-asteria-en", label: "Asteria (EN)" },{ id: "aura-luna-en", label: "Luna (EN)" },@@ -82,95 +303,107 @@ const PROVIDER_VOICE_PRESETS: Record<string, { id: string; label: string }[]> ={ id: "aura-zeus-en", label: "Zeus (EN)" },{ id: "aura-orion-en", label: "Orion (EN)" },],- // Inworld TTS voicesinworld: [{ id: "Eva", label: "Eva (EN)" },{ id: "Marcus", label: "Marcus (EN)" },],};-function getVoicePresets(modelId: string) {- for (const prefix of Object.keys(PROVIDER_VOICE_PRESETS)) {- if (prefix !== "default" && modelId.startsWith(prefix + "/")) {- return PROVIDER_VOICE_PRESETS[prefix];- }- }- return PROVIDER_VOICE_PRESETS.default;-}-const SPEECH_FORMATS = ["mp3", "wav", "opus", "flac", "pcm"];+function getVoiceList(providerId: string) {+ return VOICE_PRESETS[providerId] ?? VOICE_PRESETS.default;+}+export default function MediaPageClient() {const t = useTranslations("media");const [activeTab, setActiveTab] = useState<Modality>("image");const [prompt, setPrompt] = useState("");- const [model, setModel] = useState("");- const [models, setModels] = useState<any[]>([]);++ // Selected provider and model per modality+ const [selectedProvider, setSelectedProvider] = useState<string>("");+ const [selectedModel, setSelectedModel] = useState<string>("");+const [loading, setLoading] = useState(false);- const [loadingModels, setLoadingModels] = useState(false);const [result, setResult] = useState<GenerationResult | null>(null);const [error, setError] = useState<string | null>(null);- // Speech-specific state++ // Speech-specificconst [speechVoice, setSpeechVoice] = useState("alloy");const [speechFormat, setSpeechFormat] = useState("mp3");- // Fetch available models for each modality- const fetchModels = async (modality: Modality) => {- if (modality === "speech") {- // Models come from /v1/models filtered by speech providers- setModels([]);- return;- }- setLoadingModels(true);- try {- const res = await fetch(MODALITY_CONFIG[modality].endpoint);- if (res.ok) {- const data = await res.json();- const modelList = data.data || [];- setModels(modelList);- if (modelList.length > 0) setModel(modelList[0].id);- }- } catch {- setModels([]);- }- setLoadingModels(false);- };+ // Transcription-specific+ const [audioFile, setAudioFile] = useState<File | null>(null);++ const currentProviders = PROVIDER_MODELS[activeTab] ?? [];+ const currentModels = currentProviders.find((p) => p.id === selectedProvider)?.models ?? [];const switchTab = (tab: Modality) => {setActiveTab(tab);setPrompt("");setResult(null);setError(null);- fetchModels(tab);+ setAudioFile(null);+ // Pick first provider and first model automatically+ const providers = PROVIDER_MODELS[tab] ?? [];+ const firstProvider = providers[0];+ setSelectedProvider(firstProvider?.id ?? "");+ const firstModel = firstProvider?.models[0]?.id ?? "";+ setSelectedModel(firstModel);+ if (tab === "speech") {+ setSpeechVoice(getVoiceList(firstProvider?.id ?? "")[0]?.id ?? "alloy");+ }};+ const handleProviderChange = (providerId: string) => {+ setSelectedProvider(providerId);+ const models = PROVIDER_MODELS[activeTab]?.find((p) => p.id === providerId)?.models ?? [];+ const firstModel = models[0]?.id ?? "";+ setSelectedModel(firstModel);+ if (activeTab === "speech") {+ setSpeechVoice(getVoiceList(providerId)[0]?.id ?? "alloy");+ }+ };++ // Initialize on mount — pick first provider/model for image tab+ const [initialized, setInitialized] = useState(false);+ if (!initialized) {+ setInitialized(true);+ const providers = PROVIDER_MODELS["image"] ?? [];+ const firstProvider = providers[0];+ setSelectedProvider(firstProvider?.id ?? "");+ setSelectedModel(firstProvider?.models[0]?.id ?? "");+ }+const handleGenerate = async () => {- if (!prompt.trim()) return;setLoading(true);setError(null);setResult(null);try {const config = MODALITY_CONFIG[activeTab];+ const modelId = selectedModel;if (activeTab === "speech") {- // TTS: returns binary audio stream — create a Blob URL for <audio>+ if (!prompt.trim()) {+ setError("Please enter text to synthesize.");+ setLoading(false);+ return;+ }const res = await fetch(config.endpoint, {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify({- model: model || "openai/tts-1",+ model: modelId,input: prompt.trim(),voice: speechVoice,response_format: speechFormat,}),});-if (!res.ok) {- const errData = await res.json().catch(() => ({}));- throw new Error(errData?.error?.message || `TTS failed (${res.status})`);+ const e = await res.json().catch(() => ({}));+ throw new Error(e?.error?.message || `TTS failed (${res.status})`);}-const blob = await res.blob();const audioUrl = URL.createObjectURL(blob);setResult({@@ -183,21 +416,44 @@ export default function MediaPageClient() {return;}+ if (activeTab === "transcription") {+ if (!audioFile) {+ setError("Please select an audio file to transcribe.");+ setLoading(false);+ return;+ }+ const form = new FormData();+ form.append("file", audioFile);+ form.append("model", modelId);+ const res = await fetch(config.endpoint, { method: "POST", body: form });+ if (!res.ok) {+ const e = await res.json().catch(() => ({}));+ throw new Error(e?.error?.message || `Transcription failed (${res.status})`);+ }+ const data = await res.json();+ setResult({ type: "transcription", data, timestamp: Date.now() });+ setLoading(false);+ return;+ }++ if (!prompt.trim()) {+ setError("Please enter a prompt.");+ setLoading(false);+ return;+ }const res = await fetch(config.endpoint, {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify({- model: model || undefined,+ model: modelId,prompt: prompt.trim(),...(activeTab === "image" ? { size: "1024x1024", n: 1 } : {}),}),});-if (!res.ok) {- const errData = await res.json().catch(() => ({}));- throw new Error(errData?.error?.message || `Generation failed (${res.status})`);+ const e = await res.json().catch(() => ({}));+ throw new Error(e?.error?.message || `Generation failed (${res.status})`);}-const data = await res.json();setResult({ type: activeTab, data, timestamp: Date.now() });} catch (err: any) {@@ -206,12 +462,8 @@ export default function MediaPageClient() {setLoading(false);};- // Load models on first render- useState(() => {- fetchModels("image");- });-const config = MODALITY_CONFIG[activeTab];+ const voiceList = getVoiceList(selectedProvider);return (<div className="space-y-6">@@ -222,7 +474,7 @@ export default function MediaPageClient() {</div>{/* Modality Tabs */}- <div className="flex gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5">+ <div className="flex flex-wrap gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5">{(Object.keys(MODALITY_CONFIG) as Modality[]).map((key) => {const cfg = MODALITY_CONFIG[key];const isActive = key === activeTab;@@ -230,7 +482,7 @@ export default function MediaPageClient() {<buttonkey={key}onClick={() => switchTab(key)}- className={`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${+ className={`flex-1 min-w-[110px] flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${isActive? "bg-primary/10 text-primary shadow-sm border border-primary/20": "text-text-muted hover:text-text-main hover:bg-surface/80"@@ -245,101 +497,113 @@ export default function MediaPageClient() {{/* Generation Form */}<div className="bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6 space-y-4">- {/* Model selector (not shown for speech — use manual model input) */}- {activeTab !== "speech" && (+ {/* Provider + Model row */}+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">+ {/* Provider dropdown */}+ <div>+ <label className="block text-sm font-medium text-text-main mb-2">Provider</label>+ <select+ value={selectedProvider}+ onChange={(e) => handleProviderChange(e.target.value)}+ className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"+ >+ {currentProviders.map((p) => (+ <option key={p.id} value={p.id}>+ {p.name}+ </option>+ ))}+ </select>+ </div>++ {/* Model dropdown */}<div><label className="block text-sm font-medium text-text-main mb-2">{t("model")}</label>- {loadingModels ? (- <div className="flex items-center gap-2 text-text-muted text-sm">- <span className="material-symbols-outlined animate-spin text-[16px]">- progress_activity- </span>- {t("loadingModels")}- </div>- ) : models.length > 0 ? (+ <select+ value={selectedModel}+ onChange={(e) => setSelectedModel(e.target.value)}+ className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"+ >+ {currentModels.map((m) => (+ <option key={m.id} value={m.id}>+ {m.name}+ </option>+ ))}+ </select>+ </div>+ </div>++ {/* Speech: voice + format */}+ {activeTab === "speech" && (+ <div className="grid grid-cols-2 gap-4">+ <div>+ <label className="block text-sm font-medium text-text-main mb-2">Voice</label><select- value={model}- onChange={(e) => setModel(e.target.value)}+ value={speechVoice}+ onChange={(e) => setSpeechVoice(e.target.value)}className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30">- {models.map((m) => (- <option key={m.id} value={m.id}>- {m.id}+ {voiceList.map((v) => (+ <option key={v.id} value={v.id}>+ {v.label}</option>))}</select>- ) : (- <p className="text-text-muted text-sm">{t("noModels")}</p>- )}- </div>- )}-- {/* Speech: model input + voice + format */}- {activeTab === "speech" && (- <>- <div>- <label className="block text-sm font-medium text-text-main mb-2">{t("model")}</label>- <input- type="text"- value={model}- onChange={(e) => setModel(e.target.value)}- placeholder="openai/tts-1 · elevenlabs/eleven_multilingual_v2 · cartesia/sonic-3"- className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30"- /></div>- <div className="grid grid-cols-2 gap-4">- <div>- <label className="block text-sm font-medium text-text-main mb-2">Voice</label>- <select- value={speechVoice}- onChange={(e) => setSpeechVoice(e.target.value)}- className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"- >- {getVoicePresets(model).map((v) => (- <option key={v.id} value={v.id}>- {v.label}- </option>- ))}- </select>- </div>- <div>- <label className="block text-sm font-medium text-text-main mb-2">Format</label>- <select- value={speechFormat}- onChange={(e) => setSpeechFormat(e.target.value)}- className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"- >- {SPEECH_FORMATS.map((f) => (- <option key={f} value={f}>- {f}- </option>- ))}- </select>- </div>+ <div>+ <label className="block text-sm font-medium text-text-main mb-2">Format</label>+ <select+ value={speechFormat}+ onChange={(e) => setSpeechFormat(e.target.value)}+ className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30"+ >+ {SPEECH_FORMATS.map((f) => (+ <option key={f} value={f}>+ {f}+ </option>+ ))}+ </select></div>- </>+ </div>)}- {/* Prompt / Text */}- <div>- <label className="block text-sm font-medium text-text-main mb-2">- {activeTab === "speech" ? "Text" : t("prompt")}- </label>- <textarea- rows={3}- value={prompt}- onChange={(e) => setPrompt(e.target.value)}- placeholder={config.placeholder}- className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30 resize-none"- />- </div>+ {/* Transcription: file upload */}+ {activeTab === "transcription" ? (+ <div>+ <label className="block text-sm font-medium text-text-main mb-2">Audio File</label>+ <input+ type="file"+ accept="audio/*,video/*"+ onChange={(e) => setAudioFile(e.target.files?.[0] ?? null)}+ className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 file:mr-3 file:py-1 file:px-3 file:rounded file:border-0 file:bg-primary/10 file:text-primary file:text-sm"+ />+ {audioFile && (+ <p className="text-xs text-text-muted mt-1">+ {audioFile.name} ({(audioFile.size / 1024).toFixed(0)} KB)+ </p>+ )}+ </div>+ ) : (+ /* Prompt / Text */+ <div>+ <label className="block text-sm font-medium text-text-main mb-2">+ {activeTab === "speech" ? "Text" : t("prompt")}+ </label>+ <textarea+ rows={3}+ value={prompt}+ onChange={(e) => setPrompt(e.target.value)}+ placeholder={config.placeholder}+ className="w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30 resize-none"+ />+ </div>+ )}{/* Generate button */}<buttononClick={handleGenerate}- disabled={loading || !prompt.trim()}+ disabled={loading || (activeTab === "transcription" ? !audioFile : !prompt.trim())}className={`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg text-white font-medium transition-all bg-gradient-to-r ${config.color} ${- loading || !prompt.trim()+ loading || (activeTab === "transcription" ? !audioFile : !prompt.trim())? "opacity-50 cursor-not-allowed": "hover:opacity-90 hover:shadow-lg"}`}@@ -349,14 +613,26 @@ export default function MediaPageClient() {<span className="material-symbols-outlined animate-spin text-[18px]">progress_activity</span>- {activeTab === "speech" ? "Synthesizing..." : t("generating")}+ {activeTab === "speech"+ ? "Synthesizing..."+ : activeTab === "transcription"+ ? "Transcribing..."+ : t("generating")}</>) : (<><span className="material-symbols-outlined text-[18px]">- {activeTab === "speech" ? "volume_up" : "auto_awesome"}+ {activeTab === "speech"+ ? "volume_up"+ : activeTab === "transcription"+ ? "mic"+ : "auto_awesome"}</span>- {activeTab === "speech" ? "Synthesize Speech" : `${t("generate")} ${config.label}`}+ {activeTab === "speech"+ ? "Synthesize Speech"+ : activeTab === "transcription"+ ? "Transcribe Audio"+ : `${t("generate")} ${config.label}`}</>)}</button>@@ -388,7 +664,6 @@ export default function MediaPageClient() {</span></div>- {/* Audio player for TTS results */}{result.type === "speech" && result.audioUrl ? (<div className="space-y-3"><audio controls src={result.audioUrl} className="w-full rounded-lg" autoPlay />@@ -410,9 +685,10 @@ export default function MediaPageClient() {)}{/* Info cards */}- <div className="grid grid-cols-1 md:grid-cols-4 gap-4">+ <div className="grid grid-cols-1 md:grid-cols-5 gap-4">{(Object.keys(MODALITY_CONFIG) as Modality[]).map((key) => {const cfg = MODALITY_CONFIG[key];+ const providerCount = PROVIDER_MODELS[key]?.length ?? 0;return (<divkey={key}@@ -428,7 +704,7 @@ export default function MediaPageClient() {</div><span className="text-sm font-medium text-text-main">{cfg.label}</span></div>- <p className="text-xs text-text-muted">{t(`${key}Description`)}</p>+ <p className="text-xs text-text-muted">{providerCount} providers</p><code className="block mt-2 text-xs text-primary/70 bg-primary/5 rounded px-2 py-1">POST {cfg.endpoint}</code>diff --git a/src/app/(dashboard)/dashboard/playground/page.tsx b/src/app/(dashboard)/dashboard/playground/page.tsxindex 7e6d771878..35e989cba6 100644--- a/src/app/(dashboard)/dashboard/playground/page.tsx+++ b/src/app/(dashboard)/dashboard/playground/page.tsx@@ -23,6 +23,10 @@ const ENDPOINT_OPTIONS = [{ value: "images", label: "Image Generation" },{ value: "embeddings", label: "Embeddings" },{ value: "speech", label: "Text to Speech" },+ { value: "transcription", label: "Audio Transcription" },+ { value: "video", label: "Video Generation" },+ { value: "music", label: "Music Generation" },+ { value: "rerank", label: "Rerank" },];const DEFAULT_BODIES: Record<string, object> = {@@ -54,6 +58,32 @@ const DEFAULT_BODIES: Record<string, object> = {voice: "alloy",response_format: "mp3",},+ transcription: {+ // Note: /v1/audio/transcriptions requires multipart/form-data with a file.+ // Use curl or the Media page to upload audio files.+ model: "openai/whisper-1",+ language: "en",+ },+ video: {+ model: "comfyui/animatediff",+ prompt: "A timelapse of a sunset over the ocean",+ n: 1,+ },+ music: {+ model: "comfyui/stable-audio",+ prompt: "Calm ambient piano music with soft reverb",+ duration: 10,+ },+ rerank: {+ model: "cohere/rerank-english-v3.0",+ query: "What is the capital of France?",+ documents: [+ "Paris is the capital of France.",+ "London is the capital of England.",+ "Berlin is the capital of Germany.",+ ],+ top_n: 2,+ },};const ENDPOINT_PATHS: Record<string, string> = {@@ -62,6 +92,10 @@ const ENDPOINT_PATHS: Record<string, string> = {images: "/v1/images/generations",embeddings: "/v1/embeddings",speech: "/v1/audio/speech",+ transcription: "/v1/audio/transcriptions",+ video: "/v1/videos/generations",+ music: "/v1/music/generations",+ rerank: "/v1/rerank",};export default function PlaygroundPage() {diff --git a/src/app/400/layout.tsx b/src/app/400/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/400/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/401/layout.tsx b/src/app/401/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/401/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/403/layout.tsx b/src/app/403/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/403/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/408/layout.tsx b/src/app/408/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/408/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/429/layout.tsx b/src/app/429/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/429/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/500/layout.tsx b/src/app/500/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/500/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/502/layout.tsx b/src/app/502/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/502/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/app/503/layout.tsx b/src/app/503/layout.tsxnew file mode 100644index 0000000000..c17e1eff0c--- /dev/null+++ b/src/app/503/layout.tsx@@ -0,0 +1,3 @@+export default function ErrorLayout({ children }: { children: React.ReactNode }) {+ return children;+}diff --git a/src/shared/constants/cliTools.ts b/src/shared/constants/cliTools.tsindex 4f37ecfbd2..f66d7ea8bd 100644--- a/src/shared/constants/cliTools.ts+++ b/src/shared/constants/cliTools.ts@@ -172,6 +172,36 @@ export const CLI_TOOLS = {description: "GitHub Copilot Chat — VS Code Extension",configType: "custom",},+ opencode: {+ id: "opencode",+ name: "OpenCode",+ image: "/providers/opencode.png",+ icon: "terminal",+ color: "#FF6B35",+ description: "OpenCode AI coding agent (Terminal)",+ configType: "guide",+ guideSteps: [+ { step: 1, title: "Install OpenCode", desc: "Install via npm: npm install -g opencode-ai" },+ { step: 2, title: "API Key", type: "apiKeySelector" },+ { step: 3, title: "Set Base URL", desc: "opencode config set baseUrl {{baseUrl}}" },+ { step: 4, title: "Select Model", type: "modelSelector" },+ ],+ },+ kiro: {+ id: "kiro",+ name: "Kiro AI",+ image: "/providers/kiro.png",+ icon: "psychology_alt",+ color: "#FF6B35",+ description: "Amazon Kiro — AI-powered IDE",+ configType: "guide",+ guideSteps: [+ { step: 1, title: "Open Kiro Settings", desc: "Go to Settings → AI Provider" },+ { step: 2, title: "Base URL", value: "{{baseUrl}}", copyable: true },+ { step: 3, title: "API Key", type: "apiKeySelector" },+ { step: 4, title: "Select Model", type: "modelSelector" },+ ],+ },// HIDDEN: gemini-cli// "gemini-cli": {// id: "gemini-cli",diff --git a/src/shared/constants/providers.ts b/src/shared/constants/providers.tsindex 4e17ff43b1..7681c72657 100644--- a/src/shared/constants/providers.ts+++ b/src/shared/constants/providers.ts@@ -280,6 +280,69 @@ export const APIKEY_PROVIDERS = {textIcon: "NB",website: "https://nanobananaapi.ai",},+ "ollama-cloud": {+ id: "ollama-cloud",+ alias: "ollamacloud",+ name: "Ollama Cloud",+ icon: "cloud",+ color: "#58A6FF",+ textIcon: "OC",+ website: "https://ollama.com/settings/api-keys",+ },+ elevenlabs: {+ id: "elevenlabs",+ alias: "el",+ name: "ElevenLabs",+ icon: "record_voice_over",+ color: "#6C47FF",+ textIcon: "EL",+ website: "https://elevenlabs.io",+ },+ cartesia: {+ id: "cartesia",+ alias: "cartesia",+ name: "Cartesia",+ icon: "spatial_audio",+ color: "#FF4F8B",+ textIcon: "CA",+ website: "https://cartesia.ai",+ },+ playht: {+ id: "playht",+ alias: "playht",+ name: "PlayHT",+ icon: "play_circle",+ color: "#00B4D8",+ textIcon: "PH",+ website: "https://play.ht",+ },+ inworld: {+ id: "inworld",+ alias: "inworld",+ name: "Inworld",+ icon: "voice_chat",+ color: "#7B2EF2",+ textIcon: "IW",+ website: "https://inworld.ai",+ },+ sdwebui: {+ id: "sdwebui",+ alias: "sdwebui",+ name: "SD WebUI",+ icon: "brush",+ color: "#FF7043",+ textIcon: "SD",+ website: "https://github.com/AUTOMATIC1111/stable-diffusion-webui",+ },+ comfyui: {+ id: "comfyui",+ alias: "comfyui",+ name: "ComfyUI",+ icon: "account_tree",+ color: "#4CAF50",+ textIcon: "CF",+ website: "https://github.com/comfyanonymous/ComfyUI",+ },};export const OPENAI_COMPATIBLE_PREFIX = "openai-compatible-";