LiveConnectConfig missing historyConfig for Gemini Live 3.1 history seeding
Description
I am using the Java GenAI SDK with Gemini Live 3.1, but I cannot configure historyConfig in LiveConnectConfig.
The field appears to be required for Gemini Live 3.1 history seeding to work correctly, but in the Java SDK the LiveConnectConfig class does not expose historyConfig.
Because of that, when using Gemini Live 3.1 from Java, the conversation history is not working as expected.
Without historyConfig enabled, the Gemini Live session freezes/hangs when I send conversation history.
Dependency version
com.google.genai
google-genai
1.51.0
Model
gemini-3.1-flash-live-preview
Current behavior
LiveConnectConfig does not contain a historyConfig / history_config field.
Example:
LiveConnectConfig config = LiveConnectConfig.builder()
.responseModalities(List.of(Modality.Known.AUDIO))
.systemInstruction(
Content.builder()
.role("user")
.parts(List.of(Part.fromText(systemPrompt)))
.build()
)
// Missing:
// .historyConfig(...)
.build();
Because this config is missing, initial conversation history does not work correctly with Gemini Live 3.1.
Expected behavior
The Java SDK should expose historyConfig in LiveConnectConfig, similar to other SDKs.
Expected example:
LiveConnectConfig config = LiveConnectConfig.builder()
.responseModalities(List.of(Modality.Known.AUDIO))
.historyConfig(
HistoryConfig.builder()
.initialHistoryInClientContent(true)
.build()
)
.build();
Why this is needed
Gemini Live 3.1 appears to require history configuration for initial history/client content behavior. Without historyConfig, Java users cannot properly seed or continue conversation history when using Gemini Live 3.1.
See 'When migrating from gemini-2.5-flash-native-audio-preview-12-2025 to gemini-3.1-flash-live-preview' in https://github.com/google-gemini/gemini-skills/blob/main/skills/gemini-live-api-dev/SKILL.md
Impact
This blocks Java users from using Gemini Live 3.1 with conversation history properly.
Request
Please add support for historyConfig / HistoryConfig in the Java SDK LiveConnectConfig, similar to the support available in other SDKs.
LiveConnectConfig missing historyConfig for Gemini Live 3.1 history seeding
Description
I am using the Java GenAI SDK with Gemini Live 3.1, but I cannot configure historyConfig in LiveConnectConfig.
The field appears to be required for Gemini Live 3.1 history seeding to work correctly, but in the Java SDK the LiveConnectConfig class does not expose historyConfig.
Because of that, when using Gemini Live 3.1 from Java, the conversation history is not working as expected.
Without historyConfig enabled, the Gemini Live session freezes/hangs when I send conversation history.
Dependency version
com.google.genai
google-genai
1.51.0
Model
gemini-3.1-flash-live-preview
Current behavior
LiveConnectConfig does not contain a historyConfig / history_config field.
Example:
LiveConnectConfig config = LiveConnectConfig.builder()
.responseModalities(List.of(Modality.Known.AUDIO))
.systemInstruction(
Content.builder()
.role("user")
.parts(List.of(Part.fromText(systemPrompt)))
.build()
)
// Missing:
// .historyConfig(...)
.build();
Because this config is missing, initial conversation history does not work correctly with Gemini Live 3.1.
Expected behavior
The Java SDK should expose historyConfig in LiveConnectConfig, similar to other SDKs.
Expected example:
LiveConnectConfig config = LiveConnectConfig.builder()
.responseModalities(List.of(Modality.Known.AUDIO))
.historyConfig(
HistoryConfig.builder()
.initialHistoryInClientContent(true)
.build()
)
.build();
Why this is needed
Gemini Live 3.1 appears to require history configuration for initial history/client content behavior. Without historyConfig, Java users cannot properly seed or continue conversation history when using Gemini Live 3.1.
See 'When migrating from gemini-2.5-flash-native-audio-preview-12-2025 to gemini-3.1-flash-live-preview' in https://github.com/google-gemini/gemini-skills/blob/main/skills/gemini-live-api-dev/SKILL.md
Impact
This blocks Java users from using Gemini Live 3.1 with conversation history properly.
Request
Please add support for historyConfig / HistoryConfig in the Java SDK LiveConnectConfig, similar to the support available in other SDKs.