diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx
index dc6aecc8f..1186638ad 100644
--- a/app/components/chat/BaseChat.tsx
+++ b/app/components/chat/BaseChat.tsx
@@ -25,38 +25,91 @@ import { ExamplePrompts } from '~/components/chat/ExamplePrompts';
// @ts-ignore TODO: Introduce proper types
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => {
+ const [customUrl, setCustomUrl] = useState('');
+ const [customModel, setCustomModel] = useState('');
+
+ useEffect(() => {
+ if (provider?.name === 'OpenAILike') {
+ setCustomUrl(import.meta.env.OPENAI_LIKE_API_BASE_URL || '');
+ setCustomModel(model || '');
+ } else if (provider?.name === 'Ollama') {
+ setCustomUrl(import.meta.env.OLLAMA_API_BASE_URL || 'http://localhost:11434');
+ }
+ }, [provider?.name]);
+
return (
-
-