Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/triage_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import sys

def get_gemini_response(api_key, prompt):
# 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 = {
"contents": [{
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/triage-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ class GeminiVisualTestHelper {

val fullPrompt = "$systemPrompt\n\nCommand: \"$prompt\"\n\nUI Hierarchy:\n$hierarchyXml"

// Use a simpler text-only model for this task as no image is involved.
// The user mentioned "gemini-flash 2.5" works, but we should use a standard name.
val modelName = "gemini-2.5-flash-lite"
val modelName = System.getenv("GEMINI_MODEL") ?: "gemini-3.8-flash"
val request = GeminiRequest(contents = listOf(Content(parts = listOf(Part(text = fullPrompt)))))

var attempts = 0
Expand Down Expand Up @@ -229,7 +227,8 @@ class GeminiVisualTestHelper {
var response: HttpResponse? = null
while (attempts < 3) {
attempts++
response = client.post("https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent?key=$apiKey") {
val model = System.getenv("GEMINI_MODEL") ?: "gemini-3.8-flash"
response = client.post("https://generativelanguage.googleapis.com/v1beta/models/$model:generateContent?key=$apiKey") {
contentType(ContentType.Application.Json)
setBody(request)
}
Expand Down
Loading