From 06fb9bdd99eefffaa3886835fc7d17c6e21d2e60 Mon Sep 17 00:00:00 2001
From: Timothy Carambat <rambat1010@gmail.com>
Date: Wed, 3 Jul 2024 15:17:53 -0700
Subject: [PATCH] 1738 generic open ai agent (#1809)

* enable support for generic openAI as Agent provider
---
 frontend/src/hooks/useGetProvidersModels.js                     | 2 ++
 .../WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/frontend/src/hooks/useGetProvidersModels.js b/frontend/src/hooks/useGetProvidersModels.js
index 5c8171b3c..051c97ed7 100644
--- a/frontend/src/hooks/useGetProvidersModels.js
+++ b/frontend/src/hooks/useGetProvidersModels.js
@@ -7,6 +7,7 @@ export const DISABLED_PROVIDERS = [
   "lmstudio",
   "native",
   "textgenwebui",
+  "generic-openai",
 ];
 const PROVIDER_DEFAULT_MODELS = {
   openai: [],
@@ -46,6 +47,7 @@ const PROVIDER_DEFAULT_MODELS = {
     "command-light-nightly",
   ],
   textgenwebui: [],
+  "generic-openai": [],
 };
 
 // For togetherAi, which has a large model list - we subgroup the options
diff --git a/frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx b/frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx
index ac507e929..2ff4fb8d7 100644
--- a/frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx
+++ b/frontend/src/pages/WorkspaceSettings/AgentConfig/AgentLLMSelection/index.jsx
@@ -20,8 +20,8 @@ const ENABLED_PROVIDERS = [
   "mistral",
   "perplexity",
   "textgenwebui",
+  "generic-openai",
   // TODO: More agent support.
-  // "generic-openai", // Need to support text-input for agent model input for this to be enabled.
   // "cohere",         // Has tool calling and will need to build explicit support
   // "huggingface"     // Can be done but already has issues with no-chat templated. Needs to be tested.
   // "gemini",         // Too rate limited and broken in several ways to use for agents.
-- 
GitLab