@@ -123,13 +123,6 @@ it('tracks success', () => {
123123 ) ;
124124 tracker . trackSuccess ( ) ;
125125
126- expect ( mockTrack ) . toHaveBeenCalledWith (
127- '$ld:ai:generation' ,
128- testContext ,
129- { configKey, variationKey, version } ,
130- 1 ,
131- ) ;
132-
133126 expect ( mockTrack ) . toHaveBeenCalledWith (
134127 '$ld:ai:generation:success' ,
135128 testContext ,
@@ -167,13 +160,6 @@ it('tracks OpenAI usage', async () => {
167160 1000 ,
168161 ) ;
169162
170- expect ( mockTrack ) . toHaveBeenCalledWith (
171- '$ld:ai:generation' ,
172- testContext ,
173- { configKey, variationKey, version } ,
174- 1 ,
175- ) ;
176-
177163 expect ( mockTrack ) . toHaveBeenCalledWith (
178164 '$ld:ai:generation:success' ,
179165 testContext ,
@@ -234,13 +220,6 @@ it('tracks error when OpenAI metrics function throws', async () => {
234220 1000 ,
235221 ) ;
236222
237- expect ( mockTrack ) . toHaveBeenCalledWith (
238- '$ld:ai:generation' ,
239- testContext ,
240- { configKey, variationKey, version } ,
241- 1 ,
242- ) ;
243-
244223 expect ( mockTrack ) . toHaveBeenCalledWith (
245224 '$ld:ai:generation:error' ,
246225 testContext ,
@@ -281,13 +260,6 @@ it('tracks Bedrock conversation with successful response', () => {
281260
282261 tracker . trackBedrockConverseMetrics ( response ) ;
283262
284- expect ( mockTrack ) . toHaveBeenCalledWith (
285- '$ld:ai:generation' ,
286- testContext ,
287- { configKey, variationKey, version } ,
288- 1 ,
289- ) ;
290-
291263 expect ( mockTrack ) . toHaveBeenCalledWith (
292264 '$ld:ai:generation:success' ,
293265 testContext ,
@@ -346,13 +318,7 @@ it('tracks Bedrock conversation with error response', () => {
346318
347319 tracker . trackBedrockConverseMetrics ( response ) ;
348320
349- expect ( mockTrack ) . toHaveBeenCalledTimes ( 2 ) ;
350- expect ( mockTrack ) . toHaveBeenCalledWith (
351- '$ld:ai:generation' ,
352- testContext ,
353- { configKey, variationKey, version } ,
354- 1 ,
355- ) ;
321+ expect ( mockTrack ) . toHaveBeenCalledTimes ( 1 ) ;
356322
357323 expect ( mockTrack ) . toHaveBeenCalledWith (
358324 '$ld:ai:generation:error' ,
@@ -399,13 +365,6 @@ describe('Vercel AI SDK generateText', () => {
399365 1000 ,
400366 ) ;
401367
402- expect ( mockTrack ) . toHaveBeenCalledWith (
403- '$ld:ai:generation' ,
404- testContext ,
405- { configKey, variationKey, version } ,
406- 1 ,
407- ) ;
408-
409368 expect ( mockTrack ) . toHaveBeenCalledWith (
410369 '$ld:ai:generation:success' ,
411370 testContext ,
@@ -466,13 +425,6 @@ describe('Vercel AI SDK generateText', () => {
466425 1000 ,
467426 ) ;
468427
469- expect ( mockTrack ) . toHaveBeenCalledWith (
470- '$ld:ai:generation' ,
471- testContext ,
472- { configKey, variationKey, version } ,
473- 1 ,
474- ) ;
475-
476428 expect ( mockTrack ) . toHaveBeenCalledWith (
477429 '$ld:ai:generation:error' ,
478430 testContext ,
@@ -532,13 +484,6 @@ describe('Vercel AI SDK streamText', () => {
532484 1000 ,
533485 ) ;
534486
535- expect ( mockTrack ) . toHaveBeenCalledWith (
536- '$ld:ai:generation' ,
537- testContext ,
538- { configKey, variationKey, version } ,
539- 1 ,
540- ) ;
541-
542487 expect ( mockTrack ) . toHaveBeenCalledWith (
543488 '$ld:ai:generation:success' ,
544489 testContext ,
@@ -599,13 +544,6 @@ describe('Vercel AI SDK streamText', () => {
599544 1000 ,
600545 ) ;
601546
602- expect ( mockTrack ) . toHaveBeenCalledWith (
603- '$ld:ai:generation' ,
604- testContext ,
605- { configKey, variationKey, version } ,
606- 1 ,
607- ) ;
608-
609547 expect ( mockTrack ) . toHaveBeenCalledWith (
610548 '$ld:ai:generation:error' ,
611549 testContext ,
@@ -644,13 +582,6 @@ describe('Vercel AI SDK streamText', () => {
644582 1000 ,
645583 ) ;
646584
647- expect ( mockTrack ) . toHaveBeenCalledWith (
648- '$ld:ai:generation' ,
649- testContext ,
650- { configKey, variationKey, version } ,
651- 1 ,
652- ) ;
653-
654585 expect ( mockTrack ) . toHaveBeenCalledWith (
655586 '$ld:ai:generation:error' ,
656587 testContext ,
@@ -689,13 +620,6 @@ describe('Vercel AI SDK streamText', () => {
689620 1000 ,
690621 ) ;
691622
692- expect ( mockTrack ) . toHaveBeenCalledWith (
693- '$ld:ai:generation' ,
694- testContext ,
695- { configKey, variationKey, version } ,
696- 1 ,
697- ) ;
698-
699623 expect ( mockTrack ) . toHaveBeenCalledWith (
700624 '$ld:ai:generation:error' ,
701625 testContext ,
@@ -735,13 +659,6 @@ describe('Vercel AI SDK streamText', () => {
735659 1000 ,
736660 ) ;
737661
738- expect ( mockTrack ) . toHaveBeenCalledWith (
739- '$ld:ai:generation' ,
740- testContext ,
741- { configKey, variationKey, version } ,
742- 1 ,
743- ) ;
744-
745662 expect ( mockTrack ) . toHaveBeenCalledWith (
746663 '$ld:ai:generation:success' ,
747664 testContext ,
@@ -926,13 +843,6 @@ it('tracks error', () => {
926843 ) ;
927844 tracker . trackError ( ) ;
928845
929- expect ( mockTrack ) . toHaveBeenCalledWith (
930- '$ld:ai:generation' ,
931- testContext ,
932- { configKey, variationKey, version } ,
933- 1 ,
934- ) ;
935-
936846 expect ( mockTrack ) . toHaveBeenCalledWith (
937847 '$ld:ai:generation:error' ,
938848 testContext ,
0 commit comments