-
Notifications
You must be signed in to change notification settings - Fork 4.4k
.Net: Add ThinkingLevel parameter to GeminiThinkingConfig for Gemini 3.0+ #13396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…kingBudget Co-authored-by: markwallace-microsoft <[email protected]>
|
@copilot, Don't obsolete the other property as it is still applicable for older models. Remove the added #pragma warning disable CS0618 added because of this. Keep as is all unit tests that were checking for the thinking budget, and additionally add the thinking level tests validating that either can be used and work as expected. Move/Rename concept test file to "dotnet/samples/Concepts/ChatCompletion/Google_GeminiChatCompletionWithThinking.cs" as this now contains both ways. |
…emove pragma warnings, rename sample file Co-authored-by: rogerbarreto <[email protected]>
Done in 20705e0:
|
|
@copilot I see you changed the PromptExecutionSettingsCloneWorksAsExpected test, please keep it or make it a theory where you check for both ThinkingBudget and ThinkingLevel Clone work as expected. |
…h ThinkingBudget and ThinkingLevel, restore Freeze test Co-authored-by: rogerbarreto <[email protected]>
Done in 6df9a1f - Converted |
Motivation and Context
Gemini 3.0 introduces a new
ThinkingLevelstring parameter with values: "none", "low", "medium", "high". The existingThinkingBudgetparameter remains valid for older Gemini 2.5 models.Fixes #11920
Description
ThinkingLevelproperty toGeminiThinkingConfigThinkingBudgetproperty as-is (still applicable for older Gemini 2.5 models)GeminiRequestThinkingConfigto serialize both propertiesThinkingLevelserialization and deserializationPromptExecutionSettingsCloneWorksAsExpectedto a Theory that tests bothThinkingBudgetandThinkingLevelclone work as expectedThinkingBudgetunit tests unchangedGoogle_GeminiChatCompletionWithThinking.csto demonstrate both APIsUsage:
Contribution Checklist
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.