fix: migrate from deprecated @google/generative-ai to @google/genai SDK #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Contribution: Critical Package Updates
Type
bugfix
/maintenance
Description
Migrates from deprecated Google AI SDK to the new official SDK, plus updates Sentry to v10 for better performance monitoring.
Breaking Changes
@google/generative-ai
→@google/genai
(deprecated package)@sentry/cloudflare@9
→@sentry/cloudflare@10
(major version)Migration Guide Included
Impact
Testing
Risk Assessment
Related Issues
The old Google AI SDK is officially deprecated and will stop receiving updates.
Production Validation
This migration has been tested in production with the Kogotochki bot:
Files Changed
package.json
- Updated dependenciessrc/lib/ai/adapters/google-ai.ts
- New SDK implementationsrc/services/gemini-service.ts
- Updated API callsdocs/migrations/
- Comprehensive migration guidesThese updates have been thoroughly tested in production with the Kogotochki bot.