Enum Class GoogleGenAiThinkingLevel

java.lang.Object
java.lang.Enum<GoogleGenAiThinkingLevel>
org.springframework.ai.google.genai.common.GoogleGenAiThinkingLevel
All Implemented Interfaces:
Serializable, Comparable<GoogleGenAiThinkingLevel>, Constable

public enum GoogleGenAiThinkingLevel extends Enum<GoogleGenAiThinkingLevel>
Enum representing the level of thinking tokens the model should generate. This controls the depth of reasoning the model applies during generation.

Model Compatibility: This option is only supported by Gemini 3 Pro models. For Gemini 2.5 series and earlier models, use thinkingBudget instead.

Important: thinkingLevel and thinkingBudget are mutually exclusive. You cannot use both in the same request - doing so will result in an API error.

Since:
1.1.0
Author:
Dan Dobrin
See Also:
  • Enum Constant Details

    • THINKING_LEVEL_UNSPECIFIED

      public static final GoogleGenAiThinkingLevel THINKING_LEVEL_UNSPECIFIED
      Unspecified thinking level. The model uses its default behavior.
    • LOW

      public static final GoogleGenAiThinkingLevel LOW
      Low thinking level. Minimal reasoning tokens are generated. Use for simple queries where speed is preferred over deep analysis.
    • HIGH

      public static final GoogleGenAiThinkingLevel HIGH
      High thinking level. Extensive reasoning tokens are generated. Use for complex problems requiring deep analysis and step-by-step reasoning.
  • Method Details

    • values

      public static GoogleGenAiThinkingLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GoogleGenAiThinkingLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null