vercel / ai

Build AI-powered applications with React, Svelte, Vue, and Solid
https://sdk.vercel.ai/docs
Other
9.6k stars 1.41k forks source link

Registry not accepting google provider #2204

Closed Gerosullivan closed 2 months ago

Gerosullivan commented 3 months ago

Description

I'm encountering a type compatibility issue between GoogleGenerativeAIProvider and Provider when using experimental_createProviderRegistry; will not accept Google Generative AI provider instance from @ai-sdk/google Type 'GoogleGenerativeAIProvider' is not assignable to type 'Provider'

Code example

import { createGoogleGenerativeAI } from "@ai-sdk/google" import { experimental_createProviderRegistry as createProviderRegistry } from "ai"

export const registry = createProviderRegistry({ google: createGoogleGenerativeAI({ apiKey: process.env.GOOGLE_GEMINI_API_KEY }) })

Additional context

No response

lgrammel commented 3 months ago

@Gerosullivan have you updated the @ai-sdk/google package (and ai) to the latest versions?

lgrammel commented 2 months ago

Verified that this works with the current version of the google provider and the ai library.