Skip to content

Self-hosted AI workspace.

Python

fix(memory): exempt audits from request timeout (#3886)

Josh Patra848701a4e2eb
diff --git a/app.py b/app.py
index 9e48bb511..8d84a1940 100644
--- a/app.py
+++ b/app.py
@@ -167,6 +167,7 @@ _TIMEOUT_EXEMPT_PREFIXES = (
"/api/cookbook/setup", # remote pacman/apt installs
"/api/upload", # large files
"/api/image", # diffusion proxies (inpaint/harmonize/upscale/etc.) — own 120s httpx timeout
+ "/api/memory/audit", # retains own 120s LLM inactivity timeout
)
diff --git a/tests/test_memory_audit_timeout.py b/tests/test_memory_audit_timeout.py
new file mode 100644
index 000000000..10158f34f
--- /dev/null
+++ b/tests/test_memory_audit_timeout.py
@@ -0,0 +1,10 @@
+from pathlib import Path
+
+
+def test_memory_audit_uses_its_own_llm_timeout():
+ source = Path("app.py").read_text()
+ start = source.index("_TIMEOUT_EXEMPT_PREFIXES =")
+ end = source.index("\n)\n", start)
+ timeout_exemptions = source[start:end]
+
+ assert '"/api/memory/audit"' in timeout_exemptions