From 602a91ace31d20a9056fe4c287ae1b2bf4be69c2 Mon Sep 17 00:00:00 2001 From: Dale Hawkins <107309+dkhawk@users.noreply.github.com> Date: Wed, 9 Sep 2026 14:26:03 -0600 Subject: [PATCH] ci: support GEMINI_MODEL repository variable in triage-issue workflow --- .github/scripts/answer_issue.py | 4 ++-- .github/scripts/triage_issue.py | 4 ++-- .github/workflows/triage-issue.yml | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/answer_issue.py b/.github/scripts/answer_issue.py index 25ce40d6..a0afe17c 100644 --- a/.github/scripts/answer_issue.py +++ b/.github/scripts/answer_issue.py @@ -46,8 +46,8 @@ def validate_response(response_text: str) -> bool: return True def get_gemini_response(api_key, system_instruction, user_content): - # Using gemini-3.5-flash for fast and reliable answering - url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent?key={api_key}" + model = os.getenv("GEMINI_MODEL", "gemini-3.8-flash") + url = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={api_key}" headers = {'Content-Type': 'application/json'} data = { "system_instruction": { diff --git a/.github/scripts/triage_issue.py b/.github/scripts/triage_issue.py index a835736c..66bae9c2 100644 --- a/.github/scripts/triage_issue.py +++ b/.github/scripts/triage_issue.py @@ -35,8 +35,8 @@ def sanitize_content(text: str) -> str: return text.replace("", "</issue_content>").replace("", "<issue_content>") def get_gemini_response(api_key, system_instruction, user_content): - # Using the stable Gemini 3.5 Flash - url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent?key={api_key}" + model = os.getenv("GEMINI_MODEL", "gemini-3.8-flash") + url = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={api_key}" headers = {'Content-Type': 'application/json'} data = { "system_instruction": { diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index 9714218b..c39b8af9 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -51,6 +51,7 @@ jobs: id: run_script env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GEMINI_MODEL: ${{ vars.GEMINI_MODEL }} ISSUE_TITLE: ${{ github.event.issue.title || github.event.inputs.title }} ISSUE_BODY: ${{ github.event.issue.body || github.event.inputs.body }} run: | @@ -85,6 +86,7 @@ jobs: if: github.event_name == 'workflow_dispatch' || github.event.action == 'opened' env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GEMINI_MODEL: ${{ vars.GEMINI_MODEL }} ISSUE_TITLE: ${{ github.event.issue.title || github.event.inputs.title }} ISSUE_BODY: ${{ github.event.issue.body || github.event.inputs.body }} run: |