Hermes Agent
1aa28430e0
refactor: appcodes编码改用models codes段定义,清理json alters
2026-06-17 19:09:51 +08:00
d4e455ba9a
perf: optimize get_inference_history query and add indexes
...
Query optimization (dspy):
- Replace UNION ALL + sort with two parallel queries (asyncio.gather)
that each use (userid, use_time) composite index
- Python-side merge-sort of two pre-sorted sequences O(n)
- Concurrent FileStorage reads for ioinfo (asyncio.gather)
Indexes (models/*.json + /tmp/llmage_history_indexes.sql):
- llmusage: add idx_llmusage_userid_usetime (userid, use_time)
- llmusage_history: add idx_lh_userid_usetime (userid, use_time)
(was missing userid index entirely - main bottleneck)
2026-06-05 17:42:15 +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
65d5020fc7
bugfix
2026-05-27 13:41:48 +08:00
d44c2dae74
refactor(models): convert to json format per database-table-definition-spec
2026-05-27 13:23:28 +08:00
9fa8f9fa62
feat(llmage): 日期变更触发备份(use_date<昨天) + llmusage添加(accounting_status,use_date)组合索引
2026-05-24 17:21:34 +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
7b7d859be1
bugfix
2026-05-23 18:33:10 +08:00
2661ebbc77
buggix
2026-05-22 11:48:25 +08:00
66ed700261
bugfix
2026-05-22 11:33:02 +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
71d366f73d
bugfix
2026-05-21 13:59:21 +08:00
81bed1d384
feat: add json table definitions for all models (converted from xlsx)
2026-05-21 12:46:20 +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
f9a7293c46
bugfix
2026-05-19 21:27:46 +08:00
e7ca580a1c
bugfix
2026-05-19 21:21:22 +08:00
7679047bc4
bugfix
2026-05-19 21:19:28 +08:00
2562ddf5b0
bugfix
2026-05-19 21:14:47 +08:00
6cc3986a2d
feat: support multi-catalog for LLMs
...
- Create llm_catalog_rel model for one-to-many relationship
- Remove llmcatelogid from llm model
- Update SQL queries in utils.py and dspy files to use join
- Add maintenance UI (llm_catalog_rel_manage.ui) and API endpoints
- Filter options by user's orgid
2026-05-16 21:31:19 +08:00
a3867d25bb
bugfix
2026-03-27 18:30:05 +08:00
0e6a4d8a70
bufix
2026-03-27 16:26:05 +08:00
9506976f16
bugfix
2026-03-04 18:22:01 +08:00
d32e25feb1
bugfix
2026-01-06 11:00:38 +08:00
7576310c6a
bugfix
2025-12-22 16:28:44 +08:00
a1f369c454
bugfix
2025-12-22 13:18:23 +08:00
2b92fa79e4
bugfix
2025-12-11 15:21:10 +08:00
220d816993
bugfix
2025-11-13 14:14:56 +08:00
a3b23a348f
bugfix
2025-11-13 13:23:39 +08:00
3ac420984d
bugfix
2025-11-13 13:16:33 +08:00
91a41d935b
bugfix
2025-09-17 17:02:06 +08:00
2b64133ca0
bugfix
2025-09-08 16:14:57 +08:00
yumoqing
c7966e6be5
bugfix
2025-09-07 14:34:07 +08:00
0929e59d0d
bugfix
2025-08-31 11:25:24 +08:00
62b2bd5028
bugfix
2025-08-20 15:19:07 +08:00
9ec7d2f686
bugfix
2025-08-09 13:18:29 +08:00
ce260df36e
bugfix
2025-08-06 17:56:50 +08:00
e530372c0f
bugfix
2025-08-06 17:52:00 +08:00
75ea7c4640
bugfix
2025-08-06 17:03:37 +08:00
da01fbd836
bugfix
2025-08-06 16:55:04 +08:00
b238ef9820
bugfix
2025-08-02 00:40:31 +08:00
ae0cf46c59
first commit
2025-07-16 14:19:09 +08:00