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

Google Gemini Free Accounts are limited to input 32K Tokens Per Minute #35

Open
eastlondoner opened this issue Feb 13, 2025 · 5 comments

Comments

@eastlondoner
Copy link
Owner

Add details to the README regarding gemini.

If we encounter a 429 error calling Gemini then add to our error log some information about this.

@eastlondoner
Copy link
Owner Author

Also add error handling for this error type

Querying Gemini AI using gemini-2.0-pro-exp-02-05...
Error: Gemini API error (503): {
  "error": {
    "code": 503,
    "message": "The model is overloaded. Please try again later.",
    "status": "UNAVAILABLE"
  }
}

Try a different model and add retry with backoff

@overdrive-dev
Copy link

can we use gemini pro somehow?

@eastlondoner
Copy link
Owner Author

Image

@eastlondoner
Copy link
Owner Author

Hi @overdrive-dev,

To use Gemini Pro with cursor-tools, you need to configure the gemini.model setting in your cursor-tools.config.json file. You can find this file in either your project's root directory or in your user home directory (~/.cursor-tools/config.json).

Here's how to set it:

  1. Locate or Create the Config File:

    • Check your project's root directory for cursor-tools.config.json
    • If it's not there, check your home directory: ~/.cursor-tools/config.json
    • If it doesn't exist in either location, create ~/.cursor-tools/config.json
  2. Edit the gemini Section:

    • Open the cursor-tools.config.json file in a text editor
    • Find the gemini section (or add it if it's missing). It should look like this:
    {
      "gemini": {
        "model": "gemini-2.0-pro-exp-02-05",
        "maxTokens": 10000
      }
      // ... other configurations ...
    }
    • Change the "model" value to the Gemini Pro model you want to use. For example, if you want to use gemini-pro, you should not use it with very large repositories (above 800K tokens). The gemini-2.0-pro-exp-02-05 model is recommended for large repositories up to 2M tokens.
    • So, to use gemini-2.0-pro-exp-02-05, make sure the section looks like the example above.
  3. Save the File: Save the changes you made to cursor-tools.config.json

  4. Ensure API Key: Make sure you have your GEMINI_API_KEY set in your .cursor-tools.env file (either in your project root or in ~/.cursor-tools/)

After these steps, cursor-tools will use the specified Gemini Pro model for commands like cursor-tools repo. You don't need to specify the model on the command line unless you want to temporarily override your configured default. For example, cursor-tools repo "explain this function" --model="gemini-pro" would use gemini-pro for just that single command.

Let me know if you have any other questions!

@eastlondoner
Copy link
Owner Author

@overdrive-dev that’s what cursor has to say, make sense?

I think it is documented in the configuration section of the README

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

No branches or pull requests

2 participants