680 Commits

Author SHA1 Message Date
892f0c5002 bugfix 2026-06-09 13:36:07 +08:00
6123c45c10 bugfix 2026-06-09 11:55:02 +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
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
eee648038a docs: add get_inference_history API documentation to README 2026-06-05 17:19:40 +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
6876edae62 bugfix 2026-06-05 16:58:09 +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
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
6bfa0cb27c feat: add llmcatelogid filter param (default t2t) to get_my_asynctasks API 2026-06-04 17:01:29 +08:00
90c93dbe07 feat: get_my_asynctasks 返回记录增加 llmcatelogid 属性
通过 llmid 查询 llm_api_map 表获取对应的 llmcatelogid
2026-06-04 15:12:29 +08:00
ffb10827bb refactor: get_type_llms 参数名 catelogid -> llmcatelogid 2026-06-04 14:36:04 +08:00
df8aafe1d8 feat: add TTS and ASR audio API endpoints
- POST /v1/audio/speech (TTS): MiniMax Speech 2.6 Turbo/HD, 2.5 HD, F5-TTS local
- POST /v1/audio/transcriptions (ASR): qwen3-asr-flash, Nvidia parakeet
- Add comprehensive docs for both endpoints in API.md
- Update load_path.py RBAC (logined + customer roles)
2026-06-04 13:58:26 +08:00
ae02a7e88c feat: add music generation API (MiniMax Music 2.5/2.6)
- Add POST /v1/music/generations endpoint (index.dspy)
- Add music generation section to API docs
- Update load_path.py RBAC permissions for new path
- Models: music-2.6, music-2.5 (MiniMax, sync, returns audio URL)
- Required params: model, catelogid=music_gen, prompt, lyrics
2026-06-04 13:40:08 +08:00
fb7fa8c082 fix: replace wildcard patterns with explicit per-file entries in load_path.py 2026-06-04 13:03:31 +08:00
3743dec00d fix: dark mode overrides for plaza sidebar and nav buttons 2026-06-02 21:00:27 +08:00
311b0aec6f bugfix 2026-06-02 13:59:24 +08:00
cab7843f95 bugfix 2026-06-02 13:56:23 +08:00
d4c079d11e bugfix 2026-06-02 13:53:47 +08:00
151fb14b25 bugfix 2026-06-02 13:53:17 +08:00
565e9cd8a4 fix: get_type_llms use catelogid param instead of type, remove alias mapping 2026-06-02 11:33:32 +08:00
2b121077c6 fix: change llmage_content from VBox to VScrollPanel for right-side scrolling
The model list page content area (llmage_content) had no scrollbar because
it was a VBox with css:filler (overflow:hidden). Changed to VScrollPanel
which provides overflow:auto, enabling scrolling when content overflows.
2026-06-02 11:26:06 +08:00
6cafd70b34 feat: add /v1/models/catelog endpoint - list models by catalog with exclude 2026-06-02 11:21:25 +08:00
76ddfaabc7 fix: 移除DynamicColumn的filler类,修复卡片区域无法滚动
DynamicColumn的css=filler会导致overflow:hidden,裁剪卡片内容。
改为css=plaza-grid让DynamicColumn有自然高度,VScrollPanel可正常滚动。
2026-06-02 00:02:06 +08:00
c3abbf9bfe fix: llmage index布局改为flex,llmage_content填满剩余空间
VScrollPanel改为VBox(filler),卡片区自然高度,
llmage_content设为css=filler+height=100%,
Tabular加载后有固定高度约束,内部表格可滚动。
2026-06-01 23:52:54 +08:00
a0f38df113 debug: add hot_reload handler logging 2026-06-01 22:53:11 +08:00
450c9009a5 style: move _on_hot_reload after all imports 2026-06-01 18:15:38 +08:00
87040915ee refactor: bind hot_reload event via EventDispatcher 2026-06-01 18:10:32 +08:00
bab415ba83 Revert "fix: 模型列表右侧面板改为VScrollPanel支持滚动"
This reverts commit e186e74b631e162161d5525b21a00191ccf35f1a.
2026-06-01 17:38:27 +08:00
e186e74b63 fix: 模型列表右侧面板改为VScrollPanel支持滚动 2026-06-01 17:25:52 +08:00
8e9ab5008c fix: get_llm_llmusage用JOIN从llm_api_map获取query_apiname,修复异步任务轮询卡在CREATED 2026-06-01 14:39:00 +08:00
be3c939955 fix: 模型广场彻底重构 — 移除TabPanel,用VBox+script切换视图
根因链:
1. TabPanel内部容器结构导致getWidgetById找不到tab content中的widget
2. urlwidget渲染后替换自身DOM,id丢失

修复:
- model_plaza.ui: 移除TabPanel,用两个VBox(按分类/按供应商)+script切换display
- plaza_cards_panel/plaza_provider_panel改为VBox容器(urlwidget作子组件),id不丢失
- CSS用#plaza_view_provider{display:none}初始隐藏供应商视图
- 切换按钮用getElementById直接操作display,不依赖bricks widget寻址
- 全链路filler确保VScrollPanel获得确定高度可滚动
2026-06-01 13:44:20 +08:00
fed36ff079 fix: 模型广场导航找不到目标 — 内联布局替代嵌套urlwidget
根因:TabPanel tab content通过urlwidget加载show_llms.ui时,
urlwidget渲染后替换自身DOM,导致plaza_cards_panel的id丢失,
getWidgetById()返回null。

修复:将左右分栏布局直接内联到model_plaza.ui的TabPanel tab content中,
plaza_cards_panel改为VBox容器(保持id),初始内容通过子urlwidget加载,
点击导航按钮时用mode:replace替换VBox内容。
2026-06-01 13:35:51 +08:00
063e158989 fix: 右侧模型列表不可滚动 — 添加filler CSS和flex布局
- show_llms/show_llms_by_providers的HBox加css:filler
- 右侧urlwidget加css:filler
- show_llms_cards两个文件的VScrollPanel加css:filler
- CSS中为tabpanel-content和scrollpanel添加flex布局确保高度传递
2026-06-01 13:29:57 +08:00
dac3ebb5a7 fix: 重写show_llms_cards_by_provider.ui修复500错误
- 移除Jinja2列表推导式(可能有兼容性问题)
- 改用inline if过滤,更安全可靠
- 添加|string确保类型安全的比较
- 处理description为None的情况(llm.description or '')
2026-06-01 13:26:27 +08:00
2f75784ea6 fix: 模型广场左侧导航点击右侧不更新 — target加app.前缀+mode:replace
根因:左侧按钮与右侧面板是HBox下的兄弟关系,非父子关系。
bricks框架要求兄弟间引用需加app.前缀才能正确寻址。
同时添加mode:replace确保每次点击替换旧内容。
2026-06-01 13:20:16 +08:00
2b30a3f0dc feat: 模型广场改为左右分栏布局,左侧分类/供应商导航,右侧模型卡片 2026-06-01 11:56:00 +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