feat: add compact toolbox and public wiki vector search

This commit is contained in:
吉鑫升 committed 2026-08-26 14:40:57 +08:00
1 parent 9f29ecae9e
commit d35d075669
29 files changed
+757 -128

No files matched your search

@@ -24,8 +24,9 @@ from app.gateway.auth.disabled_mode import is_auth_disabled # noqa: E402
from app.gateway.auth_middleware import AuthMiddleware
from app.gateway.config import get_gateway_config
from app.gateway.csrf_middleware import CSRFMiddleware
from app.gateway.deps import langgraph_runtime
from app.gateway.routers import (
from app.gateway.deps import langgraph_runtime
from app.gateway.public_knowledge_cors import PublicKnowledgeCORSMiddleware
from app.gateway.routers import (
ai_writing,
admin_active_runs,
admin_users,
@@ -66,8 +67,9 @@ from app.gateway.routers import (
positions,
position_roles,
public_config,
public_embed,
public_leaderboard,
public_embed,
public_knowledge_vector_search,
public_leaderboard,
public_scheduled_tasks,
recommend,
flow_extract,
@@ -1473,11 +1475,16 @@ This gateway provides custom endpoints for models, MCP configuration, skills, an
"Set GATEWAY_CORS_ORIGINS or GATEWAY_CORS_ALLOW_ALL for deployment.",
", ".join(dev_origins),
)
app.add_middleware(
CORSMiddleware,
allow_origins=dev_origins,
**cors_kwargs,
)
app.add_middleware(
CORSMiddleware,
allow_origins=dev_origins,
**cors_kwargs,
)
# This one anonymous API is intentionally callable by browser code from
# every origin. Keep the override route-scoped so authenticated APIs retain
# the deployment's normal CORS allow-list.
app.add_middleware(PublicKnowledgeCORSMiddleware)
# Include routers
# Models API is mounted at /api/models
@@ -1626,8 +1633,11 @@ This gateway provides custom endpoints for models, MCP configuration, skills, an
app.include_router(public_config.router)
app.include_router(html_page_favorites.router)
# Product knowledge base API is mounted at /api/knowledge
app.include_router(knowledge.router)
# Product knowledge base API is mounted at /api/knowledge
app.include_router(knowledge.router)
# Anonymous, section-level vector search over every published Wiki base
# except the system conversation-deposit base.
app.include_router(public_knowledge_vector_search.router)
# External knowledge ingest (publish md artifacts) at /api/knowledge-ingest
app.include_router(knowledge_ingest.router)