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
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
dc007a30a9
feat: 模型广场页面 - 新增 model_plaza.ui (TabPanel按分类/按供应商) - 新增 model_plaza.css (卡片悬浮效果/间距优化) - show_llms/show_llms_by_providers 添加 plaza-card/plaza-grid CSS - load_path.py 注册权限
2026-05-31 11:08:10 +08:00
1dc7df71ef
feat: 添加大模型API文档页面供客户查阅
...
- api_doc.ui: MarkdownViewer渲染API文档
- api_doc.md: 从docs/API.md复制的v1接口文档
- 包含chat/completions、video/generations、image/generations、models、tasks接口说明
2026-05-31 09:02:23 +08:00
fa99d04595
fix: reduce module card height (remove cheight, compact padding/icons)
2026-05-30 21:20:46 +08:00
5d52d02319
refactor: V1 API 支持新 catelogid 缩写(t2t/t2v/t2i等),向后兼容中文名
...
- v1/chat/completions: 默认值 '文生文' → 't2t',SQL 匹配 b.id OR b.name
- v1/video/generations: SQL 匹配 b.id OR b.name,注释示例更新
- v1/image/generations: SQL 匹配 b.id OR b.name,注释示例更新
- t2t/index.dspy: 默认值 '文生文' → 't2t',SQL 匹配 b.id OR b.name
- get_type_llms.dspy: 硬编码中文名改为 alias 映射(t2v/i2v/r2v)
- docs/API.md: 添加完整 catelogid ID 对照表,示例参数更新
2026-05-30 20:36:16 +08:00
08bebcd257
refactor: v1 API 统一使用 catelogid 参数替代 lctype/llmcatelogid
2026-05-30 16:22:21 +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
283b7d498c
fix: wrap Tabular in VBox with cheight for proper scrolling
2026-05-29 22:09:51 +08:00
adb0bafc0a
chore: remove CRUD definition dirs from tracking, add gitignore
2026-05-29 13:18:20 +08:00
44d94dace5
refactor: optimize debug output - use debug_params for compact logging, truncate SQL; add CRUD definitions
2026-05-29 12:07:53 +08:00
eed21ce6a5
fix: responsive UI with VScrollPanel, cfontsize, css:card
2026-05-29 00:13:08 +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
534e4fe8e0
fix: remove hardcoded dark theme colors from stat cards for light theme support
2026-05-28 16:16:07 +08:00
59d3c406ab
fix: remove hardcoded dark theme colors from index.ui and show_llms pages
...
- Remove bgcolor/color/border hardcoded dark theme values from index.ui
- Use css:'card' class instead of inline bgcolor for navigation cards
- Remove conflicting bgcolor:#def0f0 from show_llms/show_llms_by_providers/show_same_catelog_llm
- Let system theme (bricks.css/shell_theme.css) handle styling
2026-05-27 11:31:13 +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
04913dbe42
refactor: 3-part layout - title (fixed), tab header/cards (fixed), content (filler, scrollable)
2026-05-26 13:42:44 +08:00
f151ad2c30
fix: add dark mode background (#0B1120) to llmage index.ui
2026-05-26 11:56:45 +08:00
146ebb2b4a
feat: add /v1/video/generations and /v1/image/generations API endpoints
...
- wwwroot/v1/video/generations/index.dspy: video generation endpoint
Required params: model, llmcatelogid, prompt
Supports async task submission via existing inference infrastructure
- wwwroot/v1/image/generations/index.dspy: image generation endpoint
Required params: model, llmcatelogid, prompt
Supports both sync and async models depending on config
Both endpoints follow the same pattern as /v1/chat/completions:
1. Validate required params (model + llmcatelogid + prompt)
2. Look up llm via llm_api_map join with catalog type
3. Check customer balance
4. Route to inference (async/sync based on model config)
2026-05-26 11:45:37 +08:00
fd6d17e3c2
feat: add llmage module stat cards - model count, today's usage, amount, catalog count
...
- Create stats.py with get_llmage_stats() helper function
- Add 4 stat widgets: stat_total_models, stat_today_calls, stat_today_amount, stat_catelog_count
- Update index.ui to display stat cards row above navigation cards
- Register get_llmage_stats in load_llmage()
2026-05-25 18:48:09 +08:00
ae61193454
feat: modernize llmage index.ui with standardized card navigation
...
- Replace #1e3a5f hardcoded colors with modern #1E293B card style
- Add 12px borderRadius to match design system
- Add subtle #334155 borders for depth
- Standardize SVG icons to 36px with 1.5 stroke width
- Update colors: F1F5F9 text, 94A3B8 secondary descriptions
- Fix entire_url paths to use /llmage/ module prefix
- Add page header with Title2 + description text
2026-05-25 18:27:32 +08:00
7911750127
feat(llmage): 备份改用INSERT SELECT+DELETE单SQL语句 + 新增失败记录重试功能
2026-05-24 21:57:56 +08:00
96317c1512
feat(llmage): menu.ui 添加记账失败记录菜单项
2026-05-24 15:36:33 +08:00
93bbd529db
fix(llmage): failed_accounting.ui 日期控件改为UiDate
2026-05-24 15:16:01 +08:00
1e335d35cb
fix(llmage): 规范检查修复
...
- accounting.py: 删除重复datetime导入, 清理未使用env变量
- failed_accounting.ui: Button text→label(规范), DatePicker→TextInput(不确定的widget)
- index.ui: backgroundColor→bgcolor(规范), 3处修复
- llmusage_accounting_failed_update.dspy: 删除ServerEnv()违规(.dspy禁用), 用datetime替代
- 新增llmusage_history只读DSPY(create/update/delete返回只读提示)
2026-05-24 14:11:33 +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
e98d9fbce0
bugfix
2026-05-23 22:24:26 +08:00
80f1bae7c7
buggix
2026-05-23 22:22:40 +08:00
9636779d24
buggix
2026-05-23 22:21:58 +08:00
f370277438
buggix
2026-05-23 22:10:17 +08:00
f361200d5c
buggix
2026-05-23 22:08:26 +08:00
aca610dd87
bugfix
2026-05-23 21:54:17 +08:00
e587f31c5e
bugfix
2026-05-23 21:51:41 +08:00
8c070c692a
bugfix
2026-05-23 21:48:46 +08:00
8ca04ba691
bugfix
2026-05-23 21:44:53 +08:00
410ab1d2e4
buggix
2026-05-22 15:47:00 +08:00
7523e67214
buggix
2026-05-22 14:28:51 +08:00
2f29674ec0
buggix
2026-05-22 14:27:47 +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