chore: add periodic check for deprecated Gemini models#1
chore: add periodic check for deprecated Gemini models#1
Conversation
Adds a new TypeScript script (`scripts/check-deprecated-models.ts`) that leverages the Genkit SDK and Gemini models to scan Google AI and Vertex AI documentation for deprecated models. The AI agent uses a `fetchUrl` tool to securely download and process webpage content, outputting the deprecated models and their recommended replacements in a structured JSON format. It then scans the `js` directory and applies these replacements. Also introduces a GitHub Actions workflow (`.github/workflows/check-deprecated-models.yml`) that runs this script automatically once a week, and opens a PR using the GitHub CLI if modifications are found. Required configurations and permissions are included. Co-authored-by: ssbushi <66321939+ssbushi@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This implements the request for a periodic check using Gemini APIs to scan the codebase for deprecated models and make a PR to update to the newer ones.
scripts/check-deprecated-models.ts: Uses Genkit (Gemini 1.5 Flash) with a customfetchUrltool to retrieve the live text from Google AI and Vertex AI documentation URLs. It parses the information to generate a mapping ofdeprecatedModel->recommendedReplacement, then iterates over.ts/.jsfiles in the repository to replace string literals..github/workflows/check-deprecated-models.yml: Sets up a GitHub action that runs once a week (cron: '0 0 * * 1') and handles PR generation via standard Git commands and theghCLI tool when changes are detected.package.jsonandpnpm-lock.yamlinstall the needed dependencies (@genkit-ai/core,@genkit-ai/googleai,jsdom,zod).PR created automatically by Jules for task 5178270137918649767 started by @ssbushi