UnsupportedModelVersionError means your provider package speaks an older LanguageModel spec than the ai core expects. UnsupportedFunctionalityError means the model or provider cannot do what you asked (e.g. strict tool calling on a provider without it).

import { UnsupportedModelVersionError, generateText } from 'ai';

try {
  await generateText({ model, prompt: 'Hi' });
} catch (error) {
  if (UnsupportedModelVersionError.isInstance(error)) {
    // upgrade the @ai-sdk/* provider package to match ai
  }
}

What to know:
1. The number one cause is version drift: ai@7 with an @ai-sdk/* provider from the v5/v6 era. Upgrade all @ai-sdk/* packages together with ai.
2. The troubleshooting page has a dedicated unsupported-model-version entry. If you land there, the fix is almost always npm install @ai-sdk/openai@latest (or whichever provider).
3. UnsupportedFunctionalityError also fires for genuinely unsupported features: image input on a text-only model, or providerOptions the provider does not implement. Read the provider's capability table in the docs.
4. The related TypeScript error Model is not assignable to type LanguageModelV1 is the same root cause at type level. Same fix: align versions.
5. Community providers can lag the spec. If the official packages are aligned and the error persists with a community provider, the provider needs updating, not your code.
6. After upgrading, delete node_modules and reinstall if the error survives. Stale nested copies of @ai-sdk/provider are a real thing.