I use it with Next.js. it’s so good cause prevent punycode warning!!
If you use beta feature such as vector stores, assitants, you should add header ’ ‘OpenAI-Beta: assistants=v2’'.
await openai.beta.vectorStores.files.createAndPoll(
input.openAiVectorStoreId,
{
file_id: file.id,
},
{
headers: {
"OpenAI-Beta": "assistants=v2",
},
},
);