LiveConnectConfig missing historyConfig for Gemini Live 3.1

Đang mở
#974 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@hemasekhar-p đang làm issue này rồi.

Từ ngày 30/4/2026.

  • #1118 của @arnabnandy7 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

priority: p2 type: feature request

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.

Ngôn ngữ chính
Java
Star
399
Fork
127
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
74

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleapis/java-genai

Tất cả issue của googleapis/java-genai

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.