The ai/react import is failing to load in the v0 environment.
Prompt to recreat the issue:
Create a Next.js chatbot app using the Vercel AI SDK with the following:1. A chat interface with a sidebar that displays AI responses2. Use streamText() from the AI SDK in an API route at /api/chat3. Pass model strings like “openai/gpt-4o” directly to streamText (not model objects)4. Also create a component generation feature that uses generateObject() with Zod schemas5. The generateObject should also receive model strings like "anthropic/claude-sonnet-4.5"6. Use the useChat hook from ‘ai/react’ on the client side7. Include error handling that catches and displays AI SDK errorsMake sure to:- Import streamText and generateObject from ‘ai’- Pass model as a string parameter (e.g., model: “openai/gpt-4o”)- Don’t create any provider instances manually- Let the AI SDK handle gateway routing automatically
I got the same error while using the Gemini 2.5 Flash model. It has been inoperable since yesterday. It is only able to run when I pull the GitHub repository and run the dev environment on my PC.
Runtime Error:e.number is not a function at (@ai-sdk/google)
I’ve seen this for the last 3 days, on a supabase edge function . It likely appearing from as dependency from some other package, that needs to update.
So you can fixed it by pinning the version of ai-gateway you need by hard-coding the dependency version you want. On the edge function you do this by adding it to the deno.json file.
For the a client app, you’d add it to your npm package.json
Edge Function supabase/functions/{function-name}/deno.json
```
{
“compilerOptions”: {
This should be fixed now, it was related to a dependency mismatch in a new version of Zod that was released (and used by AI SDK Gateway) that was different from the version used by the rest of v0