mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 06:12:40 +02:00
fix(test): pin enable_kb_planner_runnable=false for KB-search planner tests
This commit is contained in:
parent
5119915f4f
commit
6c4ede5f9a
1 changed files with 9 additions and 0 deletions
|
|
@ -202,6 +202,15 @@ class FakeBudgetLLM:
|
|||
|
||||
|
||||
class TestKnowledgeBaseSearchMiddlewarePlanner:
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_planner_runnable(self, monkeypatch):
|
||||
# ``FakeLLM`` is a duck-typed mock; ``create_agent`` (used when the
|
||||
# planner Runnable path is enabled) calls ``.bind()`` on the LLM,
|
||||
# which the mock does not implement. Pin the flag off so the
|
||||
# planner falls through to the legacy ``self.llm.ainvoke`` path
|
||||
# these tests assert against (``llm.calls[0]["config"]``).
|
||||
monkeypatch.setenv("SURFSENSE_ENABLE_KB_PLANNER_RUNNABLE", "false")
|
||||
|
||||
def test_render_recent_conversation_prefers_latest_messages_under_budget(self):
|
||||
messages = [
|
||||
HumanMessage(content="old user context " * 40),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue