6ab53eca2b
fix: llm_create.dspy 补充 ownerid 自动注入(logined_userorgid 对自定义端点不生效)
2026-07-14 18:22:11 +08:00
f0d3550b63
fix: use get_sor_context(rbac) to query suppliers in sage db
2026-07-10 09:26:21 +08:00
3ae70d2c92
fix: providerid 下拉从 suppliers 表而非 organization 获取
2026-07-10 09:21:32 +08:00
ad7d9086ce
fix: CRUD endpoint return format - remove json.dumps, use widgettype format
2026-07-03 14:50:40 +08:00
a5b72244ae
fix: llm_update returns widgettype format so Form dispatches submited and popup closes
2026-07-03 13:06:12 +08:00
9200d9f20a
bugfix
2026-07-03 10:45:36 +08:00
e27137055c
fix: 体验一次→打开llm_dialog实战推理;检查计费→真正调用llm_query_price算价
2026-07-02 14:54:50 +08:00
57fb8c3c8f
fix: llm_launch_check_api returns JSON instead of plain text — urldata actiontype expects valid JSON
2026-07-02 14:22:52 +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
6890af7638
fix: 清理所有 dspy 文件的 import 语句
...
删除已在 ahserver/ServerEnv 预加载的模块:
json, datetime, getID, debug, curDateString, timestampstr,
get_sor_context, time, DictObject, partial, FileStorage, os
删除模块内部 import:
from llmage.utils import get_llmusage_by_id, read_ioinfo_content
同步将 get_llmusage_by_id, read_ioinfo_content 加入 load_llmage() 导出,
dspy 中通过 ServerEnv 全局调用。
2026-06-30 17:38:37 +08:00
0fccc895ce
优化 llmusage_list.dspy:简化查询逻辑,提升性能
2026-06-26 18:57:41 +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
a6efef56e9
perf: 记账失败列表优化
...
- 去掉跨库JOIN,改用内存批量ID映射
- 不查failed_reason大TEXT字段
- handled状态直接后台转文本,前端不依赖data映射
2026-06-26 17:08:58 +08:00
e08445b56b
优化记账失败记录页面
...
- Title2添加border-bottom样式,使标题更明显
- 查询SQL从select *改为指定字段,减少数据传输量
2026-06-25 14:17:27 +08:00
Hermes Agent
e99e7774f2
fix: 记账失败记录三个问题修复
...
1) show_failed_reason.dspy: 增加llm表JOIN,弹窗显示llmID/model/ppid/用户/机构/金额等详情+失败原因
2) failed_accounting_list.dspy: page参数-Infinity崩溃,加try/except+最小值校验
3) failed_accounting.ui: alters去掉params/dataurl(dspy已JOIN返回_text字段,dataurl会覆盖)
2026-06-22 11:56:58 +08:00
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
Hermes Agent
88d2fd2c86
llmage: 记账失败记录-原因改为toolbar按钮弹窗显示
2026-06-18 11:55:08 +08:00
Hermes Agent
ac79d6c0d0
fix: get_search_apiname返回value/text双键兼容表单下拉
2026-06-17 18:32:09 +08:00
Hermes Agent
fe348b070e
fix: 简化体验一次和检查计费为配置验证,避免复杂API调用
2026-06-16 18:02:58 +08:00
647e63eb04
fix: failed_accounting.ui - Combobox→UiCode, 移除formatter, 修复dspy import
2026-06-12 15:23:05 +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
0f2d84bd00
fix: use m.apiname from llm_api_map instead of a.apiname (column not in llm table)
2026-06-11 17:44:11 +08:00
6fd1f2ee5c
bugfix
2026-06-10 16:10:42 +08:00
f5ded344f6
bugfix
2026-06-09 13:58:03 +08:00
f1d02f9d16
bugfix
2026-06-09 13:55:33 +08:00
dfb0794ee2
bugfix
2026-06-09 13:51:41 +08:00
6123c45c10
bugfix
2026-06-09 11:55:02 +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
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
2ebe811c34
fix: use llm_api_map for llmcatelogid filter (llm table has no catelog column)
2026-06-05 17:38:18 +08:00
6f8c14c329
feat: add llmcatelogid filter and pagerows param to get_inference_history
...
- Add llmcatelogid parameter to filter by model catalog (joins llm table)
- Change default pagerows from 50 to 10
- Add pagerows parameter for custom page size
2026-06-05 17:34:26 +08:00
1d12d42e80
feat: add get_inference_history API - cross-table paginated query with ioinfo content
...
- UNION ALL query from llmusage + llmusage_history tables
- Filter by current user's userid, sorted by use_time desc
- 50 records per page with pagination support
- Reads ioinfo webpath via FileStorage to return actual input/output content
- Registered in load_path.py for RBAC (logined role)
2026-06-05 17:15:05 +08:00
186f64d544
fix: prepend 全部 option to get_search results
2026-06-04 18:52:10 +08:00
134bd1ca68
fix: replace 'from datetime import date' with pre-loaded curDateString()
2026-06-04 18:39:50 +08:00
9212cf8afb
fix: remove import statements from dspy file (violates dspy spec)
2026-06-04 18:35:53 +08:00
faba862336
feat: add check_charging action to test pricing calculation with usage data
...
- llm_launch_check_api.dspy: add check_charging action
* Takes usages JSON from inference result
* Calls env.buffered_charging(ppid, usages) to verify pricing works
* Returns pricing breakdown with amounts and costs
- llm_launch_check.ui: add '检查计费' button
* Appears after successful inference
* Passes usage data to check_charging API
* Displays pricing calculation results
- llm_launch_check_api.dspy: simplify inference action
* Direct uapi.call() instead of full inference pipeline
* Extracts usage from response without writing to database
2026-06-04 18:29:37 +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
308e91c61c
fix: align get_search_providerid.dspy with {value, text} format using SQL aliases
2026-06-04 17:58:00 +08:00
9377cfabb8
fix: align get_search_upappid.dspy with {value, text} format
2026-06-04 17:56:34 +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
a228095220
fix: get_organizations/get_upapps返回providerid_text/upappid_text格式匹配alters字段名
2026-05-31 19:56:35 +08:00
93e3f17a67
fix: 恢复providerid/upappid的alters配置,llm_list.dspy返回_text字段用于列表展示
2026-05-31 19:53:19 +08:00
d4406a60fd
Revert "fix: llm_list.dspy用JOIN查询返回upappid_text和providerid_text供前端code列显示"
...
This reverts commit 5c021b81cba6da9c08954d2c5e075cd1e83f45cf.
2026-05-31 19:26:32 +08:00
5c021b81cb
fix: llm_list.dspy用JOIN查询返回upappid_text和providerid_text供前端code列显示
2026-05-31 15:59:21 +08:00
37c6814b2d
fix: 移除get_organizations的过滤条件,返回所有组织;添加错误日志
2026-05-31 15:41:21 +08:00
314da7ae44
fix: get_upapps和get_organizations用属性访问替代字典访问(sqlExe返回对象)
2026-05-31 15:36:13 +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