Add Agent capabilities and configurations across the application

- Extend the AssistantConfig model to include agent_interface_type, agent_values, and agent_secrets for enhanced agent management.
- Update ModelType to include "Agent" for broader capability support.
- Seed new agent models and configurations in the database for Dify, FastGPT, and OpenCode applications.
- Modify the Assistant routes to validate and handle agent capabilities.
- Implement agent resource resolution in the config resolver for runtime configuration.
- Enhance the interface catalog with agent-specific fields and definitions.
- Update frontend components to manage agent configurations, including form handling and state management for agent-related inputs.
This commit is contained in:
Xin Wang
2026-07-09 15:29:25 +08:00
parent 03478fa557
commit 54329aa516
11 changed files with 238 additions and 114 deletions

View File

@@ -34,6 +34,10 @@ OPENAI_COMMON = [
field("apiUrl", "API URL", type_="url", required=True),
field("apiKey", "API Key", group="secrets", type_="password", required=True),
]
AGENT_COMMON = [
field("apiUrl", "API URL", type_="url", required=True),
field("apiKey", "API Key", group="secrets", type_="password", required=True),
]
XFYUN_AUTH = [
field("apiUrl", "WebSocket URL", type_="url", required=True),
field("appId", "App ID", group="secrets", type_="password", required=True),
@@ -78,6 +82,24 @@ INTERFACE_DEFINITIONS: list[dict] = [
"capability": "Realtime",
"fields": OPENAI_COMMON + [field("voice", "Voice")],
},
{
"interface_type": "dify",
"name": "Dify Agent",
"capability": "Agent",
"fields": AGENT_COMMON,
},
{
"interface_type": "fastgpt",
"name": "FastGPT Agent",
"capability": "Agent",
"fields": AGENT_COMMON + [field("appId", "App ID", required=True)],
},
{
"interface_type": "opencode",
"name": "OpenCode Agent",
"capability": "Agent",
"fields": AGENT_COMMON,
},
{
"interface_type": "stepfun-realtime",
"name": "StepFun StepAudio Realtime",