- 8张llm_前缀表(手写幂等DDL): vendor/account/model/api_profile/org_policy/org_quota/user_quota/usage - gateway.py 门禁链: 限流→限额→策略选模型(主备容错)→账号×端点轮转(偏好过滤+余额加权+冷却避让)→预授权-结算 - api_key AES单层加密(非RC4,盐不对称不可解); 限流Redis分钟窗口(db4) fail-open - 双维度记账: 一次调用同行记cost(账号侧)+charge(组织池侧); 充值=recharge行 - CRUD+index.ui 8卡片导航+总览; appcodes字典5组; 设计规范+30测试用例 - 策略即开关: 机构无策略→__LEGACY__走旧llm表(向后兼容零改动)
272 lines
14 KiB
XML
272 lines
14 KiB
XML
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"width": "100%",
|
||
"height": "100%",
|
||
"padding": "0"
|
||
},
|
||
"subwidgets": [
|
||
{
|
||
"widgettype": "HBox",
|
||
"options": {
|
||
"width": "100%",
|
||
"alignItems": "center",
|
||
"marginBottom": "24px"
|
||
},
|
||
"subwidgets": [
|
||
{
|
||
"widgettype": "Title2",
|
||
"options": {
|
||
"text": "模型治理"
|
||
}
|
||
},
|
||
{
|
||
"widgettype": "Filler"
|
||
},
|
||
{
|
||
"widgettype": "Text",
|
||
"options": {
|
||
"text": "供应商/账号/模型 · 容错策略 · 限额限流 · 双维度记账",
|
||
"cfontsize": 1.2
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "urlwidget",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/api/llm_dashboard_widget.dspy')}}"
|
||
}
|
||
},
|
||
{
|
||
"widgettype": "VScrollPanel",
|
||
"options": {
|
||
"css": "filler"
|
||
},
|
||
"subwidgets": [
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"spacing": 24
|
||
},
|
||
"subwidgets": [
|
||
{
|
||
"widgettype": "ResponsableBox",
|
||
"options": {
|
||
"gap": "16px",
|
||
"minWidth": "300px"
|
||
},
|
||
"subwidgets": [
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_vendor')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "供应商与端点", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "供应商协议 + 全球端点目录(国内/国际,配置一次全账号共用)", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_account')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "供应商账号(钱包)", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "多账号独立充值记账、选用端点;轮转突破供应商限流", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_model')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "模型注册", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "能力分类(t2t/…)、挂定价项目(ppid)、成本/售价", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_api_profile')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "适配模板", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "协议×能力形态的请求/响应模板(按形态去重,不按模型开)", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_org_policy')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "组织容错策略", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "组织级主模型 + 备模型链 + 端点偏好(prefer/must)", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_org_quota')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "组织限额限流", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "组织池充值/余额 + 组织 QPM 上限", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_user_quota')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "个人限额限流", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "个人额度上限 + 个人 QPM(共享组织池模式)", "cfontsize": 1.2}}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"options": {
|
||
"css": "card",
|
||
"cwidth": 25,
|
||
"padding": "16px",
|
||
"cursor": "pointer"
|
||
},
|
||
"binds": [
|
||
{
|
||
"wid": "self",
|
||
"event": "click",
|
||
"actiontype": "urlwidget",
|
||
"target": "app.llm_content",
|
||
"options": {
|
||
"url": "{{entire_url('/pipeline-llm/llm_usage')}}"
|
||
},
|
||
"mode": "replace"
|
||
}
|
||
],
|
||
"subwidgets": [
|
||
{"widgettype": "Title4", "options": {"text": "用量流水", "marginBottom": "8px"}},
|
||
{"widgettype": "Text", "options": {"text": "双维度记账:成本侧(账号)+ 消费侧(组织/个人)", "cfontsize": 1.2}}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"widgettype": "VBox",
|
||
"id": "llm_content"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|