Show enabled models and current prices in the member console
Verify control plane / verify (push) Canceled after 0s
Verify control plane / verify (pull_request) Canceled after 0s

This commit is contained in:
WebUp Cloud committed 2026-11-08 08:57:24 +08:00
1 parent 572371d7af
commit 891e4896cc
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");
}