354f556099
feat: 新增 llm_metrics 和 user_llm_policy 两张表
...
llm_metrics: 从 llmusage 抽取的轻量指标表
- userid, llmid, use_date, input/output/total tokens
- amount, responsed_seconds, finish_seconds
user_llm_policy: 用户模型策略(customer.admin 管理)
- 每个用户每个模型可单独设限
- daily/monthly_call_limit, spending_alert/ceiling, max_concurrency
- 缺省空=不限
- orgid+userid+llmid 唯一约束
菜单新增: 用户模型策略、模型使用指标
2026-07-02 13:16:18 +08:00
99b292fd17
Revert "feat: 复制API功能-工具栏按钮+弹窗选源/目标+后台复制"
...
This reverts commit d57b8dbc73f3ee1797586e84fafe83793e112859.
2026-07-01 15:28:22 +08:00
d57b8dbc73
feat: 复制API功能-工具栏按钮+弹窗选源/目标+后台复制
2026-07-01 15:02:33 +08:00
0dd5a67a2a
bugfix
2026-07-01 13:18:37 +08:00
d58b86a704
优化 llmusage CRUD 查询性能
...
- 新建 api/llmusage_list.dspy 替代自动生成的 get_llmusage.dspy
- 排除 usages/ioinfo 大 TEXT 字段过滤,避免 LIKE 全表扫描
- 分离 count/data 查询,避免 sqlPaging 子查询包装
- 更新 json/llmusage.json get_data_url 指向新脚本
- 更新 scripts/load_path.py 注册新路径
2026-06-26 18:48:28 +08:00
6c2ccda2c7
修复llmusage展示脚本500错误并优化CRUD性能
...
- 将llmusage_ioinfo_display.ui和llmusage_usages_display.ui从Jinja模板改为.dspy脚本
- 在utils.py中添加get_llmusage_by_id和read_ioinfo_content两个函数
- 重写get_llmusage.dspy,避免sqlPaging子查询包装,分离count和data查询
- 为llmusage表添加use_time索引提升排序性能
- 更新load_path.py和json/llmusage.json引用新的.dspy文件
2026-06-26 17:55:52 +08:00
ysh
c613e8c85d
fix: 记账失败列表显示模型/用户/机构名称而非ID
...
- 为 llmid/userid/userorgid 的 alters 添加 uitype: code
- Tabular 现在使用 textField 显示可读名称
- 同步更新 CRUD 源配置 json/llmusage_accounting_failed.json
2026-06-26 16:32:27 +08:00
c2c0f93001
llmage: hide usages/ioinfo columns, add toolbar buttons with popup windows
2026-06-26 11:30:05 +08:00
9b84e4c664
fix: 更新记账失败记录CRUD配置添加alters字段映射
2026-06-25 15:28:59 +08:00
Hermes Agent
6bcacaf94a
fix: 记账失败原因toolbar-params改为URL传参避免xls2crud序列化错误
2026-06-18 12:00:00 +08:00
Hermes Agent
88d2fd2c86
llmage: 记账失败记录-原因改为toolbar按钮弹窗显示
2026-06-18 11:55:08 +08:00
Hermes Agent
1aa28430e0
refactor: appcodes编码改用models codes段定义,清理json alters
2026-06-17 19:09:51 +08:00
Hermes Agent
2e2fa36896
fix: query_apiname双问号修复+isdefaultcatelog改硬编码
2026-06-17 18:42:48 +08:00
Hermes Agent
eaf440a6a9
feat: 添加llmage编码字典init/data.json,CRUD alters改用appcodes数据源
2026-06-17 18:04:44 +08:00
34627054b1
feat: code-type fields use fieldname/fieldname_text format
...
- get_search_providerid.dspy: return {providerid, providerid_text}
- get_search_upappid.dspy: return {upappid, upappid_text}
- get_search_apiname.dspy: return {apiname, apiname_text}
- json/llm.json: add valueField/textField for providerid, upappid
- json/llm_api_map.json: add valueField/textField for apiname, query_apiname
This ensures filter form and add/edit form use the same data format.
2026-06-12 11:40:54 +08:00
1096e85720
bugfix
2026-06-10 16:17:25 +08:00
ca1abb008a
bugfix
2026-06-09 13:53:14 +08:00
dfb0794ee2
bugfix
2026-06-09 13:51:41 +08:00
08a409c00f
fix: add llmid parameter to apiname/query_apiname dataurl
2026-06-05 18:30:42 +08:00
a1c3eb4b25
feat: apiname/query_apiname改为从uapi动态选择
...
- 新增 get_search_apiname.dspy: 根据llmid查upappid, 从uapi获取API列表
- apiname: code类型下拉选择(必选)
- query_apiname: code类型下拉选择(可选, 含'不指定'选项)
- 更新 json/llm_api_map.json CRUD定义 alters
- 更新 llm_api_map_manage.ui 表单字段
- 重新生成 wwwroot/llm_api_map/index.ui
- 注册 load_path.py RBAC权限
2026-06-05 18:22:14 +08:00
3a0a8d4c86
feat: 添加模型上线检查功能
...
- 新增 llm_launch_check_api.dspy:执行完整的上线前检查
* 检查模型记录、日期、状态
* 检查上位系统(upapp)关联
* 检查API映射(uapi)
* 检查IO定义(uapiio)
* 检查能力映射(llm_api_map)
* 检查定价项目(pricing_program)
* 检查定价数据(pricingdata)
* 支持体验测试(action=inference)
- 新增 llm_launch_check.ui:检查结果展示界面
- 修改 llm.json:将'体验'按钮改为'上线检查'
- 更新 load_path.py:注册新路径
2026-06-04 18:11:12 +08:00
e6958f277b
fix: remove invalid data_url override pointing to non-existent api/get_llm.dspy
2026-06-04 17:32:47 +08:00
bb4900f997
feat: add get_search_{fieldname}.dspy for codes fields with 全部 option
...
- get_search_providerid.dspy: organization list with 全部 as first entry
- get_search_upappid.dspy: upapp list with 全部 as first entry
- json/llm.json: update alters dataurl to use search scripts
- load_path.py: register new RBAC paths
2026-06-04 17:22:50 +08:00
cfa355a7a5
refactor: 删除自定义llm_list.dspy,改用CRUD自动生成的get_llm.dspy
2026-05-31 20:01:41 +08:00
93e3f17a67
fix: 恢复providerid/upappid的alters配置,llm_list.dspy返回_text字段用于列表展示
2026-05-31 19:53:19 +08:00
9019f6c48e
fix: 仅删除llm.json中providerid和upappid的alters,恢复其他文件
2026-05-31 19:41:24 +08:00
c345238eaa
fix: 删除browserfields中的alters配置
2026-05-31 19:40:18 +08:00
57d77dc819
fix: status字段改用uitype:code+data格式,移除providerid/upappid的废弃属性textField/valueField
2026-05-31 15:48:09 +08:00
2f2841c16c
fix: 为providerid和upappid的alter添加显式的textField和valueField
2026-05-31 15:46:39 +08:00
d84cc1d859
fix: API返回纯数组格式,添加模型上下架功能
...
- get_organizations/get_upapps/uapi_options: 返回纯数组[{value,text}]
- 新增 get_catelogs/get_apis/get_ppids: 独立下拉数据API
- llm_api_map_manage.ui: 使用独立API替代data_field嵌套格式
- json/llm.json: 移除data_field,添加上架/下架toolbar
- llm_status_update.dspy: 模型上下架状态更新API
- 重新生成 llm/index.ui CRUD界面
2026-05-30 01:43:09 +08:00
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
9aa917bce5
feat: add data_filter and CRUD endpoints for llm table
...
- Add data_filter with 4 searchable fields (name LIKE, model LIKE, providerid, upappid)
- Add filter_labels for search form display
- Create llm_list.dspy with DBFilter support and LIKE wildcard handling
- Create llm_create.dspy, llm_update.dspy, llm_delete.dspy
- Create get_organizations.dspy and get_upapps.dspy for dropdown options
- Add browserfields alters for providerid and upappid dropdowns
- Add editable URLs for DataViewer CRUD operations
2026-05-26 14:26:38 +08:00
489ba1ad88
bugfix
2026-05-24 19:48:36 +08:00
07b4893252
feat(llmage): 添加llmusage历史记录备份和记账失败检索功能
...
- 新增 llmusage_history 表:定时备份已记账(use_date<today)的历史记录
- 新增 llmusage_accounting_failed 表:记录记账失败详情,支持检索
- 新增 backup_accounted_llmusage() 函数:备份+清理历史数据
- 新增 get_failed_accounting_records() 函数:按条件检索失败记录
- 更新 llm_accoung_failed():同时写入失败表记录
- 新增 failed_accounting.ui 页面和 failed_accounting_list.dspy API
- 新增 llmusage CRUD API (create/update/delete)
- 新增表索引优化查询性能
- 更新 setup_llmage_perms.sh 添加新端点权限
- 生成生产迁移SQL: scripts/migrate_llmusage_history.sql
2026-05-24 13:55:48 +08:00
3e886938be
bugfix
2026-05-21 17:33:35 +08:00
21df5fdc80
bugfix
2026-05-21 16:50:55 +08:00
5b3c7d4d02
refactor: 废弃llm_catalog_rel表, 分类关系改用llm_api_map
...
- 删除 llm_catalog_rel 表定义(models/json/xlsx)、CRUD文件、管理页面、迁移脚本
- utils.py: get_llms_by_catelog/get_llms_by_catelog_to_customer 的SQL从 llm_catalog_rel 改为 llm_api_map (加distinct去重)
- init.py: 缓存清除事件从 llm_catalog_rel 改为 llm_api_map
- menu.ui/index.ui: 移除类型关联菜单项
- dspy文件: v1/chat/completions, t2t, get_type_llms, list_catelog_models, list_paging_catelog_llms, llmcatelog_delete 全部改为 join llm_api_map
- 迁移脚本: 添加try/except兼容旧表不存在的情况
2026-05-21 16:22:59 +08:00
ca21d5cf25
bugfix
2026-05-21 15:53:53 +08:00
9f4a64b6af
fix: llm.json subtable add url pointing to llm_api_map_manage.ui (avoid unregistered /llmage/llm_api_map path)
2026-05-21 15:12:27 +08:00
1060cac2de
feat: llm_api_map CRUD management and ownerid-based data isolation
...
- Update json/llm.json subtable from llm_catelog_rel to llm_api_map
- Rewrite json/llm_api_map.json as standard CRUD format (tblname+params)
- Add models/llm_api_map.json table definition (summary/fields/indexes/codes)
- Add independent management UI (llm_api_map_manage.ui)
- Add CRUD DSPY APIs (list/create/delete/options) with ownerid filtering
- All operations verify l.ownerid for data isolation
- Add uapi_options.dspy for API selection dropdown
2026-05-20 17:29:27 +08:00
334dcc5947
fix: update llm_api_map field lengths to 32 (getID() standard)
2026-05-20 16:41:28 +08:00
d2ffd9c6d0
refactor: introduce llm_api_map table and remove uapiset intermediate layer
...
- New llm_api_map table: extract ability-specific fields (apiname,
query_apiname, query_period, ppid) from llm table to support
one-model-multi-ability without redundancy
- Remove uapiset from llmage JOIN chain: upapp.apisetid now directly
joins uapi.apisetid
- Updated BufferedLLMs.get_llm() to JOIN llm_api_map for
query_apiname/query_period/ppid fields
- Updated llmcheck.dspy and list_paging_catelog_llms.dspy to remove
uapiset references
- Added migration script to generate llm_api_map INSERTs from existing
llm data
2026-05-20 15:13:07 +08:00
37ef130591
bugfix
2026-05-19 21:22:52 +08:00
28a9cb52ae
bugfix
2026-05-19 15:32:43 +08:00
3ddf1a545d
bugfix
2026-05-19 15:32:16 +08:00
1b74b5bf10
feat: add llm catalog (type) management module
...
- Add CRUD API for llmcatelog (list/create/update/delete)
- Add llmcatelog.ui as main entry for catalog management
- Add llmcatelog_list.ui as DataViewer interface
- Add index.ui as module navigation page
- Update json/llmcatelog.json with editable section
2026-05-17 00:46:31 +08:00
ab60bebefd
bugfix
2026-04-05 13:00:51 +08:00
baee3e08dc
bugfix
2025-12-22 16:25:19 +08:00
66523723a4
bugfix
2025-12-22 16:21:41 +08:00
8f82a72d94
bugfix
2025-11-13 14:19:19 +08:00