Summary
packages/bub-tapestore-sqlite currently depends on the private helper bub.builtin.agent._build_llm inside SQLiteTapeStore.__init__. Latest bub main no longer exports that module-level helper, so constructing the SQLite tape store fails before any tape operation can run.
Observed with bub main at a0976a4646eba21253ab439fb0f42ece2a3def92 (0.3.10.dev2+ga0976a464).
Reproduction
From bub-contrib:
uv run --isolated \
--with 'bub @ git+https://github.com/bubbuild/bub.git@main' \
--with pytest \
--with pytest-asyncio \
--with-editable packages/bub-tapestore-sqlite \
pytest packages/bub-tapestore-sqlite/tests -q
Actual result
15 sqlite tapestore tests fail. The common failure is:
ImportError: cannot import name '_build_llm' from 'bub.builtin.agent'
The failure is triggered by:
from bub.builtin.agent import _build_llm
in packages/bub-tapestore-sqlite/src/bub_tapestore_sqlite/store.py.
Expected result
The SQLite tape store should work against the latest supported bub without depending on a private agent helper. Non-semantic SQLite usage should not need to construct any LLM client at store initialization time.
Suggested fix
Decouple SQLite embedding support from bub.builtin.agent._build_llm:
- remove the
_build_llm call from SQLiteTapeStore.__init__
- lazily build an embedding client only when semantic query support is used
- construct that client via public
any_llm.AnyLLM.create(...)
- source provider-specific config from
bub.ensure_config(AgentSettings) and support both existing settings fields and the newer AgentSettings.model_client_kwargs(...) path
- update tests to mock the SQLite package embedding-client builder instead of
bub.builtin.agent._build_llm
I have a local patch following this approach, and it passes:
19 passed - workspace deps
19 passed - isolated bub==0.3.9
19 passed - isolated bub@main
Summary
packages/bub-tapestore-sqlitecurrently depends on the private helperbub.builtin.agent._build_llminsideSQLiteTapeStore.__init__. Latestbubmain no longer exports that module-level helper, so constructing the SQLite tape store fails before any tape operation can run.Observed with
bubmain ata0976a4646eba21253ab439fb0f42ece2a3def92(0.3.10.dev2+ga0976a464).Reproduction
From
bub-contrib:uv run --isolated \ --with 'bub @ git+https://github.com/bubbuild/bub.git@main' \ --with pytest \ --with pytest-asyncio \ --with-editable packages/bub-tapestore-sqlite \ pytest packages/bub-tapestore-sqlite/tests -qActual result
15 sqlite tapestore tests fail. The common failure is:
The failure is triggered by:
in
packages/bub-tapestore-sqlite/src/bub_tapestore_sqlite/store.py.Expected result
The SQLite tape store should work against the latest supported
bubwithout depending on a private agent helper. Non-semantic SQLite usage should not need to construct any LLM client at store initialization time.Suggested fix
Decouple SQLite embedding support from
bub.builtin.agent._build_llm:_build_llmcall fromSQLiteTapeStore.__init__any_llm.AnyLLM.create(...)bub.ensure_config(AgentSettings)and support both existing settings fields and the newerAgentSettings.model_client_kwargs(...)pathbub.builtin.agent._build_llmI have a local patch following this approach, and it passes: