Set up no agent run for a request with no token or API key

The answer routes refuse such a request with 401, but only after building
the agent, so a public agent's prompt tools were pre-fetched, and their
actions run, for nobody. Anonymous chat without an agent key is not
supported, so the processor now stops before any setup and the route
answers 401 as before.
This commit is contained in:
arc53-machine committed 2026-09-29 15:46:32 +01:00
1 parent daf6af57ae
commit 029189fe0c
3 files changed
+66

No files matched your search

@@ -22,6 +22,7 @@ def _processor() -> StreamProcessor:
sp.agent_config = {}
sp.retriever_config = {"retriever_name": "classic", "chunks": 2, "doc_token_limit": 50000}
sp.data = {}
sp.decoded_token = {"sub": "u"}
return sp