I’m seeing the same. Actually I never got a proper tool call response, but ALWAYS executable code, although that feature should be disabled:
// this is our wrapper code, but the config is passed through as is:
geminiLiveProcessor := agent_runtime.NewGeminiLiveProcessor(
agent_runtime.WithGeminiModel("gemini-2.0-flash-live-001"),
agent_runtime.WithGeminiClientConfig(func(config *genai.ClientConfig) {
config.APIKey = geminiApiKey
}),
agent_runtime.WithLiveConfig(func(config *genai.LiveConnectConfig) {
// default, but make explicit for test
config.ResponseModalities = []genai.Modality{genai.ModalityAudio}
config.SystemInstruction = &genai.Content{
Role: "system",
Parts: []*genai.Part{{
Text: "You are an assistant helping the user to remember things. " +
"You can only remember things by using your available tool functions to store memories. " +
"NEVER try to write or execute code.",
}},
}
}),
)
// our base config
liveConfig: &genai.LiveConnectConfig{
// we can only use either text or audio, not both
ResponseModalities: []genai.Modality{genai.ModalityAudio},
InputAudioTranscription: &genai.AudioTranscriptionConfig{},
OutputAudioTranscription: &genai.AudioTranscriptionConfig{},
RealtimeInputConfig: &genai.RealtimeInputConfig{
AutomaticActivityDetection: &genai.AutomaticActivityDetection{
Disabled: false,
StartOfSpeechSensitivity: genai.StartSensitivityLow,
EndOfSpeechSensitivity: genai.EndSensitivityLow,
PrefixPaddingMs: utils.Ptr[int32](100),
SilenceDurationMs: utils.Ptr[int32](300),
},
ActivityHandling: genai.ActivityHandlingStartOfActivityInterrupts,
TurnCoverage: genai.TurnCoverageTurnIncludesOnlyActivity,
},
SpeechConfig: &genai.SpeechConfig{
LanguageCode: "en-US",
VoiceConfig: &genai.VoiceConfig{
PrebuiltVoiceConfig: &genai.PrebuiltVoiceConfig{
VoiceName: "Puck",
},
},
},
},
// this is also passed through basically as-is as a genai.BehaviorBlocking tool function definition
geminiLiveProcessor.RegisterFunction(agent_runtime.FunctionDefinition{
Name: "store_memory_in_db",
Description: "stores a memory for later use",
Parameters: map[string]any{
"type": "object",
"required": []string{"memory"},
"properties": map[string]any{
"memory": map[string]any{
"type": "string",
},
},
},
And then we do finally receive a model turn with a ExecutableCode
part, but not a FunctionCall
part