Hermes Agent
b84f8e406b
fix: test_pricing 直接从DB获取原始YAML避免DictObject序列化失败
2026-06-24 08:53:23 +08:00
Hermes Agent
810cd4549b
fix: 修复定价项目时序验证定价500错误 + 移除过时的pricing_item子表引用
...
- init.py: 注册 get_pricing_program_timeing 到 env(pricing_test.ui模板依赖此函数)
- pricing_test.ui: 修复拼写错误 amoumt → "amount"(生成无效JSON导致500)
- json/pricing_program_timing.json: 移除指向已删除的pricing_item CRUD的subtables配置
2026-06-23 23:59:13 +08:00
Hermes Agent
30766b6c88
Revert "fix: skip_keys添加value_mode,防止定价项顶层value_mode被误当字段检查导致匹配失败"
...
This reverts commit 3a9e30313b41adf8f23a04bd7b1a0fe82256c2e4.
2026-06-23 17:04:13 +08:00
Hermes Agent
b2521678ad
Revert "fix: non-field keys in pricing items skip instead of raise - aligns top-level loop (line 618) with filters loop (line 653) behavior - value_mode and other control params at filter level no longer cause 'fields中没有定义' error"
...
This reverts commit 6df2569c8ed9615c488d565fffa30883e819dce6.
2026-06-23 17:04:13 +08:00
Hermes Agent
03a0bea51f
Revert "fix: value_mode read from field definition, not filter_item - removed item_value_mode from filters loops (2 places) - check_value(f, fv, dv) now falls back to f.value_mode per field - fixes: filter-level value_mode:between was applied to ALL fields including model (string), causing between parse error on model name"
...
This reverts commit 1e65451da4e97d77dc072113e2d1aab06fda80c0.
2026-06-23 17:04:13 +08:00
Hermes Agent
1e65451da4
fix: value_mode read from field definition, not filter_item - removed item_value_mode from filters loops (2 places) - check_value(f, fv, dv) now falls back to f.value_mode per field - fixes: filter-level value_mode:between was applied to ALL fields including model (string), causing between parse error on model name
2026-06-23 16:16:37 +08:00
Hermes Agent
6df2569c8e
fix: non-field keys in pricing items skip instead of raise - aligns top-level loop (line 618) with filters loop (line 653) behavior - value_mode and other control params at filter level no longer cause 'fields中没有定义' error
2026-06-23 16:06:00 +08:00
Hermes Agent
3a9e30313b
fix: skip_keys添加value_mode,防止定价项顶层value_mode被误当字段检查导致匹配失败
2026-06-23 15:45:36 +08:00
Hermes Agent
e4bbef8e17
feat: register get_ppid_pricing on env for pre-inference pricing check
2026-06-22 17:55:27 +08:00
Hermes Agent
0f562ec834
移除__pycache__,补充.gitignore
2026-06-22 14:59:31 +08:00
Hermes Agent
6bb7af3535
data_filter改为filterjson逻辑表达式格式
2026-06-22 14:43:34 +08:00
Hermes Agent
65e7af4c84
data_filter改为search_fields
2026-06-22 14:10:15 +08:00
Hermes Agent
d28d1b6173
name字段搜索使用LIKE模糊匹配
2026-06-22 13:53:31 +08:00
Hermes Agent
7f5dc485cb
chore: remove generated CRUD files from git tracking
...
Generated files (wwwroot/pricing_program/, wwwroot/pricing_program_timing/)
should not be in version control. They are regenerated by build.sh on deployment.
Added to .gitignore.
2026-06-22 12:22:23 +08:00
Hermes Agent
f148e0c1f9
regenerate CRUD with app. prefix target
2026-06-22 12:16:56 +08:00
Hermes Agent
3863bdcbcc
regenerate CRUD with prepend_all for search code fields
2026-06-22 12:11:53 +08:00
Hermes Agent
a2d0fc9798
regenerate CRUD with script bind for search form
2026-06-22 12:09:26 +08:00
Hermes Agent
daf72d297d
regenerate CRUD with enriched code field support in data_filter
2026-06-22 11:56:16 +08:00
Hermes Agent
c7b364926d
feat: add i18n translations (zh/en/jp/ko) for all modules
2026-06-19 15:01:35 +08:00
Hermes Agent
38f0c10dfe
Revert "fix: root VBox height:100% instead of cheight:40"
...
This reverts commit d89961c1e49598cbc833ddf86e8927cae041b74b.
2026-06-19 14:26:29 +08:00
Hermes Agent
d89961c1e4
fix: root VBox height:100% instead of cheight:40
2026-06-19 14:25:09 +08:00
Hermes Agent
851ea8b51b
feat: add data_filter for name and providerid
2026-06-19 14:17:32 +08:00
Hermes Agent
9a0f82b28d
fix: remove providerid alters from CRUD JSON, let model codes handle it
2026-06-19 14:02:09 +08:00
Hermes Agent
74d9848674
fix: add uitype:code to providerid alters for orgname display
2026-06-19 08:46:39 +08:00
Hermes Agent
a6150a4309
feat: add =~= (closed-closed interval) support in check_value for between ranges
2026-06-18 23:22:14 +08:00
Hermes Agent
7d8fae01ca
fix: check_value支持filter_item级别的value_mode
...
- check_value增加value_mode参数,优先用传入值,回退到field.value_mode
- filter_item遍历时跳过value_mode key
- 提取filter_item.get('value_mode')传给check_value
- 修复between类型filter报invalid literal for int()错误
2026-06-18 17:49:28 +08:00
Hermes Agent
0d841f078e
feat: pricing_program discount field validation [0-1]
...
- Added rules to discount field: required, number, min:0, max:1
- Frontend: Form validates on submit, shows error below field
- Backend: auto-generated dspy validates before DB write
2026-06-18 17:36:40 +08:00
Hermes Agent
9241edfb6c
fix: test_pricing使用urlwidget加载控件JSON
2026-06-18 16:18:28 +08:00
Hermes Agent
edee247a11
fix: test_pricing结果直接返回完整控件JSON
...
- dspy: 直接return VScrollPanel+Text子控件的完整JSON,不再用status/data包装
- ui: actiontype从urldata改为bricks,直接实例化返回的控件
- 解决status_of模板${items}数组替换不支持的问题
2026-06-18 16:13:52 +08:00
Hermes Agent
d22dbc57ae
fix: test_pricing结果用subwidgets控件数组渲染
...
- dspy: items改为Text控件数组([{widgettype:Text, options:{text:json}}])
- ui: status_of.ok改为VScrollPanel+subwidgets引用items
- 解决之前返回纯文本字符串无法渲染为bricks控件的问题
2026-06-18 16:08:59 +08:00
Hermes Agent
bcdb1e02cd
feat: 定价测试窗口添加标题'定价测试'
2026-06-18 16:06:16 +08:00
Hermes Agent
972400e382
feat: test_pricing_program结果每条记录单独显示
...
- dspy: 每条结果json.dumps(r, ensure_ascii=False)后以\n\n分隔
- ui: 结果区改为VScrollPanel,支持长结果滚动
2026-06-18 16:03:43 +08:00
Hermes Agent
759cd14a56
fix: filters数组改为AND逻辑,缺键视为匹配
...
- 原OR逻辑导致model不匹配时仅因video匹配就计费
- 带unit_prices的filter_item为tiered定价,跳过AND检查
- seedance2.0案例:390825 tokens从75.82(5条匹配)修正为17.98(1条匹配)
2026-06-18 15:26:04 +08:00
Hermes Agent
616c3a1926
fix: 供应商折扣负数校验,clamp到0~1范围(bug6)
2026-06-16 10:45:29 +08:00
c5eb5b9399
fix: get_pricing_display 异常保护,返回None
2026-06-12 15:32:27 +08:00
c875a8dc2b
fix: test_pricing 传入已解析的 dict 导致 yaml.safe_load 报错
...
ppt_db2app 将 pricing_data 从 YAML 字符串解析为 Python dict,
但 test_pricing 直接传给 get_pricing_from_ymalstr(期望 YAML 字符串),
导致 yaml.safe_load(dict) 报 TypeError。
修复:检测 ppt.pricing_data 类型,如果是 dict 则 yaml.dump 转回字符串。
2026-06-12 15:12:44 +08:00
7df8e530a4
remove: pricing_item CRUD and related functions (not used)
2026-06-12 14:41:58 +08:00
ac3d7c6d91
fix: implement missing get_all_spec_fields_by_pptid, sor_get_spec_fields, get_pricing_specs_by_pptid
2026-06-12 14:18:52 +08:00
00abc0caa4
bugfix
2026-06-12 14:04:57 +08:00
c8b5bba342
bugfix
2026-06-12 13:55:10 +08:00
8d1808fe96
bgufix
2026-06-12 13:49:27 +08:00
9094e07465
bgufix
2026-06-12 13:47:09 +08:00
22a3a96833
bgufix
2026-06-12 13:03:55 +08:00
fffcd03c87
fix: remove nonexistent ownerid filter from pricing_program_timing CRUD
2026-06-11 16:30:57 +08:00
c2a7dbb98f
docs: 添加HTTP API文档和pricing_data使用指南
...
1. HTTP API接口文档:get_pricing_display.dspy 调用方式和返回示例
2. pricing_data两种格式说明:新格式(price_factors+unit_prices+unit)和旧格式(formula)
3. 完整示例:Token定价、视频生成定价、公式计算定价
4. 关键规则说明:unit_values、filters格式、value_mode等
2026-06-05 19:18:46 +08:00
c1bfaca049
fix: 支持filters列表格式 + display_text展示过滤条件
...
1. 从 p['filters'] 列表提取filter条件(数据库实际存储格式)
2. 兼容dict直接字段和list两种filter格式
3. tiered仅用于价格不同的阶梯定价
4. display_text展示每条定价的过滤条件
2026-06-05 19:07:11 +08:00
502468e0cb
fix: model filter提升为item级适用条件
...
- model filter从tiered移到item.filters(适用条件)
- tiered只保留区间阶梯定价(如token范围)
- 区分适用条件vs阶梯定价的业务语义
2026-06-05 18:53:33 +08:00
3ad50beda8
refactor: 清理冗余空字段
...
- 空 filters/filter_labels/formula 不返回
- min_amount=0 不返回
- 返回只保留有实际值的字段
2026-06-05 18:49:51 +08:00
66b4744def
fix: tiered只展示价格不同的条目,过滤冗余
...
- 当tiered价格等于主unit_price时不展示
- 去掉重复的model=qwen3.7-max:6.0等冗余行
2026-06-05 18:47:50 +08:00
38ff69ca55
refactor: 精简pricing_display, tiered只保留有意义filter
...
- 过滤内部参数: value_mode, xxx_tokens 区间条件不展示
- tiered 只保留 model 等有意义的 filter key
- display_text 去掉冗余 prefix
2026-06-05 18:34:27 +08:00