Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[pytest]
markers =
live: real end-to-end tests that hit live integrations and the real LLM (opt-in: `pytest -m live`)
testpaths =
tests

# By default, skip live tests so plain `pytest` stays fast and offline.
addopts = -m "not live"
7 changes: 6 additions & 1 deletion tests/test_trigger_router_and_parking.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ def __init__(self, response: str):
self.response = response
self.calls = 0

async def generate_response_async(self, system_prompt: str, user_prompt: str):
async def generate_response_async(
self, system_prompt: str, user_prompt: str, prompt_name=None, **_kwargs
):
self.calls += 1
self.last_system_prompt = system_prompt
self.last_prompt = user_prompt
self.last_prompt_name = prompt_name
return self.response


Expand All @@ -39,6 +43,7 @@ def test_route_to_existing_session(self):
router = SessionRouter(llm, ROUTING_PROMPT)
result = run(router.route("message", "continue that task", "sessions"))
assert result["session_id"] == "abc123"
assert llm.last_prompt_name == "ROUTE_TO_SESSION"
assert llm.calls == 1

def test_new_session_decision(self):
Expand Down