Has anyone gotten Vercel AI Package working with streamText and Cloudflare AI models? I am getting the following error and it's only when I am streaming (generateText works fine). I will note I am using a modified baseURL in an OpenAI provider to make CF AI work with Vercel AI package.
"Error message: [
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"code": "invalid_type",
"expected": "number",
"received": "undefined",
"path": [
"choices",
0,
"index"
],
"message": "Required"
}
],
"name": "ZodError"
},
{
"issues": [
{
"code": "invalid_type",
"expected": "object",
"received": "undefined",
"path": [
"error"
],
"message": "Required"
}
],
"name": "ZodError"
}
],
"path": [],
"message": "Invalid input"
}
]"