- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 27.3k
 
Description
Hey maintainers! 👋
I noticed that the Presubmit.ai workflow is failing on pull requests. I took a look at the workflow file and found a couple of issues that are causing the failures.
The Problem
The workflow in .github/workflows/presubmit.yml is failing with two errors:
- Missing API Key: The workflow checks for 
LLM_API_KEYbut it's not configured in the repo secrets - Invalid Model: The model 
gemini-1.5-flashisn't supported for the API version being used 
This is blocking the AI reviewer from running on PRs, though it doesn't prevent merging since it's a separate check.
Current Workflow Code
- name: Check required secrets
  run: |
    if [ -z "${{ secrets.LLM_API_KEY }}" ]; then
      echo "Error: LLM_API_KEY secret is not configured"
      exit 1
    fi
- name: Run AI Reviewer
  uses: presubmit/ai-reviewer@latest
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
    LLM_MODEL: "gemini-1.5-flash"Possible Solutions
Option 1: Fix the workflow (if you want to keep the AI reviewer)
- 
Add the
LLM_API_KEYsecret:- Go to Settings → Secrets and variables → Actions
 - Add a new secret named 
LLM_API_KEYwith your Google AI API key 
 - 
Update the model to a supported version:
LLM_MODEL: "gemini-1.5-flash-002" # or another model from the supported list
 
Option 2: Make it optional (recommended for now)
If you're not ready to configure the API key, you could make the workflow optional so it doesn't block contributors:
- name: Check required secrets
  id: check-secrets
  run: |
    if [ -z "${{ secrets.LLM_API_KEY }}" ]; then
      echo "LLM_API_KEY not configured, skipping AI review"
      echo "skip=true" >> $GITHUB_OUTPUT
    fi
- name: Run AI Reviewer
  if: steps.check-secrets.outputs.skip != 'true'
  uses: presubmit/ai-reviewer@latest
  # ... rest of the configOption 3: Disable the workflow temporarily
If the AI reviewer isn't critical right now, you could disable it:
- Go to Actions tab
 - Select "Presubmit.ai" workflow
 - Click the "..." menu
 - Select "Disable workflow"
 
Impact
Right now this doesn't block PRs from being merged, but contributors might see a red X on their PRs which can be confusing. Making it optional or fixing it would improve the contributor experience.
Let me know if you'd like me to submit a PR for any of these solutions!
Thanks for maintaining this awesome repo! ��