Literally cannot get it to work all day, no matter whether I use the vercel agent otr the gemini agent, every single respnse comes back with an error
Even a simple app with a text box and a generate button, and the EXACT example from the documnetation produces an error.
import { generateText } from "ai"
import { openai } from "@ai-sdk/openai"
export async function POST(req: Request) {
try {
const { prompt } = await req.json()
if (!prompt) {
return Response.json({ error: "Prompt is required" }, { status: 400 })
}
const { text } = await generateText({
model: openai("gpt-5"),
prompt: prompt,
})
return Response.json({ text })
} catch (error) {
console.error("Error generating text:", error)
return Response.json({ error: "Internal Server Error" }, { status: 500 })
}
}
I have the same OpenAI api key in place in other places, and so that’s not the issue - What on earth is going on with this?

