You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
fix: VertexSessionService with adding base_url override to base api override without removing initialized http_options
PiperOrigin-RevId: 813319796
This commit is contained in:
committed by
Copybara-Service
parent
8f3ca0359e
commit
c51ea0b52e
@@ -376,14 +376,16 @@ class VertexAiSessionService(BaseSessionService):
|
||||
|
||||
It needs to be instantiated inside each request so that the event loop
|
||||
management can be properly propagated.
|
||||
"""
|
||||
api_client = genai.client.BaseApiClient(
|
||||
vertexai=True, project=self._project, location=self._location
|
||||
)
|
||||
|
||||
if new_options := self._api_client_http_options_override():
|
||||
api_client._http_options = new_options
|
||||
return api_client
|
||||
Returns:
|
||||
An API client for the given project and location.
|
||||
"""
|
||||
return genai.client.BaseApiClient(
|
||||
vertexai=True,
|
||||
project=self._project,
|
||||
location=self._location,
|
||||
http_options=self._api_client_http_options_override(),
|
||||
)
|
||||
|
||||
|
||||
def _is_vertex_express_mode(
|
||||
|
||||
Reference in New Issue
Block a user