diff --git a/client/src/hooks/useConversation.ts b/client/src/hooks/useConversation.ts index 2ebde99326..1f4ca6cf29 100644 --- a/client/src/hooks/useConversation.ts +++ b/client/src/hooks/useConversation.ts @@ -51,7 +51,7 @@ const useConversation = () => { setSubmission({} as TSubmission); resetLatestMessage(); - if (conversation.conversationId === 'new') { + if (conversation.conversationId === 'new' && !modelsData) { navigate('/chat/new'); } }, diff --git a/client/src/routes/Root.tsx b/client/src/routes/Root.tsx index cfd3e5a6b7..0aefc957cb 100644 --- a/client/src/routes/Root.tsx +++ b/client/src/routes/Root.tsx @@ -38,7 +38,8 @@ export default function Root() { useEffect(() => { if (modelsQuery.data) { setModelsConfig(modelsQuery.data); - newConversation(modelsQuery.data); + // Note: passing modelsQuery.data prevents navigation + newConversation({}, undefined, modelsQuery.data); } else if (modelsQuery.isError) { console.error('Failed to get models', modelsQuery.error); }