googleapis / googleapis/python-genai

LiveConnectConfig does not support cached_content – Is cached context unsupported in Live API?

Offen
#2,102 1 Kommentar 1 Reaktion 1 zugewiesene Person Beansprucht von @Venkaiahbabuneelam Auf GitHub ansehen
priority: p3 type: feature request type: question
Vorherrschende Sprache
Python
Sterne
4k
Forks
1k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
41

Beschreibung

Hello,

I am currently integrating the Gemini Live API using the Python SDK and configuring sessions via types.LiveConnectConfig.

While working on optimizing prompt context size and reducing repeated system instruction payloads, I attempted to use the cached_content parameter (as supported in GenerateContentConfig) to reference previously cached context.

However, I noticed:

cached_content exists in GenerateContentConfig

cached_content does not exist in LiveConnectConfig

GenerationConfig (used inside LiveConnectConfig) also does not expose cached_content

The Pydantic model validation prevents adding this field manually

This raises a few questions:

Is cached_content intentionally unsupported in the Live API?

If so, is session_resumption the intended mechanism for maintaining large or persistent context across Live sessions?

If not, is this a limitation of the current Python SDK (i.e., missing support in LiveConnectConfig)?

Is there a recommended way to reuse large system instructions or cached context within Live sessions to optimize token usage?

Live API currently supports cached context?

Support is planned?

There is an alternative best practice for this scenario?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.