🔴 Required Information
Is your feature request related to a specific problem?
The Gemini class has a private _live_api_client property (leading underscore) that subclasses must override to customize the genai.Client used for Live API connections. This is contradictory — Python convention treats _-prefixed names as implementation details not intended for external override, yet Live API customization requires it.
The existing docstring documents how to override api_client for non-Live usage, but there's no public equivalent for Live API.
Describe the Solution You'd Like
Rename _live_api_client to live_api_client (remove leading underscore) and update the docstring to document the override pattern, similar to the existing api_client example:
class LiveGemini(Gemini):
@cached_property
def live_api_client(self):
return genai.Client(enterprise=True, location="europe-central2")
Update the class docstring to include something like:
Customizing the underlying Live Client:
To set ``google.genai.Client`` options for the Live API connection,
subclass ``Gemini`` and override the ``live_api_client`` property::
from functools import cached_property
from google.adk.models import Gemini
from google.genai import Client
class LiveGemini(Gemini):
@cached_property
def live_api_client(self):
return Client(enterprise=True, location="europe-central2")
Impact on your work
We deploy Gemini agents on Vertex AI in a specific region. Without overriding _live_api_client, all Live API connections default to us-central1. We had to discover this private property by reading source code — it's not discoverable from the public API.
Willingness to contribute
Yes, happy to submit a PR if the change direction is approved.
🟡 Recommended Information
Describe Alternatives You've Considered
- Overriding
api_client only: doesn't work, Live API uses _live_api_client, not api_client.
- Setting
location via http_options on the model config: ADK doesn't expose a field for this on Live API connections.
Proposed API / Implementation
In google_llm.py:
- Rename
_live_api_client → live_api_client (both the @cached_property and its usage in connect()).
- Add the docstring section shown above.
- Keep
_live_api_client as a deprecated alias pointing to live_api_client for backward compatibility.
Additional Context
The api_client property already follows this public-override pattern successfully. The _live_api_client property was introduced later (for the Live API code path) but its usage pattern is identical — subclasses need to override it — yet it was mistakenly made private.
🔴 Required Information
Is your feature request related to a specific problem?
The
Geminiclass has a private_live_api_clientproperty (leading underscore) that subclasses must override to customize thegenai.Clientused for Live API connections. This is contradictory — Python convention treats_-prefixed names as implementation details not intended for external override, yet Live API customization requires it.The existing docstring documents how to override
api_clientfor non-Live usage, but there's no public equivalent for Live API.Describe the Solution You'd Like
Rename
_live_api_clienttolive_api_client(remove leading underscore) and update the docstring to document the override pattern, similar to the existingapi_clientexample:Update the class docstring to include something like:
Impact on your work
We deploy Gemini agents on Vertex AI in a specific region. Without overriding
_live_api_client, all Live API connections default tous-central1. We had to discover this private property by reading source code — it's not discoverable from the public API.Willingness to contribute
Yes, happy to submit a PR if the change direction is approved.
🟡 Recommended Information
Describe Alternatives You've Considered
api_clientonly: doesn't work, Live API uses_live_api_client, notapi_client.locationviahttp_optionson the model config: ADK doesn't expose a field for this on Live API connections.Proposed API / Implementation
In
google_llm.py:_live_api_client→live_api_client(both the@cached_propertyand its usage inconnect())._live_api_clientas a deprecated alias pointing tolive_api_clientfor backward compatibility.Additional Context
The
api_clientproperty already follows this public-override pattern successfully. The_live_api_clientproperty was introduced later (for the Live API code path) but its usage pattern is identical — subclasses need to override it — yet it was mistakenly made private.