StreamText Broken Using @ai-sdk/google-vertex in Version 2 and above

Hi,

I have a custom model deployed in Google Vertex AI. Using streamText, I AM able to get predictions from the model using version 1.0.4 of @ai-sdk/google-vertex. However, using the latest version of @ai-sdk/google-vertex or anything above version 2.0.0 DOES NOT WORK.

The following code works fine using @ai-sdk/google-vertex 1.0.4, but breaks with the following error using the latest version or anything above version 2.

export const maxDuration = 30;

const euVertex = createVertex({
  project: <PROJECT_ID>,
  location: 'us-central1', // optional
  googleAuthOptions: {
  keyFilename: <KEY_FILE>,
  },
});

const model = euVertex('projects/' + PROJECT_ID + '/locations/us-central1/endpoints/' + ENDPOINT)

const result = streamText({
  model: model,
  prompt: 'Hello, how are you?',
});

for await (const textPart of result.textStream) {
  console.log(textPart);
}

The error I get is this: error: Uncaught (in promise) AI_APICallError: Not Found

Any help would be greatly appreciated.

Thanks.