DEV Community

PhenoX
PhenoX

Posted on

Fixing the "--effort is not supported" Error in Gemini 3.1 Pro API Calls

If you are encountering the following error when trying to run your AI models:

Error: error: invalid model selection (--model "gemini-3.1-pro" --effort "low"): --effort is not supported for model "gemini-3.1-pro"
Enter fullscreen mode Exit fullscreen mode

💡 For immediate deployment: The complete source code suite (ZIP) for this architecture is available on Gumroad for $0+ (Pay What You Want).

Here is the quick fix and explanation for why this happens.

Cause of the Error

The --effort flag (often used to control reasoning effort or compute time, similar to OpenAI's reasoning effort parameters) is not supported by the gemini-3.1-pro model endpoint in your current CLI or API configuration.

Solution

Remove the --effort "low" (or any other effort level like --effort "high") parameter from your command or configuration file.

Incorrect Command Example:

ai-tool --model "gemini-3.1-pro" --effort "low" -p "Your prompt here"
Enter fullscreen mode Exit fullscreen mode

Corrected Command Example:

ai-tool --model "gemini-3.1-pro" -p "Your prompt here"
Enter fullscreen mode Exit fullscreen mode

Once you remove the unsupported argument, the model call should execute successfully.


If this engineering log saved your production server (and your sanity), consider supporting our architecture on GitHub Sponsors.
Sponsor on GitHub

Top comments (0)