mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-17 13:05:58 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user