From 0d9ae1920dea956856055770f71192ed6317f72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Kirst=C3=A4tter?= <7329802+jochenkirstaetter@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:23:06 +0400 Subject: [PATCH] .NET: use valid Gemini model (#2695) * use proper Gemini model * use named parameters --------- Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> --- .../AgentProviders/Agent_With_GoogleGemini/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs b/dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs index db633dc47d..89c86d5c56 100644 --- a/dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs +++ b/dotnet/samples/GettingStarted/AgentProviders/Agent_With_GoogleGemini/Program.cs @@ -11,7 +11,7 @@ const string JokerInstructions = "You are good at telling jokes."; const string JokerName = "JokerAgent"; string apiKey = Environment.GetEnvironmentVariable("GOOGLE_GENAI_API_KEY") ?? throw new InvalidOperationException("Please set the GOOGLE_GENAI_API_KEY environment variable."); -string model = Environment.GetEnvironmentVariable("GOOGLE_GENAI_MODEL") ?? "gemini-2.5-fast"; +string model = Environment.GetEnvironmentVariable("GOOGLE_GENAI_MODEL") ?? "gemini-2.5-flash"; // Using a Google GenAI IChatClient implementation // Until the PR https://github.com/googleapis/dotnet-genai/pull/81 is not merged this option @@ -28,7 +28,7 @@ Console.WriteLine($"Google GenAI client based agent response:\n{response}"); // Using a community driven Mscc.GenerativeAI.Microsoft package ChatClientAgent agentCommunity = new( - new GeminiChatClient(apiKey, model), + new GeminiChatClient(apiKey: apiKey, model: model), name: JokerName, instructions: JokerInstructions);