feat: add Cache TTL Override per account + bump VERSION to 0.1.83

- Account-level cache TTL override: rewrite Anthropic cache_creation
  token classification (5m↔1h) in streaming/non-streaming responses
- New DB field cache_ttl_overridden in usage_log for billing tracking
- Migration 055_add_cache_ttl_overridden
- Frontend: CacheTTL override toggle in account create/edit modals
- Ent schema regenerated for new usage_log fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Doe
2026-02-17 11:22:08 +03:00
parent a817cafe3d
commit 3d1f03c286
25 changed files with 533 additions and 19 deletions

View File

@@ -119,6 +119,10 @@ func (UsageLog) Fields() []ent.Field {
Optional().
Nillable(),
// Cache TTL Override 标记(管理员强制替换了缓存 TTL 计费)
field.Bool("cache_ttl_overridden").
Default(false),
// 时间戳(只有 created_at日志不可修改
field.Time("created_at").
Default(time.Now).