容量管理: zones.rs 直读 nginx file_cache 共享内存记账(双轴: 磁盘 + keys_zone 索引内存), ?scan=1 扫盘上限 20 万文件; POST /api/admin/cache/purge 整区清理(只删文件不删目录, 根治 [crit] mkdir failed); POST /api/admin/cache/invalidate 按制品精准失效(预览->确认两步式, glob/子串, 删除上限 5000/扫描上限 20 万); GET /api/admin/cache 新增 capacity 块; 前端容量面板 + 按制品失效工具条; 测试 test-cache-capacity.sh 48/48(容量 27 + 精准失效 21, 含 EXPECT_MIN 护栏与前端静态契约); docs 容量管理章节
35 lines
1.1 KiB
JSON
35 lines
1.1 KiB
JSON
{
|
|
"openai": {
|
|
"base": "http://127.0.0.1:18999",
|
|
"models": ["gpt-4o", "gpt-4o-mini"],
|
|
"auth": "Bearer sk-UPSTREAM-REAL-SECRET",
|
|
"enabled": true,
|
|
"note": "本地靶机;auth 是占位值,不是真密钥",
|
|
"created_at": 1757500000
|
|
},
|
|
"other": {
|
|
"base": "http://127.0.0.1:18999/llm",
|
|
"models": ["claude-3-5-sonnet"],
|
|
"auth": "Bearer sk-OTHER-UPSTREAM",
|
|
"enabled": true,
|
|
"note": "不在 alice 白名单内;base 带路径,用于验证路径拼接与模型发现过滤",
|
|
"created_at": 1757500000
|
|
},
|
|
"downstream": {
|
|
"base": "http://127.0.0.1:18999",
|
|
"models": ["should-not-appear"],
|
|
"auth": "",
|
|
"enabled": false,
|
|
"note": "已停用,用于验证「停用即从共享内存摘除」→ 404,且其模型不应出现在模型发现里",
|
|
"created_at": 1757500000
|
|
},
|
|
"deepseeklike": {
|
|
"base": "http://127.0.0.1:18999/v1",
|
|
"models": ["ds-chat"],
|
|
"auth": "Bearer sk-DS-REAL",
|
|
"enabled": true,
|
|
"note": "base 自带 /v1(厂商文档的常见写法),用于验证版本段不重复拼接",
|
|
"created_at": 1757500000
|
|
}
|
|
}
|