feat[Go]: port agent webhook trigger, agent file upload/download, component input-form + debug endpoints from Python (#16403)

port agent webhook trigger, agent file upload/download, component
input-form + debug endpoints from Python
- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Zhichang Yu
2026-06-27 14:07:22 +08:00
committed by yzc
parent f58fae5fb7
commit 477f2fcebd
26 changed files with 4530 additions and 188 deletions

View File

@@ -21,7 +21,7 @@ RESTful API migration. Each deprecated route forwards to the corresponding
new API implementation.
Deprecated APIs and their replacements:
- POST /api/v1/agents/{agent_id}/completions -> POST /api/v1/agents/chat/completion
- POST /api/v1/agents/{agent_id}/completions -> POST /api/v1/agents/chat/completions
- POST /api/v1/agents_openai/{agent_id}/chat/completions -> POST /api/v1/agents/chat/completions
- POST /api/v1/chats/{chat_id}/completions -> POST /api/v1/chat/completions
- POST /api/v1/chats_openai/{chat_id}/chat/completions -> POST /api/v1/openai/{chat_id}/chat/completions

View File

@@ -1207,7 +1207,10 @@ async def test_db_connection():
return server_error_response(exc)
@manager.route("/agents/chat/completion", methods=["POST"]) # noqa: F821
# NOTE: The singular form `/agents/chat/completion` was a historical typo
# in earlier releases — no client, SDK, or doc ever used it, and the
# plural form below is the canonical route. The singular is intentionally
# NOT registered; clients sending it receive 404.
@manager.route("/agents/chat/completions", methods=["POST"]) # noqa: F821
@login_required
@add_tenant_id_to_kwargs