Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to generate code suggestions for PR #1609

Open
SaifTestlio opened this issue Mar 5, 2025 · 2 comments
Open

Failed to generate code suggestions for PR #1609

SaifTestlio opened this issue Mar 5, 2025 · 2 comments
Labels

Comments

@SaifTestlio
Copy link

Git provider (optional)

None

System Info (optional)

No response

Issues details

Hi, I am using PR-Agent on my public repo for code review, but when job is triggered and finished it displays following error: 'Failed to generate code suggestions for PR'
When I use any of command /review or /describe or any of pr-agent commands it gets stuck on 'Preparing review...' and further nothing happens.
I am using same config provided on website 'https://qodo-merge-docs.qodo.ai/installation/github/'
I have free account of OPENAI of which API_KEY i am using. Can you please guide me why it is behaving not as expected

@SaifTestlio SaifTestlio added the general label Mar 5, 2025
Copy link
Contributor

💡 Auto-generated documentation-based answer:

It sounds like you're experiencing an issue with PR-Agent (Qodo Merge) where commands are getting stuck and failing to complete. This is likely related to your OpenAI API key configuration. Here are some potential causes and solutions:

  1. OpenAI API Key Issues:

    • Your free OpenAI account may have usage limits or rate limits that are being exceeded
    • The API key might not have access to the required models (PR-Agent typically uses GPT-4 or Claude models by default)
    • Your API key might have expired or have insufficient credits
  2. Model Configuration:
    You can try configuring PR-Agent to use a different model that's available with your free account. In your configuration file, add:

    [config]
    model="gpt-3.5-turbo"  # Or another model available with your free tier
    
  3. Check Logs:
    If you're running PR-Agent as a GitHub Action, check the action logs for more detailed error messages that might provide additional information.

  4. Alternative Solution:
    Consider using Qodo Merge (the hosted version of PR-Agent) which offers a free trial and handles the API keys for you.

For more detailed troubleshooting, you might need to check your OpenAI account status and review any error messages in the logs.

Relevant Sources:

@mrT23
Copy link
Collaborator

mrT23 commented Mar 6, 2025

i think the auto-generated answer here is perfect.
i couldn't answer it better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants