Show enabled models and current prices in the member console
This commit is contained in:
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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user