That is probably related to the problem…
It’s the official library, yes?
const configuration = new Configuration({
apiKey: config.get("OPENAI_SECRET"),
});
vs
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
Maybe it can’t get the key from the env on your server?
Good luck!