Summary
After upgrading to ADK v1.23.0, get_fast_api_app() fails when session_service_uri uses sqlite:// and session_db_kwargs is provided.
Steps to reproduce
from google.adk.cli.fast_api import get_fast_api_app
app = get_fast_api_app(
agents_dir="foo",
session_service_uri="sqlite:///./session.db",
session_db_kwargs={"pool_size": 10},
web=False,
)
Actual behavior
Traceback (most recent call last):
File "/.../google-adk-python/script.py", line 3, in <module>
app = get_fast_api_app(
agents_dir="foo",
...<2 lines>...
web=False,
)
File "/.../google-adk-python/src/google/adk/cli/fast_api.py", line 122, in get_fast_api_app
session_service = create_session_service_from_options(
base_dir=agents_dir,
...<2 lines>...
use_local_storage=use_local_storage,
)
File "/.../google-adk-python/src/google/adk/cli/utils/service_factory.py", line 193, in create_session_service_from_options
service = registry.create_session_service(session_service_uri, **kwargs)
File "/.../google-adk-python/src/google/adk/cli/service_registry.py", line 132, in create_session_service
return self._session_factories[scheme](uri, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/.../google-adk-python/src/google/adk/cli/service_registry.py", line 255, in sqlite_session_factory
return SqliteSessionService(db_path=db_path, **kwargs_copy)
TypeError: SqliteSessionService.__init__() got an unexpected keyword argument 'pool_size'
Expected behavior
No error
Environment
- ADK version: 1.23.0
- Python: 3.13.8
- OS: macOS
Additional context
SqliteSessionService only accepts db_path, but the sqlite session factory passes **kwargs.
Summary
After upgrading to ADK v1.23.0,
get_fast_api_app()fails whensession_service_uriusessqlite://andsession_db_kwargsis provided.Steps to reproduce
Actual behavior
Expected behavior
No error
Environment
Additional context
SqliteSessionServiceonly acceptsdb_path, but the sqlite session factory passes**kwargs.