Firebase.AI.ThinkingConfig

Configuration options for Thinking features.

Summary

Constructors and Destructors

ThinkingConfig(int? thinkingBudget, bool? includeThoughts)
Initializes configuration options for Thinking features.
ThinkingConfig(ThinkingLevel thinkingLevel, bool? includeThoughts)
Initializes configuration options for Thinking features with a given ThinkingLevel.

Public types

ThinkingLevel{
  Minimal,
  Low,
  Medium,
  High
}
enum
A preset that balances the trade-off between reasoning quality and response speed for a model's "thinking" process.

Public types

ThinkingLevel

 Firebase::AI::ThinkingConfig::ThinkingLevel

A preset that balances the trade-off between reasoning quality and response speed for a model's "thinking" process.

Note, not all models support every level.

Properties
High

Maximizes reasoning depth.

Low

Minimizes latency and cost.

Medium

Balanced thinking for most tasks.

Minimal

Matches the "no thinking" setting for most queries.

Public functions

ThinkingConfig

 Firebase::AI::ThinkingConfig::ThinkingConfig(
  int? thinkingBudget,
  bool? includeThoughts
)

Initializes configuration options for Thinking features.

Used for Gemini models 2.5 and earlier.

Details
Parameters
thinkingBudget
The token budget for the model's thinking process.
includeThoughts
If true, summaries of the model's "thoughts" are included in responses.

ThinkingConfig

 Firebase::AI::ThinkingConfig::ThinkingConfig(
  ThinkingLevel thinkingLevel,
  bool? includeThoughts
)

Initializes configuration options for Thinking features with a given ThinkingLevel.

Used for Gemini models 3.0 and newer. See https://ai.google.dev/gemini-api/docs/thinking#thinking-levels

Details
Parameters
thinkingLevel
Defines the model's thinking process.
includeThoughts
If true, summaries of the model's "thoughts" are included in responses.