Skip to content

chore: add periodic check for deprecated Gemini models#1

Open
ssbushi wants to merge 1 commit intomainfrom
chore/add-gemini-deprecation-check-workflow-5178270137918649767
Open

chore: add periodic check for deprecated Gemini models#1
ssbushi wants to merge 1 commit intomainfrom
chore/add-gemini-deprecation-check-workflow-5178270137918649767

Conversation

@ssbushi
Copy link
Copy Markdown
Owner

@ssbushi ssbushi commented Mar 20, 2026

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.

  1. scripts/check-deprecated-models.ts: Uses Genkit (Gemini 1.5 Flash) with a custom fetchUrl tool to retrieve the live text from Google AI and Vertex AI documentation URLs. It parses the information to generate a mapping of deprecatedModel -> recommendedReplacement, then iterates over .ts/.js files in the repository to replace string literals.
  2. .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 the gh CLI tool when changes are detected.
  3. Updated dependencies: package.json and pnpm-lock.yaml install the needed dependencies (@genkit-ai/core, @genkit-ai/googleai, jsdom, zod).

PR created automatically by Jules for task 5178270137918649767 started by @ssbushi

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>
@google-labs-jules
Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant