4 Commits

Author SHA1 Message Date
Hermes Agent
c0c9973e23 fix: failed_accounting_list.dspy JOIN条件修正 - users表主键是id不是userid - filter模糊搜索改用JOIN后的表别名(u.username, l.name) 2026-06-18 14:19:14 +08:00
Hermes Agent
4abd553302 fix: failed_accounting.ui显示优化 + dspy跨库JOIN返回_text字段 - failed_accounting.ui: userid→username, userorgid→orgname, llmid→llm.name - 移除cost/use_date列, InlineForm紧凑布局 - failed_accounting_list.dspy: 跨库JOIN users/organization/llm获取名称 - handled保持原始值, 由UI的code控件显示 2026-06-18 14:15:28 +08:00
647e63eb04 fix: failed_accounting.ui - Combobox→UiCode, 移除formatter, 修复dspy import 2026-06-12 15:23:05 +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