feat: improve workflow run observability

This commit is contained in:
2026-06-22 09:06:17 +08:00
parent 844e932930
commit 76ea0b9cde
4 changed files with 182 additions and 36 deletions
@@ -437,11 +437,6 @@ async def publish_agent(agent_id: str, db: AsyncSession = Depends(get_db)):
raise HTTPException(status_code=400, detail="模型不存在")
if not model.is_active:
raise HTTPException(status_code=400, detail="模型已禁用")
elif not await _resolve_default_chat_model_id(db):
raise HTTPException(
status_code=400,
detail="请先在模型配置中启用一个 chat 模型,或为智能体指定模型",
)
elif agent.mode == "dialog_flow":
if not agent.workflow_id:
raise HTTPException(status_code=400, detail="对话流模式需要配置工作流")