Validate and debug Vercel AI SDK provider configurations including API keys, environment setup, model compatibility, and rate limiting. Use when encountering provider errors, authentication failures, API key issues, missing environment variables, model compatibility problems, rate limiting errors, or when user mentions provider setup, configuration debugging, or SDK connection issues.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
README.mdexamples/troubleshooting-guide.mdscripts/check-model-compatibility.shscripts/generate-fix.shscripts/test-provider-connection.shscripts/validate-provider.shtemplates/env-template.txttemplates/error-handler-template.tstemplates/gitignore-template.txtPurpose: Autonomously validate, diagnose, and fix Vercel AI SDK provider configurations.
Activation Triggers:
Key Resources:
scripts/validate-provider.sh - Full validation (packages, keys, env)scripts/check-model-compatibility.sh - Validate model namesscripts/generate-fix.sh - Generate fixes for common issuesscripts/test-provider-connection.sh - Test real API connectionexamples/troubleshooting-guide.md - Comprehensive troubleshooting (10+ scenarios)templates/ - .env, .gitignore, error handler code templatesIdentify error from symptoms:
# Main validation - checks everything
./scripts/validate-provider.sh <provider>
# Examples:
./scripts/validate-provider.sh openai
./scripts/validate-provider.sh anthropic
Checks performed:
ai) installed./scripts/check-model-compatibility.sh <provider> <model>
# Examples:
./scripts/check-model-compatibility.sh openai gpt-4o
./scripts/check-model-compatibility.sh anthropic claude-sonnet-4-5-20250929
Shows valid models if name is wrong, suggests closest matches.
./scripts/generate-fix.sh <issue-type> <provider>
# Issue types:
# - missing-api-key → Creates .env with correct format
# - wrong-format → Shows valid key format
# - missing-package → Installs provider package
# - model-compatibility → Lists valid models
# - rate-limiting → Adds retry helper with exponential backoff
# - import-error → Fixes import statements
# Verify API credentials work
./scripts/test-provider-connection.sh <provider>
Makes real API call with minimal tokens to verify setup.
OpenAI:
@ai-sdk/openaiOPENAI_API_KEYsk-proj-... or sk-...Anthropic:
@ai-sdk/anthropicANTHROPIC_API_KEYsk-ant-api03-...Google:
@ai-sdk/googleGOOGLE_GENERATIVE_AI_API_KEYAIza...xAI:
@ai-sdk/xaiXAI_API_KEYxai-...# Create .env with correct structure
./scripts/generate-fix.sh missing-api-key openai
# Then add actual key from provider dashboard
# Check valid models
./scripts/check-model-compatibility.sh anthropic claude-v3-opus
# Shows: Did you mean? → claude-opus-4-20250514
# Generate retry helper
./scripts/generate-fix.sh rate-limiting openai
# Creates retryHelper.ts with exponential backoff
# Install provider package
./scripts/generate-fix.sh missing-package anthropic
# Runs: npm install ai @ai-sdk/anthropic
Scripts: All scripts in scripts/ directory are executable and documented in README.md
Templates: templates/ contains .env, .gitignore, and error-handler-template.ts
Examples: examples/troubleshooting-guide.md has detailed solutions for 10+ scenarios including CORS, streaming, TypeScript, and provider-specific issues
Supported Providers: OpenAI, Anthropic, Google, xAI, Groq, Mistral, Cohere, DeepSeek
Version: 1.0.0 SDK Compatibility: Vercel AI SDK 5+