From f557cec82c00fe1de93bc35d22eb2c4aabb0dc3c Mon Sep 17 00:00:00 2001 From: Allison Morgan Date: Mon, 28 Jul 2025 09:18:22 -0700 Subject: [PATCH 1/2] Migrate Gemini 1.5-Pro models to Gemini 2.0 Flash models (#240) * Migrate Gemini 1.5-Pro models to Gemini 2.0 Flash models * Update summary model to Gemini 2.0 Flash * Remove Gemini 1.5 model from evaluation suite --- .github/workflows/eval.yml | 4 ++-- app/models/document.rb | 2 +- python_components/document_inference/models.json | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index a1949bdf..8c364ab1 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -14,14 +14,14 @@ on: description: Inference Model options: - gemini-2.5-pro-preview-03-25 - - gemini-1.5-pro-latest + - gemini-2.0-flash + - gemini-2.0-flash-lite evaluation_model_name: type: choice description: Evaluation Model options: - gemini-2.5-flash - gemini-2.5-pro-preview-03-25 - - gemini-1.5-pro-latest runs_per_document: description: 'Number of times generate evaluations per document' required: false diff --git a/app/models/document.rb b/app/models/document.rb index a31d6801..767a5cb9 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -230,7 +230,7 @@ def inference_summary! api_host = "https://demo.codeforamerica.ai" end payload = { - model_name: "gemini-1.5-pro-latest", + model_name: "gemini-2.0-flash", documents: [{id: id, title: file_name, url: normalized_url, purpose: document_category}], page_limit: 7, inference_type: "summary", diff --git a/python_components/document_inference/models.json b/python_components/document_inference/models.json index a85480c5..2c2909f9 100644 --- a/python_components/document_inference/models.json +++ b/python_components/document_inference/models.json @@ -5,6 +5,12 @@ "gemini-1.5-pro-latest": { "key": "/asap-pdf/production/GOOGLE_AI_KEY-20250521205655769000000003" }, + "gemini-2.0-flash": { + "key": "/asap-pdf/production/GOOGLE_AI_KEY-20250521205655769000000003" + }, + "gemini-2.0-flash-lite": { + "key": "/asap-pdf/production/GOOGLE_AI_KEY-20250521205655769000000003" + }, "gemini-2.5-pro-preview-03-25": { "key": "/asap-pdf/production/GOOGLE_AI_KEY-20250521205655769000000003" } From 29e8b95c187f26f12b379fdafa679ea355d02e88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:29:52 +0000 Subject: [PATCH 2/2] Bump pg from 1.5.9 to 1.6.0 Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.9 to 1.6.0. - [Changelog](https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md) - [Commits](https://github.com/ged/ruby-pg/compare/v1.5.9...v1.6.0) --- updated-dependencies: - dependency-name: pg dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 69f4fc7b..ed1e1531 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -286,7 +286,11 @@ GEM parser (3.3.8.0) ast (~> 2.4.1) racc - pg (1.5.9) + pg (1.6.0) + pg (1.6.0-aarch64-linux) + pg (1.6.0-arm64-darwin) + pg (1.6.0-x86_64-darwin) + pg (1.6.0-x86_64-linux) pp (0.6.2) prettyprint prettyprint (0.2.0)