Stay organized with collections
Save and categorize content based on your preferences.
ThinkingConfig
publicstructThinkingConfig:Sendable
extensionThinkingConfig:Encodable
Configuration for controlling the “thinking” behavior of compatible Gemini models.
Certain models, like Gemini 2.5 Flash and Pro, utilize a thinking process before generating a
response. This allows them to reason through complex problems and plan a more coherent and
accurate answer.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-25 UTC."],[],[],null,["# FirebaseAI Framework Reference\n\nThinkingConfig\n==============\n\n public struct ThinkingConfig : Sendable\n\n extension ThinkingConfig: Encodable\n\nConfiguration for controlling the \"thinking\" behavior of compatible Gemini models.\n\nCertain models, like Gemini 2.5 Flash and Pro, utilize a thinking process before generating a\nresponse. This allows them to reason through complex problems and plan a more coherent and\naccurate answer.\n- `\n ``\n ``\n `\n\n ### [init(thinkingBudget:)](#/s:10FirebaseAI14ThinkingConfigV14thinkingBudgetACSiSg_tcfc)\n\n `\n ` \n Initializes a new `ThinkingConfig`. \n\n #### Declaration\n\n Swift \n\n public init(thinkingBudget: Int? = nil)\n\n #### Parameters\n\n |------------------------|---------------------------------------------------------------------------|\n | ` `*thinkingBudget*` ` | The maximum number of tokens to be used for the model's thinking process. |"]]