fix(tasks): keep scheduled-task prompt cache stable

Move scheduled-task current-time context out of the system prompt and into a user-role context message so the system prompt remains stable for prompt caching. Preserve time grounding on both the agent-loop path and fallback direct-call path, with focused regression coverage.
This commit is contained in:
hestiaOS
2026-06-28 01:05:02 +02:00
committed by GitHub
parent 259662e914
commit 8b110c28e6
4 changed files with 224 additions and 20 deletions
+2 -1
View File
@@ -111,7 +111,8 @@ async def test_scheduled_task_honors_global_disabled_tools(monkeypatch):
captured = {}
async def _capture(endpoint_url, model, task, session_id, *,
system_prompt=None, disabled_tools=None, relevant_tools=None):
system_prompt=None, disabled_tools=None, relevant_tools=None,
datetime_context_msg=None):
captured["disabled_tools"] = disabled_tools
captured["relevant_tools"] = relevant_tools
return "done"