Model tiers: per-model credits and premium/vip roles

LLM_MODELS entries are now model[=credits][@role]. The default tiers follow
the model comparison rated by an astrologer: Claude Haiku 5.5 (free, 1
credit), GPT-5.6 Terra (premium, 3 credits), Claude Opus 5.5 (vip, 10 credits).
VIP includes premium, admins may use every model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-15 20:46:30 +00:00
co-authored by Claude Opus 5.5
parent b30a6c8fb1
commit 4aabb7343c
10 changed files with 180 additions and 29 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ pub async fn credits(State(state): St, auth: AuthUser) -> ApiResult<Json<Value>>
Ok(Json(json!({
"balance": balance,
"monthly_free_credits": state.config.monthly_free_credits,
"analysis_cost": state.config.analysis_cost,
"llm_models": state.config.llm_models,
"period": credits::current_period(),
"ledger": ledger.into_iter().map(|(id, delta, reason, period, analysis_id, note, at)| json!({
"id": id, "delta": delta, "reason": reason, "period": period,