llmage/models/llm.json
yumoqing d6e4221a7b feat: add model publish/unpublish (上架/下架) functionality
- llm table: add status field (published/unpublished, default unpublished)
- User-facing queries: filter by status='published' in 11 query points:
  - utils.py: get_llms_by_catelog_to_customer, get_llms_by_catelog,
    get_llm, get_llmproviders, get_llms_sort_by_provider
  - v1 endpoints: chat/completions, image/generations, video/generations
  - user pages: t2t, get_type_llms, list_catelog_models,
    list_paging_catelog_llms, llmcheck
- CRUD: status column visible/editable with select dropdown
- Admin CRUD list shows ALL models regardless of status
- Migration SQL: sql/add_status_field.sql (existing models set to published)
2026-05-28 23:42:29 +08:00

113 lines
2.5 KiB
JSON

{
"summary": [
{
"name": "llm",
"title": "大语言模型",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32
},
{
"name": "name",
"title": "名称",
"type": "str",
"length": 100
},
{
"name": "model",
"title": "识别名",
"type": "str",
"length": 100
},
{
"name": "description",
"title": "说明",
"type": "text",
"length": 500
},
{
"name": "iconid",
"title": "图标id",
"type": "str",
"length": 32
},
{
"name": "upappid",
"title": "上位系统id",
"type": "str",
"length": 32
},
{
"name": "providerid",
"title": "供应商id",
"type": "str",
"length": 32
},
{
"name": "ownerid",
"title": "所属机构id",
"type": "str",
"length": 32
},
{
"name": "enabled_date",
"title": "启用日期",
"type": "date"
},
{
"name": "expired_date",
"title": "失效日期",
"type": "date"
},
{
"name": "min_balance",
"title": "最低余额",
"type": "float",
"length": 20,
"default": 10,
"dec": 2
},
{
"name": "status",
"title": "上架状态",
"type": "str",
"length": 16,
"nullable": "no",
"default": "unpublished"
}
],
"codes": [
{
"field": "providerid",
"table": "organization",
"valuefield": "id",
"textfield": "orgname"
},
{
"field": "iconid",
"table": "svgicon",
"valuefield": "id",
"textfield": "id"
},
{
"field": "upappid",
"table": "upapp",
"valuefield": "id",
"textfield": "name"
},
{
"field": "ownerid",
"table": "organization",
"valuefield": "id",
"textfield": "orgname"
}
]
}