Skip to content

Commit 28a56f5

Browse files
committed
ci: support GEMINI_MODEL in auto-fix workflow and create_pr.py
1 parent 602a91a commit 28a56f5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/scripts/create_pr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
import glob
2020

2121
def get_gemini_response(api_key, prompt, json_mode=False):
22-
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent?key={api_key}"
22+
model = os.getenv("GEMINI_MODEL", "gemini-3.8-flash")
23+
url = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={api_key}"
2324
headers = {'Content-Type': 'application/json'}
2425
data = {
2526
"contents": [{

.github/workflows/auto-fix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
- name: Run Auto-Fix Script
6262
env:
6363
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
64+
GEMINI_MODEL: ${{ vars.GEMINI_MODEL }}
6465
ISSUE_TITLE: ${{ github.event.issue.title || github.event.inputs.title }}
6566
ISSUE_BODY: ${{ github.event.issue.body || github.event.inputs.body }}
6667
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.inputs.number }}

0 commit comments

Comments
 (0)