googleThinkingLevelFor function

String? googleThinkingLevelFor(
  1. String? level
)

Maps our thinking ladder rung onto Gemini's ThinkingLevel enum values; unknown rungs (none today after the clamp) map to null.

Implementation

String? googleThinkingLevelFor(String? level) => switch (level) {
  'minimal' => 'MINIMAL',
  'low' => 'LOW',
  'medium' => 'MEDIUM',
  'high' => 'HIGH',
  _ => null,
};