.Net: New Feature: IncludeThoughts for Google Connector
name: IncludeThoughts for Google Connector about: Add ability to get thoughts in response from Google Gemini models.
The official C# SDK for Google supports a parameter "IncludeThoughts" on the ThinkingConfig. Setting that to true, will return the thoughts in the response.
This parameter is missing in Microsoft.SemanticKernel.Connectors.Google.GeminiThinkingConfig
Additionally, I believe the response logic for (at least) streaming should be updated as well to indicate if a part is a thought or not. Right now, InnerContent is just a string, not a POCO object as I would expect. See official docs here. It doesn't include C# in the docs, but it's definitely there.
Thought Signatures are mandatory for Gemini 3 Pro with Function Calling
We've tested Gemini-3-Pro-Preview with Semantic Kernel and encountered the exact issue described in this thread. When using function calling, the API returns a 400 Bad Request with the error:
"Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance."
According to Google's documentation, Thought Signatures are mandatory for Gemini 3 Pro when making function calls. Without this feature, Gemini 3 Pro cannot be used with Semantic Kernel for any function calling scenarios.
This is a blocking issue for production use of Gemini 3 Pro.
This issue is stale because it has been open for 90 days with no activity.
I have IncludeThoughts = false, but I receive al output with only one item and with the THOUGHT.
I use this:
private static string RemoveThink(ChatMessageContent content)
{
var value = string.Join("", content.Items
.Where(item =>
item is TextContent text &&
// Verify thinking
(text.Metadata is null ||
(!text.Metadata.ContainsKey("IsThinking") &&
!text.Metadata.ContainsKey("IsThought")))
)
.Select(item => item.ToString()?.Trim() ?? ""))
.Trim();
if (value.StartsWith("THOUGHT", StringComparison.OrdinalIgnoreCase))
{
throw new Exception("THOUGHT");
}
but it doesn't work sometimes
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.