Issues integrating assistant with wix

so i created and integrated an assistant in to my wix site and it worked for a while but then i changed something at some point and now the assistant is no longer called but it connects to regular chat gpt… am confused and not sure if error on my end or openai
my backend code:

import { fetch } from ‘wix-fetch’;
import wixSecretsBackend from ‘wix-secrets-backend’;

export async function getChatGPTResponse(userMessage) {
const apiKey = await wixSecretsBackend.getSecret(“archon2”);

const response = await fetch('https://api.openai.com/v1/chat/completions', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
        'Authorization': `Bearer ${apiKey}`,
        'OpenAI-Beta': 'assistants=v2'       
        },
    body: JSON.stringify({
        model: "gpt-4o", // Or "gpt-4" depending on your subscription
        messages: [{ role: "user", content: userMessage }],
    }),
});

if (!response.ok) {
    throw new Error(`Error communicating with ChatGPT API: ${response.statusText}`);
}

const result = await response.json();
return result.choices[0].message.content;

}