@@ -27,7 +27,8 @@ import {
2727 HarmBlockThreshold ,
2828 HarmCategory ,
2929 InferenceMode ,
30- ResponseModality
30+ ResponseModality ,
31+ ThinkingLevel
3132} from './enums' ;
3233import { ObjectSchemaRequest , SchemaRequest } from './schema' ;
3334
@@ -440,14 +441,29 @@ export interface ThinkingConfig {
440441 * "thinking" process. A higher budget may result in higher quality responses for complex tasks
441442 * but can also increase latency and cost.
442443 *
443- * If you don't specify a budget, the model will determine the appropriate amount
444- * of thinking based on the complexity of the prompt.
444+ * The range of supported thinking budget values depends on the model.
445+ *
446+ * - To use the default thinking budget or thinking level for a model, leave
447+ * this value undefined.
448+ *
449+ * - To disable thinking, when supported by the model, set this value to `0`.
450+ *
451+ * - To use dynamic thinking, allowing the model to decide on the thinking
452+ * budget based on the task, set this value to `-1`.
445453 *
446454 * An error will be thrown if you set a thinking budget for a model that does not support this
447455 * feature or if the specified budget is not within the model's supported range.
448456 */
449457 thinkingBudget ?: number ;
450458
459+ /**
460+ * If not specified, Gemini will use the model's default dynamic thinking level.
461+ *
462+ * Important: Gemini 2.5 series models do not support thinking levels; use
463+ * `thinkingBudget` to set a thinking budget instead.
464+ */
465+ thinkingLevel ?: ThinkingLevel ;
466+
451467 /**
452468 * Whether to include "thought summaries" in the model's response.
453469 *
0 commit comments