Update tokenlens to canary with server side fetching (#1196)

Co-authored-by: josh <josh@afterima.ge>
This commit is contained in:
Nicklas Scharpff 2025-09-15 11:32:28 +02:00 committed by GitHub
parent 445d63e620
commit 5ab695262f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 196 additions and 286 deletions

5
lib/usage.ts Normal file
View file

@ -0,0 +1,5 @@
import type { LanguageModelUsage } from 'ai';
import type { UsageData } from 'tokenlens/helpers';
// Server-merged usage: base usage + TokenLens summary + optional modelId
export type AppUsage = LanguageModelUsage & UsageData & { modelId?: string };