diff --git a/ui/litellm-dashboard/src/components/chat/ChatInputBar.tsx b/ui/litellm-dashboard/src/components/chat/ChatInputBar.tsx deleted file mode 100644 index ae6cd608604..00000000000 --- a/ui/litellm-dashboard/src/components/chat/ChatInputBar.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useState } from "react"; -import { Button, Input, Popover, Tooltip } from "antd"; -import { ApiOutlined, BorderOutlined, PaperClipOutlined, SendOutlined } from "@ant-design/icons"; - -interface Props { - onSend: (text: string) => void; - isStreaming: boolean; - onStop: () => void; - selectedMCPServers: string[]; - onMCPChange: (servers: string[]) => void; - isLoadingModels: boolean; - accessToken: string; -} - -const ChatInputBar: React.FC = ({ - onSend, - isStreaming, - onStop, - selectedMCPServers, - onMCPChange, - isLoadingModels, - accessToken, -}) => { - const [text, setText] = useState(""); - const [mcpPopoverOpen, setMcpPopoverOpen] = useState(false); - - const handleSend = () => { - if (text.trim() === "" || isStreaming || isLoadingModels) return; - onSend(text.trim()); - setText(""); - }; - - const handleKeyDown = (e: React.KeyboardEvent) => { - if (e.key === "Enter" && !e.shiftKey) { - e.preventDefault(); - handleSend(); - } - }; - - const mcpButtonLabel = - selectedMCPServers.length > 0 - ? `MCP (${selectedMCPServers.length})` - : "MCP"; - - const mcpPopoverContent = ( -
- {/* MCPConnectPicker - LIT-2170 */} -
- ); - - return ( -
- - - - - -
- ); -}; - -export default ChatInputBar; diff --git a/ui/litellm-dashboard/src/components/chat/ModelSelector.tsx b/ui/litellm-dashboard/src/components/chat/ModelSelector.tsx deleted file mode 100644 index c0424d1de77..00000000000 --- a/ui/litellm-dashboard/src/components/chat/ModelSelector.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useEffect, useState } from "react"; -import { Select, Skeleton } from "antd"; -import { fetchAvailableModels, ModelGroup } from "../playground/llm_calls/fetch_models"; - -const LOCALSTORAGE_KEY = "litellm_chat_selected_model"; -const MAX_DISPLAY_LENGTH = 40; - -interface Props { - accessToken: string; - selectedModel: string; - onChange: (model: string) => void; - onLoadingChange: (loading: boolean) => void; -} - -const ModelSelector: React.FC = ({ - accessToken, - selectedModel, - onChange, - onLoadingChange, -}) => { - const [models, setModels] = useState([]); - const [loading, setLoading] = useState(true); - const [fetchFailed, setFetchFailed] = useState(false); - - useEffect(() => { - let cancelled = false; - - const load = async () => { - setLoading(true); - onLoadingChange(true); - try { - const fetched = await fetchAvailableModels(accessToken); - if (cancelled) return; - - setModels(fetched); - - if (fetched.length > 0) { - const persisted = localStorage.getItem(LOCALSTORAGE_KEY); - const modelNames = fetched.map((m) => m.model_group); - - if (persisted && modelNames.includes(persisted)) { - onChange(persisted); - } else { - // Persisted model not in list — clear stale value and default to first - if (persisted) { - localStorage.removeItem(LOCALSTORAGE_KEY); - } - onChange(fetched[0].model_group); - } - } - } catch { - if (!cancelled) { - setFetchFailed(true); - } - } finally { - if (!cancelled) { - setLoading(false); - onLoadingChange(false); - } - } - }; - - load(); - - return () => { - cancelled = true; - }; - }, [accessToken]); // eslint-disable-line react-hooks/exhaustive-deps - - const handleChange = (value: string) => { - localStorage.setItem(LOCALSTORAGE_KEY, value); - onChange(value); - }; - - if (loading) { - return ; - } - - if (fetchFailed || models.length === 0) { - return ( - - No models available — check your proxy config - - ); - } - - return ( -