fix: secure assistant generation telemetry
This commit is contained in:
1 parent
ca8163c061
commit
4060f9299f
11 files changed
+181
-10
No files matched your search
@@ -30,6 +30,7 @@ export type AssistantRequestStep = {
|
||||
upstreamCost?: number;
|
||||
cacheDiscount?: number;
|
||||
generationId?: string;
|
||||
generationAccessToken?: string;
|
||||
routedProvider?: string;
|
||||
finishReason?: string;
|
||||
nativeFinishReason?: string;
|
||||
@@ -189,6 +190,9 @@ export const getAssistantTelemetry = (metadata: unknown): AssistantRequestTeleme
|
||||
? { cacheDiscount: getFiniteNonNegativeNumber(candidate.cacheDiscount) }
|
||||
: {}),
|
||||
...(typeof candidate.generationId === "string" ? { generationId: candidate.generationId } : {}),
|
||||
...(typeof candidate.generationAccessToken === "string"
|
||||
? { generationAccessToken: candidate.generationAccessToken }
|
||||
: {}),
|
||||
...(typeof candidate.routedProvider === "string" ? { routedProvider: candidate.routedProvider } : {}),
|
||||
...(typeof candidate.finishReason === "string" ? { finishReason: candidate.finishReason } : {}),
|
||||
...(typeof candidate.nativeFinishReason === "string"
|
||||
|
||||
Reference in new issue
Block a user