Skip to content

Commit 7b4f75e

Browse files
committed
chore: Add modelName, sessionId, requestId usage
1 parent 485dcc6 commit 7b4f75e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/gold-gorillas-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
Add modelName, sessionId, requestId to usage

packages/service-utils/src/core/usage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,8 @@ export const usageEventSchema = z.object({
7878
providerIp: z.string().optional(),
7979
promptTokens: z.number().int().nonnegative().optional(),
8080
completionTokens: z.number().int().nonnegative().optional(),
81+
modelName: z.string().optional(),
82+
sessionId: z.string().optional(),
83+
requestId: z.string().optional(),
8184
});
8285
export type UsageEvent = z.infer<typeof usageEventSchema>;

0 commit comments

Comments
 (0)