Evidence-backed use cases, prompts, integrations, evaluations, and safety notes for OpenAI GPT-6 Astra.
ai-agentsai-codingai-safetyartificial-intelligenceastraawesome-listcoding-agentscomputer-usecybersecuritydeveloper-toolsgenerative-aigpt-6gpt-6-astralarge-language-modelsllmmodel-evaluationopenaiopenai-apiprompt-engineeringresponses-api
feat: add multimodal model catalog with adaptive dropdown placement
jaiprasad042ec8919d49ff
diff --git a/README.md b/README.mdindex 7f768c9..039d12c 100644--- a/README.md+++ b/README.md@@ -14,13 +14,14 @@ https://github.com/user-attachments/assets/3823b656-c8c2-4912-9b31-6db7f438dd2c## ๐ Key Features & Updates-### 1. ๐ง GPT-6 Series Intelligence (Native MuAPI Endpoints)-OpenSpaces is exclusively powered by MuAPI's **GPT-6 Series** models through direct streaming endpoints (`POST /api/v1/{model}/stream`):-- **โก GPT-6.1 Sol Light (`gpt-6-1-sol`)**: Fast, capable multimodal flagship supporting text & image inputs.-- **๐ง GPT-6 Astra (`gpt-6-astra`)**: Deep reasoning model with multimodal vision capability for complex analysis.-- **โจ GPT-6 Sol (`gpt-6-sol`)**: Balanced, high-precision general text generation.-- **๐ GPT-6 Luna (`gpt-6-luna`)**: Ultra-lightweight, high-speed drafting and conversational model.-- **Smart Vision Routing**: If an image is attached while a text-only model (`gpt-6-sol` or `gpt-6-luna`) is active, requests seamlessly route to `gpt-6-1-sol` so visual understanding succeeds without throwing schema errors.+### 1. ๐ง Comprehensive Multimodal Model Intelligence (53 Models Across 6 Families)+OpenSpaces supports 53 frontier and uncensored multimodal models via native MuAPI streaming endpoints (`POST /api/v1/{model}/stream`). Every model accepts `prompt`, `system_prompt`, and `image_url`:+- **๐ Abliterated / Low-Refusal / Uncensored (12 Models)**: `mimo-v2-6-flash-abliterated`, `abliterated-model`, `qwen-3-8-27b-obliterated`, `qwen-3-8-27b-abliterated`, `qwen-3-5-27b-queen-derestricted`, `qwen-3-5-27b-blossom-derestricted`, `qwen-3-5-27b-opus-distilled-derestricted`, `glm-5-3-flash-abliterated`, `gemma-4-31b-gembrain-abliterated`, `gemma-4-31b-sdft-abliterated`, `qwen-3-8-27b-queen`, `qwen-3-8-27b-fable`.+- **โก OpenAI GPT Family (8 Models)**: `gpt-5-nano`, `gpt-5-2`, `gpt-5-5`, `gpt-5-6-luna`, `gpt-5-6-terra`, `gpt-5-6-sol`, `gpt-6-astra`, `gpt-6-1-sol`.+- **๐ญ Anthropic Claude Family (13 Models)**: `claude-haiku-4-5`, `claude-sonnet-4-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-opus-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-fable-5`, `claude-fable-5-1`.+- **๐ Google Gemini Family (12 Models)**: `gemini-2-5-flash`, `gemini-2-5-pro`, `gemini-3-flash`, `gemini-3-pro`, `gemini-3-1-pro`, `gemini-3-5-flash`, `gemini-3-5-flash-openai`, `gemini-3-6-flash`, `gemini-3-6-flash-openai`, `gemini-3-7-flash`, `gemini-3-7-flash-openai`, `gemini-3-8-flash`.+- **๐ xAI Grok Family (4 Models)**: `grok-4-3`, `grok-4-5`, `grok-4-6`, `grok-4-7`.+- **๐ Moonshot Kimi & DeepSeek Family (4 Models)**: `kimi-k3`, `deepseek-v4-flash`, `deepseek-v4-1-flash`, `deepseek-v4-pro`.### 2. ๐ฌ Clean Prompt & History Architecture- **Isolated User Prompt**: The `prompt` parameter receives strictly the current user prompt.@@ -174,11 +175,10 @@ Invoke-RestMethod -Uri "http://localhost:8000/api/upload_file" -Method POST -For----## ๐ Recent Changelog-- **GPT-6 Series Integration**: Migrated chat backend to native MuAPI endpoints (`POST /api/v1/{model}/stream`) for `gpt-6-1-sol`, `gpt-6-astra`, `gpt-6-sol`, and `gpt-6-luna`.+- **Expanded Multimodal Model Catalog**: Added 53 models across 6 families (Abliterated/Uncensored, OpenAI GPT, Anthropic Claude, Google Gemini, xAI Grok, Moonshot Kimi & DeepSeek) with full vision support and searchable dropdown navigation.- **System Prompt & History Refactor**: Formatted last 10 messages chat history into `system_prompt` while maintaining purely user input in `prompt`.- **Media Upload Pipeline**: Implemented `POST /api/upload_file` forwarding to `https://api.muapi.ai/api/v1/upload_file` returning CDN URLs.- **Open Spaces Native Input Card**: Rebuilt prompt bar with attachment preview thumbnail, remove button, and upload guard.- **Document History & Collaboration**: Added revision history drawer, activity logging, and space membership management.-- **Tutorial & Walkthrough Video**: Embedded high-resolution demo walkthrough highlighting Open Spaces UI, living canvas, and GPT-6 integration.+- **Tutorial & Walkthrough Video**: Embedded high-resolution demo walkthrough highlighting Open Spaces UI, living canvas, and model integration.- **API Key Security**: Purged all hardcoded keys and enforced dynamic `.env` loading.diff --git a/client/src/components/CustomDropdown.js b/client/src/components/CustomDropdown.jsindex d583c15..bf34882 100644--- a/client/src/components/CustomDropdown.js+++ b/client/src/components/CustomDropdown.js@@ -6,7 +6,7 @@ import { LuChevronDown, LuCheck } from "react-icons/lu";export default function CustomDropdown({value,onChange,- options = [], // [{ label: "TypeScript", value: "typescript", icon: ..., tag: ..., description: ... }]+ options = [], // [{ label: "TypeScript", value: "typescript", icon: ..., tag: ..., description: ..., group: ... }]placeholder = "Select...",className = "",buttonClassName = "",@@ -14,13 +14,15 @@ export default function CustomDropdown({size = "md", // "xs" | "sm" | "md" | "lg"searchable = false,align = "left", // "left" | "right"- direction = "down", // "down" | "up"+ direction = "auto", // "auto" | "down" | "up"header = null, // Optional menu header textdisabled = false,renderTrigger = null, // (selectedOption, open) => React.ReactNode}) {const [open, setOpen] = useState(false);const [search, setSearch] = useState("");+ const [computedDirection, setComputedDirection] = useState("down");+ const [computedMaxHeight, setComputedMaxHeight] = useState(380);const dropdownRef = useRef(null);const selectedOption =@@ -36,6 +38,52 @@ export default function CustomDropdown({}: null);+ // Dynamically calculate optimal direction and max-height to guarantee zero viewport overflow+ const updatePlacement = () => {+ if (!dropdownRef.current) return;+ const rect = dropdownRef.current.getBoundingClientRect();+ const spaceAbove = rect.top;+ const spaceBelow = window.innerHeight - rect.bottom;++ let targetDir = direction;+ if (direction === "auto") {+ // Pick direction with more space, defaulting to down if at least 260px available+ targetDir = spaceBelow >= 260 || spaceBelow >= spaceAbove ? "down" : "up";+ } else if (direction === "up") {+ // If forced up but space above is too tight (< 220px) and space below has much more room, flip down+ if (spaceAbove < 220 && spaceBelow > spaceAbove) {+ targetDir = "down";+ } else {+ targetDir = "up";+ }+ } else if (direction === "down") {+ // If forced down but space below is too tight (< 220px) and space above has much more room, flip up+ if (spaceBelow < 220 && spaceAbove > spaceBelow) {+ targetDir = "up";+ } else {+ targetDir = "down";+ }+ }++ setComputedDirection(targetDir);++ // Keep safe margin from screen edges (at least 16px buffer)+ const available = targetDir === "up" ? spaceAbove - 20 : spaceBelow - 20;+ setComputedMaxHeight(Math.max(160, Math.min(available, 400)));+ };++ useEffect(() => {+ if (open) {+ updatePlacement();+ window.addEventListener("resize", updatePlacement);+ window.addEventListener("scroll", updatePlacement, true);+ return () => {+ window.removeEventListener("resize", updatePlacement);+ window.removeEventListener("scroll", updatePlacement, true);+ };+ }+ }, [open, direction]);+useEffect(() => {const handleOutsideClick = (e) => {if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {@@ -57,10 +105,15 @@ export default function CustomDropdown({const filteredOptions =searchable && search- ? options.filter((opt) =>- (opt.label || "").toLowerCase().includes(search.toLowerCase().trim()) ||- (opt.tag || "").toLowerCase().includes(search.toLowerCase().trim())- )+ ? options.filter((opt) => {+ const q = search.toLowerCase().trim();+ return (+ (opt.label || "").toLowerCase().includes(q) ||+ (opt.tag || "").toLowerCase().includes(q) ||+ (opt.group || "").toLowerCase().includes(q) ||+ (opt.value || "").toLowerCase().includes(q)+ );+ }): options;const sizeClasses = {@@ -71,7 +124,7 @@ export default function CustomDropdown({}[size] || "px-3 py-1.5 text-xs";const positionClasses =- direction === "up"+ computedDirection === "up"? `bottom-full mb-1.5 ${align === "right" ? "right-0" : "left-0"}`: `top-full mt-1.5 ${align === "right" ? "right-0" : "left-0"}`;@@ -111,7 +164,8 @@ export default function CustomDropdown({{open && (<div- className={`absolute ${positionClasses} min-w-[160px] max-h-64 overflow-y-auto z-50 rounded-xl bg-white dark:bg-[#1c1c1f] border border-zinc-200 dark:border-zinc-700/80 shadow-2xl p-1 animate-in fade-in zoom-in-95 duration-100 ${menuClassName}`}+ className={`absolute ${positionClasses} min-w-[160px] overflow-y-auto z-50 rounded-xl bg-white dark:bg-[#1c1c1f] border border-zinc-200 dark:border-zinc-700/80 shadow-2xl p-1 animate-in fade-in zoom-in-95 duration-100 ${menuClassName}`}+ style={{ maxHeight: `${computedMaxHeight}px` }}>{header && (<div className="text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-500 px-2.5 py-1 border-b border-zinc-100 dark:border-zinc-800 mb-1">@@ -137,41 +191,50 @@ export default function CustomDropdown({No matching options</div>) : (- filteredOptions.map((opt) => {+ filteredOptions.map((opt, idx) => {const isSelected = opt.value === value;+ const prevOpt = idx > 0 ? filteredOptions[idx - 1] : null;+ const isNewGroup = opt.group && (!prevOpt || prevOpt.group !== opt.group);+return (- <button- key={opt.value}- type="button"- onClick={() => {- onChange(opt.value);- setOpen(false);- setSearch("");- }}- className={`w-full flex items-center justify-between px-2.5 py-1.5 text-xs rounded-lg transition-colors cursor-pointer text-left ${- isSelected- ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 font-medium"- : "text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800/60 hover:text-zinc-900 dark:hover:text-zinc-200"- }`}- >- <div className="truncate flex items-center gap-2 min-w-0">- {opt.icon && <span className="text-sm shrink-0">{opt.icon}</span>}- <div className="min-w-0">- <div className="truncate leading-snug">{opt.label}</div>- {(opt.tag || opt.description) && (- <div className="text-[10px] text-zinc-400 dark:text-zinc-500 truncate">- {opt.tag || opt.description}- </div>- )}+ <React.Fragment key={opt.value || opt.id || idx}>+ {isNewGroup && (+ <div className="text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-500 px-2.5 pt-2 pb-1 border-t border-zinc-100 dark:border-zinc-800/60 first:border-t-0 first:pt-1">+ {opt.group}</div>- </div>- {isSelected && (- <LuCheck- size={13}- className="text-indigo-600 dark:text-indigo-400 shrink-0 ml-1.5"- />)}- </button>+ <button+ type="button"+ onClick={() => {+ onChange(opt.value);+ setOpen(false);+ setSearch("");+ }}+ className={`w-full flex items-center justify-between px-2.5 py-1.5 text-xs rounded-lg transition-colors cursor-pointer text-left ${+ isSelected+ ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 font-medium"+ : "text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800/60 hover:text-zinc-900 dark:hover:text-zinc-200"+ }`}+ >+ <div className="truncate flex items-center gap-2 min-w-0">+ {opt.icon && <span className="text-sm shrink-0">{opt.icon}</span>}+ <div className="min-w-0">+ <div className="truncate leading-snug">{opt.label}</div>+ {(opt.tag || opt.description) && (+ <div className="text-[10px] text-zinc-400 dark:text-zinc-500 truncate">+ {opt.tag || opt.description}+ </div>+ )}+ </div>+ </div>+ {isSelected && (+ <LuCheck+ size={13}+ className="text-indigo-600 dark:text-indigo-400 shrink-0 ml-1.5"+ />+ )}+ </button>+ </React.Fragment>);}))}diff --git a/client/src/components/HomeWorkView.js b/client/src/components/HomeWorkView.jsindex 0c5e55e..b1b24ba 100644--- a/client/src/components/HomeWorkView.js+++ b/client/src/components/HomeWorkView.js@@ -18,6 +18,7 @@ import {} from "./Icons";import MarkdownRenderer from "./MarkdownRenderer";import CustomDropdown from "./CustomDropdown";+import { AI_MODELS } from "../constants/models";export default function HomeWorkView({activeProject = "General",@@ -38,22 +39,7 @@ export default function HomeWorkView({const textareaRef = useRef(null);const messagesEndRef = useRef(null);- const models = [- {- id: "gpt-6-1-sol",- name: "GPT-6.1 Sol Light",- tag: "Fast & Capable",- icon: "โก",- },- {- id: "gpt-6-astra",- name: "GPT-6 Astra",- tag: "Deep Reasoning",- icon: "๐ง ",- },- { id: "gpt-6-sol", name: "GPT-6 Sol", tag: "Balanced", icon: "โจ" },- { id: "gpt-6-luna", name: "GPT-6 Luna", tag: "Ultra Light", icon: "๐" },- ];+ const models = AI_MODELS;const currentModelObj =models.find((m) => m.id === selectedModel) || models[0];@@ -222,12 +208,14 @@ export default function HomeWorkView({value: m.id,icon: m.icon,tag: m.tag,+ group: m.group,}))}- direction="up"+ searchable={true}+ direction="auto"align="right"- header="Open Spaces 6 Series (MuAPI)"- menuClassName="w-64 bg-white dark:bg-[#1f1f23] border-zinc-200 dark:border-zinc-700/80 p-1.5 shadow-2xl backdrop-blur-md"- buttonClassName="bg-transparent hover:bg-zinc-200/80 dark:hover:bg-zinc-800/80 border-transparent hover:border-zinc-300 dark:hover:border-zinc-700 text-zinc-700 dark:text-zinc-300 rounded-full px-3 py-1.5"+ header="Open Spaces AI Models (MuAPI)"+ menuClassName="w-80 bg-white dark:bg-[#1f1f23] border-zinc-200 dark:border-zinc-700/80 p-1.5 shadow-2xl backdrop-blur-md"+ buttonClassName="bg-transparent hover:bg-zinc-200/80 dark:hover:bg-zinc-800/80 border-transparent hover:border-zinc-300 dark:hover:border-zinc-700 text-zinc-700 dark:text-zinc-300 rounded-full px-3 py-1.5 text-xs"/>{/* Send Arrow Button */}diff --git a/client/src/constants/models.js b/client/src/constants/models.jsnew file mode 100644index 0000000..033a5a6--- /dev/null+++ b/client/src/constants/models.js@@ -0,0 +1,395 @@+/**+ * All LLM Models across the 6 requested families supporting:+ * - prompt+ * - system_prompt+ * - image_url (multimodal vision)+ *+ * Sourced directly from muapi_llm_models_reference.md+ */++export const AI_MODELS = [+ // --- 1. Abliterated / Low-Refusal / Uncensored LLMs ---+ {+ id: "mimo-v2-6-flash-abliterated",+ name: "MiMo V2.6 Flash Abliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & Fast",+ icon: "๐",+ },+ {+ id: "abliterated-model",+ name: "Abliterated Model Base",+ group: "Abliterated / Uncensored",+ tag: "Vision & Uncensored",+ icon: "๐",+ },+ {+ id: "qwen-3-8-27b-obliterated",+ name: "Qwen 3.8 27B Obliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & Reasoning",+ icon: "๐ฅ",+ },+ {+ id: "qwen-3-8-27b-abliterated",+ name: "Qwen 3.8 27B Abliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & Low Refusal",+ icon: "๐ฅ",+ },+ {+ id: "qwen-3-5-27b-queen-derestricted",+ name: "Qwen 3.5 27B Queen Derestricted",+ group: "Abliterated / Uncensored",+ tag: "Vision & 262k ctx",+ icon: "๐",+ },+ {+ id: "qwen-3-5-27b-blossom-derestricted",+ name: "Qwen 3.5 27B Blossom Derestricted",+ group: "Abliterated / Uncensored",+ tag: "Vision & 262k ctx",+ icon: "๐ธ",+ },+ {+ id: "qwen-3-5-27b-opus-distilled-derestricted",+ name: "Qwen 3.5 27B Opus-Distilled Derestricted",+ group: "Abliterated / Uncensored",+ tag: "Vision & 262k ctx",+ icon: "โก",+ },+ {+ id: "glm-5-3-flash-abliterated",+ name: "GLM 5.3 Flash Abliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & Fast",+ icon: "โก",+ },+ {+ id: "gemma-4-31b-gembrain-abliterated",+ name: "Gemma 4 31B Gembrain Abliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & Creative",+ icon: "๐",+ },+ {+ id: "gemma-4-31b-sdft-abliterated",+ name: "Gemma 4 31B SDFT Abliterated",+ group: "Abliterated / Uncensored",+ tag: "Vision & 262k ctx",+ icon: "๐",+ },+ {+ id: "qwen-3-8-27b-queen",+ name: "Qwen 3.8 27B Queen",+ group: "Abliterated / Uncensored",+ tag: "Vision & 524k ctx",+ icon: "๐",+ },+ {+ id: "qwen-3-8-27b-fable",+ name: "Qwen 3.8 27B Fable",+ group: "Abliterated / Uncensored",+ tag: "Vision & Storytelling",+ icon: "๐",+ },++ // --- 2. OpenAI GPT Family ---+ {+ id: "gpt-5-nano",+ name: "GPT-5 Nano",+ group: "OpenAI GPT Family",+ tag: "High-Speed Vision",+ icon: "โก",+ },+ {+ id: "gpt-5-2",+ name: "GPT-5.2",+ group: "OpenAI GPT Family",+ tag: "General Purpose",+ icon: "โจ",+ },+ {+ id: "gpt-5-5",+ name: "GPT-5.5",+ group: "OpenAI GPT Family",+ tag: "Advanced Reasoning",+ icon: "๐ง ",+ },+ {+ id: "gpt-5-6-luna",+ name: "GPT-5.6 Luna",+ group: "OpenAI GPT Family",+ tag: "High-Efficiency",+ icon: "๐",+ },+ {+ id: "gpt-5-6-terra",+ name: "GPT-5.6 Terra",+ group: "OpenAI GPT Family",+ tag: "Balanced",+ icon: "๐",+ },+ {+ id: "gpt-5-6-sol",+ name: "GPT-5.6 Sol",+ group: "OpenAI GPT Family",+ tag: "Flagship",+ icon: "โ๏ธ",+ },+ {+ id: "gpt-6-astra",+ name: "GPT-6 Astra",+ group: "OpenAI GPT Family",+ tag: "Frontier Reasoning",+ icon: "๐ง ",+ },+ {+ id: "gpt-6-1-sol",+ name: "GPT-6.1 Sol Light",+ group: "OpenAI GPT Family",+ tag: "Fast & Capable",+ icon: "โก",+ },++ // --- 3. Anthropic Claude Family ---+ {+ id: "claude-haiku-4-5",+ name: "Claude Haiku 4.5",+ group: "Anthropic Claude Family",+ tag: "Fast Vision",+ icon: "โก",+ },+ {+ id: "claude-sonnet-4-5",+ name: "Claude Sonnet 4.5",+ group: "Anthropic Claude Family",+ tag: "Balanced",+ icon: "๐ญ",+ },+ {+ id: "claude-sonnet-4-6",+ name: "Claude Sonnet 4.6",+ group: "Anthropic Claude Family",+ tag: "Coding & Vision",+ icon: "๐ป",+ },+ {+ id: "claude-sonnet-5",+ name: "Claude Sonnet 5",+ group: "Anthropic Claude Family",+ tag: "Flagship",+ icon: "โญ",+ },+ {+ id: "claude-sonnet-5-5",+ name: "Claude Sonnet 5.5",+ group: "Anthropic Claude Family",+ tag: "High-Capacity",+ icon: "๐",+ },+ {+ id: "claude-opus-4-5",+ name: "Claude Opus 4.5",+ group: "Anthropic Claude Family",+ tag: "Reasoning",+ icon: "๐ฎ",+ },+ {+ id: "claude-opus-4-6",+ name: "Claude Opus 4.6",+ group: "Anthropic Claude Family",+ tag: "Deep Thinker",+ icon: "๐ฎ",+ },+ {+ id: "claude-opus-4-7",+ name: "Claude Opus 4.7",+ group: "Anthropic Claude Family",+ tag: "Multi-Modal",+ icon: "๐ฎ",+ },+ {+ id: "claude-opus-4-8",+ name: "Claude Opus 4.8",+ group: "Anthropic Claude Family",+ tag: "Long Context",+ icon: "๐ฎ",+ },+ {+ id: "claude-opus-5",+ name: "Claude Opus 5",+ group: "Anthropic Claude Family",+ tag: "Premier",+ icon: "๐",+ },+ {+ id: "claude-opus-5-5",+ name: "Claude Opus 5.5",+ group: "Anthropic Claude Family",+ tag: "Next-Gen",+ icon: "๐",+ },+ {+ id: "claude-fable-5",+ name: "Claude Fable 5",+ group: "Anthropic Claude Family",+ tag: "Creative Writing",+ icon: "๐",+ },+ {+ id: "claude-fable-5-1",+ name: "Claude Fable 5.1",+ group: "Anthropic Claude Family",+ tag: "Long Storytelling",+ icon: "๐",+ },++ // --- 4. Google Gemini Family ---+ {+ id: "gemini-2-5-flash",+ name: "Gemini 2.5 Flash",+ group: "Google Gemini Family",+ tag: "Ultra-Fast",+ icon: "โก",+ },+ {+ id: "gemini-2-5-pro",+ name: "Gemini 2.5 Pro",+ group: "Google Gemini Family",+ tag: "Multimodal Pro",+ icon: "๐ ",+ },+ {+ id: "gemini-3-flash",+ name: "Gemini 3 Flash",+ group: "Google Gemini Family",+ tag: "Low-Latency",+ icon: "โก",+ },+ {+ id: "gemini-3-pro",+ name: "Gemini 3 Pro",+ group: "Google Gemini Family",+ tag: "Deep Analysis",+ icon: "๐ ",+ },+ {+ id: "gemini-3-1-pro",+ name: "Gemini 3.1 Pro",+ group: "Google Gemini Family",+ tag: "MoE Flagship",+ icon: "๐ ",+ },+ {+ id: "gemini-3-5-flash",+ name: "Gemini 3.5 Flash",+ group: "Google Gemini Family",+ tag: "High Speed",+ icon: "โก",+ },+ {+ id: "gemini-3-5-flash-openai",+ name: "Gemini 3.5 Flash (OpenAI)",+ group: "Google Gemini Family",+ tag: "OpenAI Format",+ icon: "โก",+ },+ {+ id: "gemini-3-6-flash",+ name: "Gemini 3.6 Flash",+ group: "Google Gemini Family",+ tag: "Fast Vision",+ icon: "โก",+ },+ {+ id: "gemini-3-6-flash-openai",+ name: "Gemini 3.6 Flash (OpenAI)",+ group: "Google Gemini Family",+ tag: "OpenAI Format",+ icon: "โก",+ },+ {+ id: "gemini-3-7-flash",+ name: "Gemini 3.7 Flash",+ group: "Google Gemini Family",+ tag: "Hybrid Reasoner",+ icon: "๐ง ",+ },+ {+ id: "gemini-3-7-flash-openai",+ name: "Gemini 3.7 Flash (OpenAI)",+ group: "Google Gemini Family",+ tag: "OpenAI Format",+ icon: "๐ง ",+ },+ {+ id: "gemini-3-8-flash",+ name: "Gemini 3.8 Flash",+ group: "Google Gemini Family",+ tag: "Advanced Vision",+ icon: "โก",+ },++ // --- 5. xAI Grok Family ---+ {+ id: "grok-4-3",+ name: "Grok 4.3",+ group: "xAI Grok Family",+ tag: "Conversational",+ icon: "๐",+ },+ {+ id: "grok-4-5",+ name: "Grok 4.5",+ group: "xAI Grok Family",+ tag: "Real-Time Vision",+ icon: "๐",+ },+ {+ id: "grok-4-6",+ name: "Grok 4.6",+ group: "xAI Grok Family",+ tag: "Coding & Logic",+ icon: "๐",+ },+ {+ id: "grok-4-7",+ name: "Grok 4.7",+ group: "xAI Grok Family",+ tag: "Flagship Multimodal",+ icon: "๐",+ },++ // --- 6. Moonshot Kimi & DeepSeek Family ---+ {+ id: "kimi-k3",+ name: "Moonshot Kimi K3",+ group: "Moonshot Kimi & DeepSeek",+ tag: "2.8T MoE / 1M ctx",+ icon: "๐",+ },+ {+ id: "deepseek-v4-flash",+ name: "DeepSeek V4 Flash",+ group: "Moonshot Kimi & DeepSeek",+ tag: "Fast Vision",+ icon: "๐",+ },+ {+ id: "deepseek-v4-1-flash",+ name: "DeepSeek V4.1 Flash",+ group: "Moonshot Kimi & DeepSeek",+ tag: "Reasoning Vision",+ icon: "๐",+ },+ {+ id: "deepseek-v4-pro",+ name: "DeepSeek V4 Pro",+ group: "Moonshot Kimi & DeepSeek",+ tag: "Pro Reasoning",+ icon: "๐",+ },+];++export const DEFAULT_MODEL = "gpt-6-1-sol";diff --git a/server/app/api/routers/chat.py b/server/app/api/routers/chat.pyindex c01ada4..999f5ef 100644--- a/server/app/api/routers/chat.py+++ b/server/app/api/routers/chat.py@@ -8,12 +8,12 @@ from pydantic import BaseModelfrom app.core.config import settings-router = APIRouter(prefix="/chat", tags=["Open Spaces 6 Series"])+router = APIRouter(prefix="/chat", tags=["Open Spaces AI Chat"])class ChatRequest(BaseModel):prompt: strmodel: str = "gpt-6-1-sol"- project: Optional[str] = "Clawdia"+ project: Optional[str] = "General"system_prompt: Optional[str] = Nonehistory: Optional[List[Dict[str, Any]]] = []image_url: Optional[str] = None@@ -23,18 +23,344 @@ class ChatResponse(BaseModel):model: strproject: Optional[str] = None-# GPT-6 Series Models and Display Labels-GPT6_MODELS = {- "gpt-6-1-sol": "GPT-6.1 Sol Light",- "gpt-6-astra": "GPT-6 Astra",- "gpt-6-sol": "GPT-6 Sol",- "gpt-6-luna": "GPT-6 Luna",-}+# Comprehensive catalog of all models supporting prompt, system_prompt, and image_url+# Across the 6 requested families:+# 1. Abliterated / Low-Refusal / Uncensored LLMs+# 2. OpenAI GPT Family+# 3. Anthropic Claude Family+# 4. Google Gemini Family+# 5. xAI Grok Family+# 6. Moonshot Kimi & DeepSeek Family+SUPPORTED_MODELS: Dict[str, Dict[str, str]] = {+ # --- 1. Abliterated / Low-Refusal / Uncensored LLMs ---+ "mimo-v2-6-flash-abliterated": {+ "name": "MiMo V2.6 Flash Abliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Fast",+ "icon": "๐",+ },+ "abliterated-model": {+ "name": "Abliterated Model Base",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Uncensored",+ "icon": "๐",+ },+ "qwen-3-8-27b-obliterated": {+ "name": "Qwen 3.8 27B Obliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Reasoning",+ "icon": "๐ฅ",+ },+ "qwen-3-8-27b-abliterated": {+ "name": "Qwen 3.8 27B Abliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Low Refusal",+ "icon": "๐ฅ",+ },+ "qwen-3-5-27b-queen-derestricted": {+ "name": "Qwen 3.5 27B Queen Derestricted",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & 262k ctx",+ "icon": "๐",+ },+ "qwen-3-5-27b-blossom-derestricted": {+ "name": "Qwen 3.5 27B Blossom Derestricted",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & 262k ctx",+ "icon": "๐ธ",+ },+ "qwen-3-5-27b-opus-distilled-derestricted": {+ "name": "Qwen 3.5 27B Opus-Distilled Derestricted",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & 262k ctx",+ "icon": "โก",+ },+ "glm-5-3-flash-abliterated": {+ "name": "GLM 5.3 Flash Abliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Fast",+ "icon": "โก",+ },+ "gemma-4-31b-gembrain-abliterated": {+ "name": "Gemma 4 31B Gembrain Abliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Creative",+ "icon": "๐",+ },+ "gemma-4-31b-sdft-abliterated": {+ "name": "Gemma 4 31B SDFT Abliterated",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & 262k ctx",+ "icon": "๐",+ },+ "qwen-3-8-27b-queen": {+ "name": "Qwen 3.8 27B Queen",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & 524k ctx",+ "icon": "๐",+ },+ "qwen-3-8-27b-fable": {+ "name": "Qwen 3.8 27B Fable",+ "family": "Abliterated / Uncensored",+ "tag": "Vision & Storytelling",+ "icon": "๐",+ },++ # --- 2. OpenAI GPT Family ---+ "gpt-5-nano": {+ "name": "GPT-5 Nano",+ "family": "OpenAI GPT",+ "tag": "High-Speed Vision",+ "icon": "โก",+ },+ "gpt-5-2": {+ "name": "GPT-5.2",+ "family": "OpenAI GPT",+ "tag": "General Purpose",+ "icon": "โจ",+ },+ "gpt-5-5": {+ "name": "GPT-5.5",+ "family": "OpenAI GPT",+ "tag": "Advanced Reasoning",+ "icon": "๐ง ",+ },+ "gpt-5-6-luna": {+ "name": "GPT-5.6 Luna",+ "family": "OpenAI GPT",+ "tag": "High-Efficiency",+ "icon": "๐",+ },+ "gpt-5-6-terra": {+ "name": "GPT-5.6 Terra",+ "family": "OpenAI GPT",+ "tag": "Balanced",+ "icon": "๐",+ },+ "gpt-5-6-sol": {+ "name": "GPT-5.6 Sol",+ "family": "OpenAI GPT",+ "tag": "Flagship",+ "icon": "โ๏ธ",+ },+ "gpt-6-astra": {+ "name": "GPT-6 Astra",+ "family": "OpenAI GPT",+ "tag": "Frontier Reasoning",+ "icon": "๐ง ",+ },+ "gpt-6-1-sol": {+ "name": "GPT-6.1 Sol Light",+ "family": "OpenAI GPT",+ "tag": "Fast & Capable",+ "icon": "โก",+ },++ # --- 3. Anthropic Claude Family ---+ "claude-haiku-4-5": {+ "name": "Claude Haiku 4.5",+ "family": "Anthropic Claude",+ "tag": "Fast Vision",+ "icon": "โก",+ },+ "claude-sonnet-4-5": {+ "name": "Claude Sonnet 4.5",+ "family": "Anthropic Claude",+ "tag": "Balanced",+ "icon": "๐ญ",+ },+ "claude-sonnet-4-6": {+ "name": "Claude Sonnet 4.6",+ "family": "Anthropic Claude",+ "tag": "Coding & Vision",+ "icon": "๐ป",+ },+ "claude-sonnet-5": {+ "name": "Claude Sonnet 5",+ "family": "Anthropic Claude",+ "tag": "Flagship",+ "icon": "โญ",+ },+ "claude-sonnet-5-5": {+ "name": "Claude Sonnet 5.5",+ "family": "Anthropic Claude",+ "tag": "High-Capacity",+ "icon": "๐",+ },+ "claude-opus-4-5": {+ "name": "Claude Opus 4.5",+ "family": "Anthropic Claude",+ "tag": "Reasoning",+ "icon": "๐ฎ",+ },+ "claude-opus-4-6": {+ "name": "Claude Opus 4.6",+ "family": "Anthropic Claude",+ "tag": "Deep Thinker",+ "icon": "๐ฎ",+ },+ "claude-opus-4-7": {+ "name": "Claude Opus 4.7",+ "family": "Anthropic Claude",+ "tag": "Multi-Modal",+ "icon": "๐ฎ",+ },+ "claude-opus-4-8": {+ "name": "Claude Opus 4.8",+ "family": "Anthropic Claude",+ "tag": "Long Context",+ "icon": "๐ฎ",+ },+ "claude-opus-5": {+ "name": "Claude Opus 5",+ "family": "Anthropic Claude",+ "tag": "Premier",+ "icon": "๐",+ },+ "claude-opus-5-5": {+ "name": "Claude Opus 5.5",+ "family": "Anthropic Claude",+ "tag": "Next-Gen",+ "icon": "๐",+ },+ "claude-fable-5": {+ "name": "Claude Fable 5",+ "family": "Anthropic Claude",+ "tag": "Creative Writing",+ "icon": "๐",+ },+ "claude-fable-5-1": {+ "name": "Claude Fable 5.1",+ "family": "Anthropic Claude",+ "tag": "Long Storytelling",+ "icon": "๐",+ },++ # --- 4. Google Gemini Family ---+ "gemini-2-5-flash": {+ "name": "Gemini 2.5 Flash",+ "family": "Google Gemini",+ "tag": "Ultra-Fast",+ "icon": "โก",+ },+ "gemini-2-5-pro": {+ "name": "Gemini 2.5 Pro",+ "family": "Google Gemini",+ "tag": "Multimodal Pro",+ "icon": "๐ ",+ },+ "gemini-3-flash": {+ "name": "Gemini 3 Flash",+ "family": "Google Gemini",+ "tag": "Low-Latency",+ "icon": "โก",+ },+ "gemini-3-pro": {+ "name": "Gemini 3 Pro",+ "family": "Google Gemini",+ "tag": "Deep Analysis",+ "icon": "๐ ",+ },+ "gemini-3-1-pro": {+ "name": "Gemini 3.1 Pro",+ "family": "Google Gemini",+ "tag": "MoE Flagship",+ "icon": "๐ ",+ },+ "gemini-3-5-flash": {+ "name": "Gemini 3.5 Flash",+ "family": "Google Gemini",+ "tag": "High Speed",+ "icon": "โก",+ },+ "gemini-3-5-flash-openai": {+ "name": "Gemini 3.5 Flash (OpenAI fmt)",+ "family": "Google Gemini",+ "tag": "OpenAI Format",+ "icon": "โก",+ },+ "gemini-3-6-flash": {+ "name": "Gemini 3.6 Flash",+ "family": "Google Gemini",+ "tag": "Fast Vision",+ "icon": "โก",+ },+ "gemini-3-6-flash-openai": {+ "name": "Gemini 3.6 Flash (OpenAI fmt)",+ "family": "Google Gemini",+ "tag": "OpenAI Format",+ "icon": "โก",+ },+ "gemini-3-7-flash": {+ "name": "Gemini 3.7 Flash",+ "family": "Google Gemini",+ "tag": "Hybrid Reasoner",+ "icon": "๐ง ",+ },+ "gemini-3-7-flash-openai": {+ "name": "Gemini 3.7 Flash (OpenAI fmt)",+ "family": "Google Gemini",+ "tag": "OpenAI Format",+ "icon": "๐ง ",+ },+ "gemini-3-8-flash": {+ "name": "Gemini 3.8 Flash",+ "family": "Google Gemini",+ "tag": "Advanced Vision",+ "icon": "โก",+ },-# GPT-6 Vision-capable models-GPT6_VISION_MODELS = {- "gpt-6-1-sol",- "gpt-6-astra",+ # --- 5. xAI Grok Family ---+ "grok-4-3": {+ "name": "Grok 4.3",+ "family": "xAI Grok",+ "tag": "Conversational",+ "icon": "๐",+ },+ "grok-4-5": {+ "name": "Grok 4.5",+ "family": "xAI Grok",+ "tag": "Real-Time Vision",+ "icon": "๐",+ },+ "grok-4-6": {+ "name": "Grok 4.6",+ "family": "xAI Grok",+ "tag": "Coding & Logic",+ "icon": "๐",+ },+ "grok-4-7": {+ "name": "Grok 4.7",+ "family": "xAI Grok",+ "tag": "Flagship Multimodal",+ "icon": "๐",+ },++ # --- 6. Moonshot Kimi & DeepSeek Family ---+ "kimi-k3": {+ "name": "Moonshot Kimi K3",+ "family": "Moonshot Kimi & DeepSeek",+ "tag": "2.8T MoE / 1M ctx",+ "icon": "๐",+ },+ "deepseek-v4-flash": {+ "name": "DeepSeek V4 Flash",+ "family": "Moonshot Kimi & DeepSeek",+ "tag": "Fast Vision",+ "icon": "๐",+ },+ "deepseek-v4-1-flash": {+ "name": "DeepSeek V4.1 Flash",+ "family": "Moonshot Kimi & DeepSeek",+ "tag": "Reasoning Vision",+ "icon": "๐",+ },+ "deepseek-v4-pro": {+ "name": "DeepSeek V4 Pro",+ "family": "Moonshot Kimi & DeepSeek",+ "tag": "Pro Reasoning",+ "icon": "๐",+ },}def get_muapi_key() -> str:@@ -42,6 +368,20 @@ def get_muapi_key() -> str:load_dotenv(override=True)return os.getenv("MUAPI_API_KEY") or settings.MUAPI_API_KEY or ""[email protected]("/models")+def list_models():+ """Return all supported LLM models grouped across the 6 families."""+ return [+ {+ "id": slug,+ "name": meta["name"],+ "family": meta["family"],+ "tag": meta["tag"],+ "icon": meta["icon"],+ }+ for slug, meta in SUPPORTED_MODELS.items()+ ]+@router.post("", response_model=ChatResponse)async def generate_chat(payload: ChatRequest):prompt = payload.prompt.strip()@@ -59,19 +399,15 @@ async def generate_chat(payload: ChatRequest):if img_match:active_image_url = img_match.group(1)- # Validate and select GPT-6 series model+ # Validate model slugrequested_model = (payload.model or "gpt-6-1-sol").strip().lower()- if requested_model not in GPT6_MODELS:+ if requested_model not in SUPPORTED_MODELS:requested_model = "gpt-6-1-sol"- model_display = GPT6_MODELS[requested_model]+ model_meta = SUPPORTED_MODELS[requested_model]+ model_display = model_meta["name"]target_model = requested_model- # If an image is attached and the user selected a text-only GPT-6 model (gpt-6-sol or gpt-6-luna),- # route to gpt-6-1-sol (the vision-enabled flagship in the GPT-6 series) so image analysis succeeds.- if active_image_url and target_model not in GPT6_VISION_MODELS:- target_model = "gpt-6-1-sol"-muapi_key = get_muapi_key()if not muapi_key:raise HTTPException(@@ -101,17 +437,18 @@ async def generate_chat(payload: ChatRequest):if history_lines:system_instruction += "\n\nChat History (last 10 messages):\n" + "\n".join(history_lines)- # Prompt parameter receives purely the user prompt+ # Prompt parameter receives purely user promptuser_prompt = prompt or "Please analyze the uploaded image."- # MuAPI endpoint for this GPT-6 model+ # Native streaming endpointendpoint_url = f"https://api.muapi.ai/api/v1/{target_model}/stream"+ # Only pass prompt, system_prompt, and optionally image_url (ignore all other parameters)request_payload: Dict[str, Any] = {"prompt": user_prompt,"system_prompt": system_instruction,}- if active_image_url and target_model in GPT6_VISION_MODELS:+ if active_image_url:request_payload["image_url"] = active_image_urlheaders = {@@ -167,6 +504,10 @@ async def generate_chat(payload: ChatRequest):collected_chunks.append(choices[0]["text"])elif "output" in event:collected_chunks.append(str(event["output"]))+ elif "text" in event:+ collected_chunks.append(str(event["text"]))+ elif "content" in event:+ collected_chunks.append(str(event["content"]))except json.JSONDecodeError:continue