Merge pull request '用户后台新增 AI 模型与价格目录' (#9) from codex/member-ai-models into main
Verify control plane / verify (push) Canceled after 0s

Reviewed-on: http://git.xhmcl.com/xhgit/webup-cloud/pulls/9
This commit was merged in pull request #9.
This commit is contained in:
xhgit committed 2026-11-08 01:01:27 +00:00
commit d04777247b
6 files changed
+233 -4

No files matched your search

@@ -179,9 +179,9 @@ public class ModelController {
private List<Map<String, Object>> models(boolean all) {
return db.queryForList(
"SELECT m.*,p.name AS provider_name,p.api_type,v.id AS"
+ " price_version_id,v.input_price,v.output_price,v.cache_read_price,v.cache_write_price"
+ " FROM ai_models m JOIN ai_providers p ON p.id=m.provider_id JOIN"
+ " ai_model_price_versions v ON v.id=m.current_price_version "
+ " price_version_id,v.input_price,v.output_price,v.cache_read_price,v.cache_write_price,"
+ " v.created_at AS price_effective_at FROM ai_models m JOIN ai_providers p ON"
+ " p.id=m.provider_id JOIN ai_model_price_versions v ON v.id=m.current_price_version "
+ (all ? "" : "WHERE m.enabled=TRUE AND p.enabled=TRUE ")
+ " ORDER BY m.created_at DESC");
}