graph TD
UI[控制台 / UI]
UI --> APIGW[API 网关 & 认证层]

subgraph 核心功能模块
APIGW --> Abstraction[统一抽象接口层]
APIGW --> Adapter[多云模型适配器层]
APIGW --> Orchestration[部署编排模块<br>Helm / Operator]
APIGW --> Scheduler[资源调度模块]
APIGW --> AsyncQueue[异步任务队列<br>Celery / KEDA]
APIGW --> ConfigCenter[统一配置中心<br>Apollo / Nacos]
APIGW --> Auth[权限与认证<br>OAuth2 / RBAC / SSO]
end

subgraph 运维与可观测
Orchestration --> HealthProbe[健康探针 & 回滚逻辑]
Scheduler --> AutoScaling[Pod 弹性伸缩 & 节点隔离]
AsyncQueue --> LogArchiver[日志归档任务 / 审计导出]

APIGW --> Monitor[监控告警模块<br>Prometheus + Grafana]
APIGW --> Trace[分布式追踪<br>Jaeger + OpenTelemetry]
APIGW --> LogAudit[日志审计模块<br>ELK]
end

subgraph 模型服务层
Abstraction --> ModelCluster[本地 / 多云模型服务集群]
Adapter --> ModelAPI[供应商 API 调用<br>OpenAI, Baichuan...]
end

subgraph DevOps & 安全
GitRepo[Git 仓库<br>IaC + GitOps]
GitRepo --> CI_CD[CI/CD 管道<br>ArgoCD, Jenkins]
CI_CD --> ConfigCenter
CI_CD --> Orchestration
ConfigCenter --> Monitor
Auth --> AuditExport[审计报告导出]
end

Monitor --> AlertSys[告警系统<br>短信 / 邮件 / WebHook]
Trace --> Dashboard[追踪仪表盘]
LogAudit --> KibanaUI[Kibana 分析界面]

subgraph HA 架构
ModelCluster --> ServiceMesh[服务网格<br>Istio / Envoy]
ServiceMesh --> MultiAZ[多 AZ 支持 + 弹性负载]
MultiAZ --> Failover[故障自动切换]
end

subgraph PluginRuntime[插件生态与沙箱]
APIGW --> PluginEngine[插件运行时引擎<br>WASM / Lua Sandbox]
PluginEngine --> PluginStore[插件市场 / SDK 插件]
end
