-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Git provider
Github Cloud
System Info
GitHub Actions on ubuntu-latest runner
Bug details
Hi CodiumAI team,
I'm trying to use the PR Agent with Google's Gemini models via GitHub Actions, but it seems the PR_AGENT.MODEL environment variable is being ignored. Even when I set it to "gemini-pro" or "gemini-1.5-pro-latest" and provide a GOOGLE_API_KEY, the agent attempts to use OpenAI models (gpt-5-2025-08-07, o4-mini) and fails with an authentication error.
Steps to Reproduce:
Set up a workflow using Codium-ai/[email protected] (or @main).
Configure secrets for GOOGLE_API_KEY.
Set the following environment variables in the action step:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
PR_AGENT.MODEL: "gemini-1.5-pro-latest" (also tried "gemini-pro")
PR_AGENT.LANGUAGE: "japanese"
Trigger the workflow on a pull request (opened or synchronize).
Expected Behavior:
The PR Agent should use the specified Gemini model (gemini-1.5-pro-latest) with the provided GOOGLE_API_KEY.
Actual Behavior:
The action fails. The logs show that the agent tries to fall back to OpenAI models and encounters an authentication error:
コード スニペット
{"text": "Generating prediction with gpt-5-2025-08-07\n", ...}
{"text": "Error during LLM inference: litellm.AuthenticationError: ... OpenAIException - Incorrect API key provided: dummy_key....\n", ...}
{"text": "Failed to generate prediction with gpt-5-2025-08-07\n", ...}
{"text": "Generating prediction with o4-mini\n", ...}
{"text": "Error during LLM inference: litellm.AuthenticationError: ... OpenAIException - Incorrect API key provided: dummy_key....\n", ...}
{"text": "Failed to generate prediction with o4-mini\n", ...}
{"text": "Error generating PR description ... Failed to generate prediction with any model of ['gpt-5-2025-08-07', 'o4-mini']\n", ...}
Workflow Configuration:
YAML
jobs:
code-review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run CodiumAI PR-Agent Review
id: pr_agent_review
uses: Codium-ai/[email protected] # Also tried @main
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
PR_AGENT.MODEL: "gemini-1.5-pro-latest" # Also tried "gemini-pro"
PR_AGENT.LANGUAGE: "japanese"
# ... (Discord notification step) ...
Environment:
GitHub Actions
Runner: ubuntu-latest
Action Version: Codium-ai/[email protected] (also tested with @main)
Is this a known issue, or is there something incorrect in my configuration? Any help would be appreciated.
Thanks!