Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All non OpenAI providers giving errors like Type 'GoogleGenerativeAILanguageModel' is not assignable to type 'LanguageModelV1'. #367

Open
retired-Hurt opened this issue Jun 16, 2024 · 2 comments

Comments

@retired-Hurt
Copy link

All non-OpenAI providers are giving error like Type 'GoogleGenerativeAILanguageModel' is not assignable to type 'LanguageModelV1'...Steps to reproduce

  1. Clone the repo to local
  2. On lib --> chat --> actions.tsx write following code

import { google } from '@ai-sdk/google';

  1. Replace the code model: openai('gpt-3.5-turbo'), with the code google('models/gemini-pro'), and it shows the above compilation error on vscode.

I have tried this with other providers like mistral, anthropic and all of them give the same error. However the groq provider doesn't give the same error as it uses the OpenAI provider.

Is there an underlying problem with the SDK or is there something I am missing here?

@paulbremer
Copy link

paulbremer commented Jun 28, 2024

I came across the same issue and the problem was that there was a mismatch between the ai package and @ai-sdk/openai in my case. Updating both to the latest versions solved the issue, might help you too.

@pringshia
Copy link

I had the same issue and upgrading my ai package with npm update ai --save fixed it. I had cloned a Vercel template where the package{-lock}.json specified an older version "ai": "^3.0.17".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants