fix: add MCP tools cache reset endpoint (#3602)

* fix: add MCP tools cache reset endpoint

* docs: clarify MCP cache reset scope
This commit is contained in:
Huixin615
2026-06-16 23:20:20 +08:00
committed by GitHub
parent 0966131b31
commit 1896722e66
6 changed files with 137 additions and 8 deletions
+10
View File
@@ -33,6 +33,7 @@ def test_public_paths(path: str):
[
"/api/models",
"/api/mcp/config",
"/api/mcp/cache/reset",
"/api/memory",
"/api/skills",
"/api/threads/123",
@@ -149,6 +150,10 @@ def _make_app():
async def mcp_put():
return {"ok": True}
@app.post("/api/mcp/cache/reset")
async def mcp_cache_reset():
return {"ok": True}
@app.delete("/api/threads/abc")
async def thread_delete():
return {"ok": True}
@@ -360,6 +365,11 @@ def test_protected_post_no_cookie_returns_401(client):
assert res.status_code == 401
def test_mcp_cache_reset_post_no_cookie_returns_401(client):
res = client.post("/api/mcp/cache/reset")
assert res.status_code == 401
def test_protected_post_with_internal_auth_header_passes():
from app.gateway.internal_auth import create_internal_auth_headers