feat: Adobe积分号不锁定额度 + Nano Banana双通道 + 前端显示额度

- Adobe不再区分视频/图片额度,移除ImageLimited/VideoLimited限制
- Adobe积分号quota耗尽不锁定(status不改为quota),只记录失败用于轮转
- Nano Banana 2/Pro 保留Runway通道,新增nano-banana-2/nano-banana-pro走Adobe
- Adobe模型重命名: runway-nano-banana-2, runway-nano-banana-pro
- 前端管理后台Adobe账号显示积分余额(之前固定显示—)
- README更新模型列表
This commit is contained in:
2026-08-02 20:09:03 +08:00
parent 359d95b8c1
commit 4987717d23
8 changed files with 79 additions and 54 deletions
+7 -4
View File
@@ -241,8 +241,8 @@ const leonardoDailyTokens = 150
func (r *TokenRepository) RecoverQuota(ctx context.Context) ([]model.TokenAccount, error) {
// Also pick up accounts that are only single-kind limited (image_limited /
// video_limited) — those keep status "active" and would otherwise never have
// their per-kind flag cleared. Adobe resets both kinds at once, so the shared
// reset time gates recovery for all of them.
// their per-kind flag cleared. This is legacy support; Adobe no longer sets
// per-kind limits.
var items []model.TokenAccount
if err := r.db.WithContext(ctx).
Where("status = ? OR image_limited = ? OR video_limited = ?", "quota", true, true).
@@ -269,8 +269,11 @@ func (r *TokenRepository) RecoverQuota(ctx context.Context) ([]model.TokenAccoun
patch := map[string]any{
"fails": 0,
"quota_recover_at": nil,
"image_limited": false,
"video_limited": false,
}
// For Adobe, also clear any legacy per-kind limit flags.
if t.Pool == "adobe" {
patch["image_limited"] = false
patch["video_limited"] = false
}
// Only flip status back to active if it was sunk to "quota" (both kinds
// limited); a single-kind limit left status untouched.