M4b:ai_provider 删除手术①-⑥——神识全面接管模型出口
- ① 后端删除 app/ai_provider/(38 文件,含 anthropic/openai 格式、billing、audio、embedding)、services/ai_provider_admin.py、core/config/model_config.py、tests/ai_provider/(21 文件) - ② 连带退役 application/agent/(旧 Agent 循环/steer/follow-up/确认注册表)、application/skill_executor.py、app/skills/(python skills 孤儿)、endpoints/audio.py、application/imports.py(ProviderManager 消费方);settings 端点收敛为生成偏好 - ③ runs.py 修剪:AgentRunRegistry/steer/follow-up/confirmations 端点退役,保留 list/get/events/cancel/stream;safety 确认改为直接落库裁决(pending→approved/denied) - ④ 前端删除:models 页、ModelGatewayView、gateway.ts、GatewayPanel(玄关)、ModelGatewayPanel/ModelStrategyForm、audio.ts/useVoiceInput、网关类型与 mock;设置页收敛为外观/语言/通知 - ⑤ 配置收敛:config/models|providers|pricing.example.yaml 归档 shenshi/config/;.env.example 删 provider keys/MODEL_ENDPOINT_POOL/MODEL_CONFIG_PATH,收敛 SHENSHI_* - ⑥ 验收:rg 审计灵台 Provider SDK import 与 ai_provider 引用归零;后端 528 passed(2 个预存失败经 HEAD 复跑验证与本手术无关)、前端 type-check+201 passed、神识 go vet+test、BFF 4 passed
This commit is contained in:
1 parent
0d383725b5
commit
462d570751
129 files changed
+81
-15867
No files matched your search
+1
-14
@@ -1,30 +1,17 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
/** 玄关网关地址(Go MCP 网关,默认 8080)。 */
|
||||
const GATEWAY_URL =
|
||||
process.env.GATEWAY_URL ??
|
||||
process.env.NEXT_PUBLIC_GATEWAY_URL ??
|
||||
"http://localhost:8080";
|
||||
|
||||
module.exports = {
|
||||
allowedDevOrigins: ["192.168.1.5"],
|
||||
};
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/**
|
||||
* 仅 /api/gateway/* 代理到 Go 玄关网关(MCP)。
|
||||
*
|
||||
* 业务 REST / SSE / 认证请求统一经 BFF 路由(/api/proxy、/api/sse、/api/auth),
|
||||
* 在服务端从 httpOnly cookie 读取 token 并注入 Authorization,不再经 rewrites。
|
||||
* 后端绝对地址由 BFF route 通过 lib/config 的 API_BASE_URL 解析。
|
||||
*/
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: "/api/gateway/:path*",
|
||||
destination: `${GATEWAY_URL}/:path*`,
|
||||
},
|
||||
];
|
||||
return [];
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user