@@ -23,7 +23,6 @@ public class GoogleAI2ChatService : ChatService
2323 new SafetySetting { Category = HarmCategory . HarmCategoryDangerousContent , Threshold = HarmBlockThreshold . BlockNone } ,
2424 new SafetySetting { Category = HarmCategory . HarmCategoryHarassment , Threshold = HarmBlockThreshold . BlockNone } ,
2525 ] ;
26- private DBReasoningEffort _reasoningEffort = default ;
2726
2827 protected override bool SupportsVisionLink => false ;
2928
@@ -61,9 +60,9 @@ public override async IAsyncEnumerable<ChatSegment> ChatStreamed(IReadOnlyList<C
6160 {
6261 gc . ThinkingConfig = new ThinkingConfig
6362 {
64- ThinkingBudget = _reasoningEffort switch
63+ ThinkingBudget = options . ReasoningEffortLevel switch
6564 {
66- var x when x . IsLowOrMinimal ( ) => 1024 ,
65+ var x when x == ChatReasoningEffortLevel . Minimal || x == ChatReasoningEffortLevel . Low => 1024 ,
6766 _ => null ,
6867 } ,
6968 IncludeThoughts = true ,
@@ -90,7 +89,7 @@ var x when x.IsLowOrMinimal() => 1024,
9089 SystemInstruction = OpenAIChatMessageToGoogleContent ( messages . Where ( x => x is SystemChatMessage ) ) switch { [ ] => null , var x => x [ 0 ] } ,
9190 GenerationConfig = gc ,
9291 SafetySettings = _safetySettings ,
93- Tools = tool == null ? null : [ tool ] ,
92+ Tools = Model . AllowToolCall && tool != null ? [ tool ] : null ,
9493 } ;
9594 Stopwatch codeExecutionSw = new ( ) ;
9695 string ? codeExecutionId = null ;
0 commit comments