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
cb5efd5550
Revert "fix: 展平嵌套usage数据以支持pricing引擎点号路径查找"
...
This reverts commit 71626468e2cc701410801db31c5879ce6dfdb59f.
2026-05-28 16:58:37 +08:00
71626468e2
fix: 展平嵌套usage数据以支持pricing引擎点号路径查找
...
根因:pricing引擎的config_data.get(k)是平面dict查找,
当k='prompt_tokens_details.cached_tokens'时无法从嵌套结构取值。
在llm_charging()中将prompt_tokens_details和completion_tokens_details
的子键展平为顶层key(如'prompt_tokens_details.cached_tokens')。
2026-05-28 16:57:08 +08:00
534e4fe8e0
fix: remove hardcoded dark theme colors from stat cards for light theme support
2026-05-28 16:16:07 +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
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
a4e3411584
feat: add scripts/load_path.py for RBAC permission management
...
- Migrate all llmage permission entries from sage/load_path.py
- Include new data_filter API endpoints (llm_list/create/update/delete, get_organizations, get_upapps)
- Include all existing v1, api, CRUD directory, and page endpoints
- Follow product_management/scripts/load_path.py pattern
2026-05-26 14:32:44 +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
ca51e168dc
docs: add API documentation for all /v1 endpoints
...
- docs/API.md: comprehensive API docs covering:
- POST /v1/chat/completions (text generation)
- POST /v1/video/generations (video generation, new)
- POST /v1/image/generations (image generation, new)
- GET /v1/tasks (async task status)
- GET /v1/models (list available models)
- Authentication, balance check, and billing notes
2026-05-26 13:10:05 +08:00
e9a20a091f
revert: restore self-orgid balance bypass in checkCustomerBalance()
...
The 'if llm.ownerid == userorgid: return True' shortcut is correct
behavior — own organization's models should not require balance check.
2026-05-26 12:05:46 +08:00
265702b894
fix: remove self-orgid balance bypass in checkCustomerBalance()
...
Removed the 'if llm.ownerid == userorgid: return True' shortcut from
checkCustomerBalance() in llmage/accounting.py. All requests now go
through the full balance check regardless of whether the model belongs
to the caller's organization.
2026-05-26 12:02:23 +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
b558059dc8
Merge feat/dataviz-llmage: add llmage module stat cards
...
- 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-26 11:27:29 +08:00
9364989be3
Merge feat/modern-ui-llmage: modernize llmage index.ui with standardized card navigation
...
- Replace hardcoded colors with modern #1E293B card style
- Add 12px borderRadius to match design system
- Standardize SVG icons (36px, 1.5 stroke width)
- Fix entire_url paths to use /llmage/ module prefix
- Add page header with Title2 + description text
2026-05-26 11:27:23 +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
56871dc906
fix(llmage): 修复backup_accounted_llmusage中sor.execute()返回值误用(MySQL cursor.execute返回None非rowcount)
2026-05-24 22:03:05 +08:00
7911750127
feat(llmage): 备份改用INSERT SELECT+DELETE单SQL语句 + 新增失败记录重试功能
2026-05-24 21:57:56 +08:00
686b05d8fe
bugfix
2026-05-24 20:44:31 +08:00
489ba1ad88
bugfix
2026-05-24 19:48:36 +08:00
9fa8f9fa62
feat(llmage): 日期变更触发备份(use_date<昨天) + llmusage添加(accounting_status,use_date)组合索引
2026-05-24 17:21:34 +08:00
8755ab5d6d
fix(llmage): 修复备份SQL条件 use_date < today(非yesterday)+ 提高备份频率到每5分钟
2026-05-24 17:06:23 +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
ac4dea86dd
buggix
2026-05-23 21:58:45 +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
7cc0d64291
buggix
2026-05-23 20:02:01 +08:00
5994409657
buggix
2026-05-23 19:27:52 +08:00
b3060eee9d
buggix
2026-05-23 19:26:52 +08:00
7b7d859be1
bugfix
2026-05-23 18:33:10 +08:00
e37073b713
buggix
2026-05-23 17:22:26 +08:00
4ee67aa022
buggix
2026-05-23 17:21:52 +08:00
0a9ebf48cf
buggix
2026-05-23 17:20:26 +08:00
b4d01099ac
buggix
2026-05-22 18:18:21 +08:00
408f8acadc
buggix
2026-05-22 17:58:34 +08:00
dfe961e4c9
buggix
2026-05-22 17:55:32 +08:00