import useGetProviderModels, { DISABLED_PROVIDERS, } from "@/hooks/useGetProvidersModels"; import paths from "@/utils/paths"; import { useTranslation } from "react-i18next"; import { Link, useParams } from "react-router-dom"; /** * These models do NOT support function calling * or do not support system prompts * and therefore are not supported for agents. * @param {string} provider - The AI provider. * @param {string} model - The model name. * @returns {boolean} Whether the model is supported for agents. */ function supportedModel(provider, model = "") { if (provider === "openai") { return ( [ "gpt-3.5-turbo-0301", "gpt-4-turbo-2024-04-09", "gpt-4-turbo", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "o3-mini", "o3-mini-2025-01-31", ].includes(model) === false ); } return true; } export default function AgentModelSelection({ provider, workspace, setHasChanges, }) { const { slug } = useParams(); const { defaultModels, customModels, loading } = useGetProviderModels(provider); const { t } = useTranslation(); if (DISABLED_PROVIDERS.includes(provider)) { return (

Multi-model support is not supported for this provider yet.
Agent's will use{" "} the model set for the workspace {" "} or{" "} the model set for the system.

); } if (loading) { return (

{t("agent.mode.chat.description")}

); } return (

{t("agent.mode.description")}

); }