braintrust 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dev/dist/index.d.mts +26 -24
  2. package/dev/dist/index.d.ts +26 -24
  3. package/dev/dist/index.js +17 -10
  4. package/dev/dist/index.mjs +17 -10
  5. package/dist/browser.d.mts +77 -75
  6. package/dist/browser.d.ts +77 -75
  7. package/dist/{chunk-WEZHHYVU.js → chunk-CDBUTZMH.js} +94 -94
  8. package/dist/chunk-NB5AEJPK.mjs +19 -0
  9. package/dist/{chunk-K3GLD6I7.js → chunk-VKR7HDRS.js} +4 -4
  10. package/dist/{chunk-64O3VXT4.mjs → chunk-WKBXJQ57.mjs} +94 -94
  11. package/dist/cli.js +74 -67
  12. package/dist/getMachineId-bsd-7YM2UMB4.js +37 -0
  13. package/dist/{getMachineId-bsd-232NBLGZ.mjs → getMachineId-bsd-L7QQYES7.mjs} +4 -4
  14. package/dist/getMachineId-darwin-QV3NVG7H.js +37 -0
  15. package/dist/{getMachineId-darwin-C7F2HXMI.mjs → getMachineId-darwin-YXDFFCXM.mjs} +4 -4
  16. package/dist/getMachineId-linux-HKJ2YLJC.js +29 -0
  17. package/dist/{getMachineId-linux-VLB6DDHP.mjs → getMachineId-linux-LWEEVKPU.mjs} +3 -3
  18. package/dist/getMachineId-unsupported-EGJSIDYQ.mjs +20 -0
  19. package/dist/getMachineId-unsupported-TX34Q66M.js +20 -0
  20. package/dist/{getMachineId-win-4OSXYWMY.js → getMachineId-win-M5YW2KGK.js} +9 -9
  21. package/dist/{getMachineId-win-U7W7AAJX.mjs → getMachineId-win-UDA4B6X2.mjs} +4 -4
  22. package/dist/index.d.mts +164 -97
  23. package/dist/index.d.ts +164 -97
  24. package/dist/index.js +533 -443
  25. package/dist/index.mjs +360 -270
  26. package/package.json +3 -3
  27. package/dist/chunk-C527YOOG.mjs +0 -19
  28. package/dist/getMachineId-bsd-BCB626OV.js +0 -37
  29. package/dist/getMachineId-darwin-TV4MHNE6.js +0 -37
  30. package/dist/getMachineId-linux-RTVYWQL7.js +0 -29
  31. package/dist/getMachineId-unsupported-7RHYOLDR.js +0 -20
  32. package/dist/getMachineId-unsupported-IF5IGKUD.mjs +0 -20
package/dist/index.d.mts CHANGED
@@ -191,8 +191,6 @@ declare class LazyValue<T> {
191
191
  get hasSucceeded(): boolean;
192
192
  }
193
193
 
194
- /// <reference lib="dom" />
195
-
196
194
  type SetCurrentArg = {
197
195
  setCurrent?: boolean;
198
196
  };
@@ -385,10 +383,10 @@ declare const loginSchema: z.ZodObject<{
385
383
  fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
386
384
  }, "strict", z.ZodTypeAny, {
387
385
  collect: "some" | "none" | "all";
388
- fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
386
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
389
387
  }, {
390
388
  collect: "some" | "none" | "all";
391
- fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
389
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
392
390
  }>>>;
393
391
  }, "strict", z.ZodTypeAny, {
394
392
  appUrl: string;
@@ -400,7 +398,7 @@ declare const loginSchema: z.ZodObject<{
400
398
  orgId?: string | null | undefined;
401
399
  gitMetadataSettings?: {
402
400
  collect: "some" | "none" | "all";
403
- fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
401
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
404
402
  } | null | undefined;
405
403
  }, {
406
404
  appUrl: string;
@@ -412,7 +410,7 @@ declare const loginSchema: z.ZodObject<{
412
410
  orgId?: string | null | undefined;
413
411
  gitMetadataSettings?: {
414
412
  collect: "some" | "none" | "all";
415
- fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
413
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
416
414
  } | null | undefined;
417
415
  }>;
418
416
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
@@ -575,7 +573,7 @@ declare class Attachment extends BaseAttachment {
575
573
  * @returns The attachment status.
576
574
  */
577
575
  upload(): Promise<{
578
- upload_status: "error" | "done" | "uploading";
576
+ upload_status: "uploading" | "done" | "error";
579
577
  error_message?: string | undefined;
580
578
  }>;
581
579
  /**
@@ -651,21 +649,21 @@ declare const attachmentMetadataSchema: z.ZodObject<{
651
649
  upload_status: z.ZodEnum<["uploading", "done", "error"]>;
652
650
  error_message: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
653
651
  }, "strip", z.ZodTypeAny, {
654
- upload_status: "error" | "done" | "uploading";
652
+ upload_status: "uploading" | "done" | "error";
655
653
  error_message?: string | undefined;
656
654
  }, {
657
- upload_status: "error" | "done" | "uploading";
655
+ upload_status: "uploading" | "done" | "error";
658
656
  error_message?: string | null | undefined;
659
657
  }>;
660
658
  }, "strip", z.ZodTypeAny, {
661
659
  status: {
662
- upload_status: "error" | "done" | "uploading";
660
+ upload_status: "uploading" | "done" | "error";
663
661
  error_message?: string | undefined;
664
662
  };
665
663
  downloadUrl: string;
666
664
  }, {
667
665
  status: {
668
- upload_status: "error" | "done" | "uploading";
666
+ upload_status: "uploading" | "done" | "error";
669
667
  error_message?: string | null | undefined;
670
668
  };
671
669
  downloadUrl: string;
@@ -1776,13 +1774,13 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
1776
1774
  _xact_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1777
1775
  created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1778
1776
  }, "strip", z.ZodTypeAny, {
1779
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1777
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1780
1778
  object_id: string;
1781
1779
  id: string;
1782
1780
  _xact_id?: string | null | undefined;
1783
1781
  created?: string | null | undefined;
1784
1782
  }, {
1785
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1783
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1786
1784
  object_id: string;
1787
1785
  id: string;
1788
1786
  _xact_id?: string | null | undefined;
@@ -1799,10 +1797,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
1799
1797
  object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
1800
1798
  id: string;
1801
1799
  data: string;
1802
- event: "text_delta" | "reasoning_delta" | "json_delta" | "error" | "console" | "progress" | "start" | "done";
1800
+ event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
1803
1801
  output_type: "completion" | "score" | "any";
1804
1802
  origin?: {
1805
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1803
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1806
1804
  object_id: string;
1807
1805
  id: string;
1808
1806
  _xact_id?: string | null | undefined;
@@ -1814,10 +1812,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
1814
1812
  object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
1815
1813
  id: string;
1816
1814
  data: string;
1817
- event: "text_delta" | "reasoning_delta" | "json_delta" | "error" | "console" | "progress" | "start" | "done";
1815
+ event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
1818
1816
  output_type: "completion" | "score" | "any";
1819
1817
  origin?: {
1820
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1818
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1821
1819
  object_id: string;
1822
1820
  id: string;
1823
1821
  _xact_id?: string | null | undefined;
@@ -1832,10 +1830,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
1832
1830
  object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
1833
1831
  id: string;
1834
1832
  data: string;
1835
- event: "text_delta" | "reasoning_delta" | "json_delta" | "error" | "console" | "progress" | "start" | "done";
1833
+ event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
1836
1834
  output_type: "completion" | "score" | "any";
1837
1835
  origin?: {
1838
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1836
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1839
1837
  object_id: string;
1840
1838
  id: string;
1841
1839
  _xact_id?: string | null | undefined;
@@ -1850,10 +1848,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
1850
1848
  object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
1851
1849
  id: string;
1852
1850
  data: string;
1853
- event: "text_delta" | "reasoning_delta" | "json_delta" | "error" | "console" | "progress" | "start" | "done";
1851
+ event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
1854
1852
  output_type: "completion" | "score" | "any";
1855
1853
  origin?: {
1856
- object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs";
1854
+ object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
1857
1855
  object_id: string;
1858
1856
  id: string;
1859
1857
  _xact_id?: string | null | undefined;
@@ -2294,23 +2292,23 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
2294
2292
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
2295
2293
  }, "strip", z.ZodTypeAny, {
2296
2294
  url: string;
2297
- detail?: "auto" | "high" | "low" | undefined;
2295
+ detail?: "auto" | "low" | "high" | undefined;
2298
2296
  }, {
2299
2297
  url?: unknown;
2300
- detail?: "auto" | "high" | "low" | undefined;
2298
+ detail?: "auto" | "low" | "high" | undefined;
2301
2299
  }>;
2302
2300
  type: z.ZodLiteral<"image_url">;
2303
2301
  }, "strip", z.ZodTypeAny, {
2304
2302
  type: "image_url";
2305
2303
  image_url: {
2306
2304
  url: string;
2307
- detail?: "auto" | "high" | "low" | undefined;
2305
+ detail?: "auto" | "low" | "high" | undefined;
2308
2306
  };
2309
2307
  }, {
2310
2308
  type: "image_url";
2311
2309
  image_url: {
2312
2310
  url?: unknown;
2313
- detail?: "auto" | "high" | "low" | undefined;
2311
+ detail?: "auto" | "low" | "high" | undefined;
2314
2312
  };
2315
2313
  }>]>, "many">]>;
2316
2314
  role: z.ZodLiteral<"user">;
@@ -2326,7 +2324,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
2326
2324
  type: "image_url";
2327
2325
  image_url: {
2328
2326
  url: string;
2329
- detail?: "auto" | "high" | "low" | undefined;
2327
+ detail?: "auto" | "low" | "high" | undefined;
2330
2328
  };
2331
2329
  })[];
2332
2330
  role: "user";
@@ -2344,7 +2342,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
2344
2342
  type: "image_url";
2345
2343
  image_url: {
2346
2344
  url?: unknown;
2347
- detail?: "auto" | "high" | "low" | undefined;
2345
+ detail?: "auto" | "low" | "high" | undefined;
2348
2346
  };
2349
2347
  })[] | undefined;
2350
2348
  }>, z.ZodObject<{
@@ -2635,7 +2633,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
2635
2633
  type: "image_url";
2636
2634
  image_url: {
2637
2635
  url: string;
2638
- detail?: "auto" | "high" | "low" | undefined;
2636
+ detail?: "auto" | "low" | "high" | undefined;
2639
2637
  };
2640
2638
  })[];
2641
2639
  role: "user";
@@ -2718,7 +2716,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
2718
2716
  type: "image_url";
2719
2717
  image_url: {
2720
2718
  url?: unknown;
2721
- detail?: "auto" | "high" | "low" | undefined;
2719
+ detail?: "auto" | "low" | "high" | undefined;
2722
2720
  };
2723
2721
  })[] | undefined;
2724
2722
  } | {
@@ -2859,23 +2857,23 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
2859
2857
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
2860
2858
  }, "strip", z.ZodTypeAny, {
2861
2859
  url: string;
2862
- detail?: "auto" | "high" | "low" | undefined;
2860
+ detail?: "auto" | "low" | "high" | undefined;
2863
2861
  }, {
2864
2862
  url?: unknown;
2865
- detail?: "auto" | "high" | "low" | undefined;
2863
+ detail?: "auto" | "low" | "high" | undefined;
2866
2864
  }>;
2867
2865
  type: z.ZodLiteral<"image_url">;
2868
2866
  }, "strip", z.ZodTypeAny, {
2869
2867
  type: "image_url";
2870
2868
  image_url: {
2871
2869
  url: string;
2872
- detail?: "auto" | "high" | "low" | undefined;
2870
+ detail?: "auto" | "low" | "high" | undefined;
2873
2871
  };
2874
2872
  }, {
2875
2873
  type: "image_url";
2876
2874
  image_url: {
2877
2875
  url?: unknown;
2878
- detail?: "auto" | "high" | "low" | undefined;
2876
+ detail?: "auto" | "low" | "high" | undefined;
2879
2877
  };
2880
2878
  }>]>, "many">]>;
2881
2879
  role: z.ZodLiteral<"user">;
@@ -2891,7 +2889,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
2891
2889
  type: "image_url";
2892
2890
  image_url: {
2893
2891
  url: string;
2894
- detail?: "auto" | "high" | "low" | undefined;
2892
+ detail?: "auto" | "low" | "high" | undefined;
2895
2893
  };
2896
2894
  })[];
2897
2895
  role: "user";
@@ -2909,7 +2907,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
2909
2907
  type: "image_url";
2910
2908
  image_url: {
2911
2909
  url?: unknown;
2912
- detail?: "auto" | "high" | "low" | undefined;
2910
+ detail?: "auto" | "low" | "high" | undefined;
2913
2911
  };
2914
2912
  })[] | undefined;
2915
2913
  }>, z.ZodObject<{
@@ -3200,7 +3198,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
3200
3198
  type: "image_url";
3201
3199
  image_url: {
3202
3200
  url: string;
3203
- detail?: "auto" | "high" | "low" | undefined;
3201
+ detail?: "auto" | "low" | "high" | undefined;
3204
3202
  };
3205
3203
  })[];
3206
3204
  role: "user";
@@ -3283,7 +3281,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
3283
3281
  type: "image_url";
3284
3282
  image_url: {
3285
3283
  url?: unknown;
3286
- detail?: "auto" | "high" | "low" | undefined;
3284
+ detail?: "auto" | "low" | "high" | undefined;
3287
3285
  };
3288
3286
  })[] | undefined;
3289
3287
  } | {
@@ -3978,23 +3976,23 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
3978
3976
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
3979
3977
  }, "strip", z.ZodTypeAny, {
3980
3978
  url: string;
3981
- detail?: "auto" | "high" | "low" | undefined;
3979
+ detail?: "auto" | "low" | "high" | undefined;
3982
3980
  }, {
3983
3981
  url?: unknown;
3984
- detail?: "auto" | "high" | "low" | undefined;
3982
+ detail?: "auto" | "low" | "high" | undefined;
3985
3983
  }>;
3986
3984
  type: z.ZodLiteral<"image_url">;
3987
3985
  }, "strip", z.ZodTypeAny, {
3988
3986
  type: "image_url";
3989
3987
  image_url: {
3990
3988
  url: string;
3991
- detail?: "auto" | "high" | "low" | undefined;
3989
+ detail?: "auto" | "low" | "high" | undefined;
3992
3990
  };
3993
3991
  }, {
3994
3992
  type: "image_url";
3995
3993
  image_url: {
3996
3994
  url?: unknown;
3997
- detail?: "auto" | "high" | "low" | undefined;
3995
+ detail?: "auto" | "low" | "high" | undefined;
3998
3996
  };
3999
3997
  }>]>, "many">]>;
4000
3998
  role: z.ZodLiteral<"user">;
@@ -4010,7 +4008,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
4010
4008
  type: "image_url";
4011
4009
  image_url: {
4012
4010
  url: string;
4013
- detail?: "auto" | "high" | "low" | undefined;
4011
+ detail?: "auto" | "low" | "high" | undefined;
4014
4012
  };
4015
4013
  })[];
4016
4014
  role: "user";
@@ -4028,7 +4026,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
4028
4026
  type: "image_url";
4029
4027
  image_url: {
4030
4028
  url?: unknown;
4031
- detail?: "auto" | "high" | "low" | undefined;
4029
+ detail?: "auto" | "low" | "high" | undefined;
4032
4030
  };
4033
4031
  })[] | undefined;
4034
4032
  }>, z.ZodObject<{
@@ -4319,7 +4317,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
4319
4317
  type: "image_url";
4320
4318
  image_url: {
4321
4319
  url: string;
4322
- detail?: "auto" | "high" | "low" | undefined;
4320
+ detail?: "auto" | "low" | "high" | undefined;
4323
4321
  };
4324
4322
  })[];
4325
4323
  role: "user";
@@ -4402,7 +4400,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
4402
4400
  type: "image_url";
4403
4401
  image_url: {
4404
4402
  url?: unknown;
4405
- detail?: "auto" | "high" | "low" | undefined;
4403
+ detail?: "auto" | "low" | "high" | undefined;
4406
4404
  };
4407
4405
  })[] | undefined;
4408
4406
  } | {
@@ -5188,23 +5186,23 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
5188
5186
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
5189
5187
  }, "strip", z.ZodTypeAny, {
5190
5188
  url: string;
5191
- detail?: "auto" | "high" | "low" | undefined;
5189
+ detail?: "auto" | "low" | "high" | undefined;
5192
5190
  }, {
5193
5191
  url?: unknown;
5194
- detail?: "auto" | "high" | "low" | undefined;
5192
+ detail?: "auto" | "low" | "high" | undefined;
5195
5193
  }>;
5196
5194
  type: z.ZodLiteral<"image_url">;
5197
5195
  }, "strip", z.ZodTypeAny, {
5198
5196
  type: "image_url";
5199
5197
  image_url: {
5200
5198
  url: string;
5201
- detail?: "auto" | "high" | "low" | undefined;
5199
+ detail?: "auto" | "low" | "high" | undefined;
5202
5200
  };
5203
5201
  }, {
5204
5202
  type: "image_url";
5205
5203
  image_url: {
5206
5204
  url?: unknown;
5207
- detail?: "auto" | "high" | "low" | undefined;
5205
+ detail?: "auto" | "low" | "high" | undefined;
5208
5206
  };
5209
5207
  }>]>, "many">]>;
5210
5208
  role: z.ZodLiteral<"user">;
@@ -5220,7 +5218,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
5220
5218
  type: "image_url";
5221
5219
  image_url: {
5222
5220
  url: string;
5223
- detail?: "auto" | "high" | "low" | undefined;
5221
+ detail?: "auto" | "low" | "high" | undefined;
5224
5222
  };
5225
5223
  })[];
5226
5224
  role: "user";
@@ -5238,7 +5236,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
5238
5236
  type: "image_url";
5239
5237
  image_url: {
5240
5238
  url?: unknown;
5241
- detail?: "auto" | "high" | "low" | undefined;
5239
+ detail?: "auto" | "low" | "high" | undefined;
5242
5240
  };
5243
5241
  })[] | undefined;
5244
5242
  }>, z.ZodObject<{
@@ -5529,7 +5527,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
5529
5527
  type: "image_url";
5530
5528
  image_url: {
5531
5529
  url: string;
5532
- detail?: "auto" | "high" | "low" | undefined;
5530
+ detail?: "auto" | "low" | "high" | undefined;
5533
5531
  };
5534
5532
  })[];
5535
5533
  role: "user";
@@ -5612,7 +5610,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
5612
5610
  type: "image_url";
5613
5611
  image_url: {
5614
5612
  url?: unknown;
5615
- detail?: "auto" | "high" | "low" | undefined;
5613
+ detail?: "auto" | "low" | "high" | undefined;
5616
5614
  };
5617
5615
  })[] | undefined;
5618
5616
  } | {
@@ -6307,7 +6305,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
6307
6305
  type: "image_url";
6308
6306
  image_url: {
6309
6307
  url: string;
6310
- detail?: "auto" | "high" | "low" | undefined;
6308
+ detail?: "auto" | "low" | "high" | undefined;
6311
6309
  };
6312
6310
  })[];
6313
6311
  role: "user";
@@ -6518,7 +6516,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
6518
6516
  type: "image_url";
6519
6517
  image_url: {
6520
6518
  url?: unknown;
6521
- detail?: "auto" | "high" | "low" | undefined;
6519
+ detail?: "auto" | "low" | "high" | undefined;
6522
6520
  };
6523
6521
  })[] | undefined;
6524
6522
  } | {
@@ -6755,6 +6753,10 @@ interface EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends
6755
6753
  * Report progress that will show up in the playground.
6756
6754
  */
6757
6755
  reportProgress: (progress: TaskProgressEvent) => void;
6756
+ /**
6757
+ * The index of the current trial (0-based). This is useful when trialCount > 1.
6758
+ */
6759
+ trialIndex: number;
6758
6760
  }
6759
6761
  type EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
6760
6762
  output: Output;
@@ -7327,6 +7329,69 @@ declare class BraintrustSpanProcessor {
7327
7329
  shutdown(): Promise<void>;
7328
7330
  forceFlush(): Promise<void>;
7329
7331
  }
7332
+ /**
7333
+ * A trace exporter that sends OpenTelemetry spans to Braintrust.
7334
+ *
7335
+ * This exporter wraps the standard OTLP trace exporter and can be used with
7336
+ * any OpenTelemetry setup, including @vercel/otel's registerOTel function,
7337
+ * NodeSDK, or custom tracer providers. It can optionally filter spans to
7338
+ * only send AI-related telemetry.
7339
+ *
7340
+ * Environment Variables:
7341
+ * - BRAINTRUST_API_KEY: Your Braintrust API key
7342
+ * - BRAINTRUST_PARENT: Parent identifier (e.g., "project_name:test")
7343
+ * - BRAINTRUST_API_URL: Base URL for Braintrust API (defaults to https://api.braintrust.dev)
7344
+ *
7345
+ * @example With @vercel/otel:
7346
+ * ```typescript
7347
+ * import { registerOTel } from '@vercel/otel';
7348
+ * import { BraintrustExporter } from 'braintrust';
7349
+ *
7350
+ * export function register() {
7351
+ * registerOTel({
7352
+ * serviceName: 'my-app',
7353
+ * traceExporter: new BraintrustExporter({
7354
+ * filterAISpans: true,
7355
+ * }),
7356
+ * });
7357
+ * }
7358
+ * ```
7359
+ *
7360
+ * @example With NodeSDK:
7361
+ * ```typescript
7362
+ * import { NodeSDK } from '@opentelemetry/sdk-node';
7363
+ * import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
7364
+ * import { BraintrustExporter } from 'braintrust';
7365
+ *
7366
+ * const sdk = new NodeSDK({
7367
+ * spanProcessors: [
7368
+ * new BatchSpanProcessor(new BraintrustExporter({
7369
+ * apiKey: 'your-api-key',
7370
+ * parent: 'project_name:test'
7371
+ * }))
7372
+ * ]
7373
+ * });
7374
+ * ```
7375
+ */
7376
+ declare class BraintrustExporter {
7377
+ private static checkOtelAvailable;
7378
+ private readonly processor;
7379
+ private readonly spans;
7380
+ private readonly callbacks;
7381
+ constructor(options?: BraintrustSpanProcessorOptions);
7382
+ /**
7383
+ * Export spans to Braintrust by simulating span processor behavior.
7384
+ */
7385
+ export(spans: ReadableSpan[], resultCallback: (result: any) => void): void;
7386
+ /**
7387
+ * Shutdown the exporter.
7388
+ */
7389
+ shutdown(): Promise<void>;
7390
+ /**
7391
+ * Force flush the exporter.
7392
+ */
7393
+ forceFlush(): Promise<void>;
7394
+ }
7330
7395
 
7331
7396
  type braintrust_AISpanProcessor = AISpanProcessor;
7332
7397
  declare const braintrust_AISpanProcessor: typeof AISpanProcessor;
@@ -7339,6 +7404,8 @@ type braintrust_BaseAttachment = BaseAttachment;
7339
7404
  declare const braintrust_BaseAttachment: typeof BaseAttachment;
7340
7405
  declare const braintrust_BaseExperiment: typeof BaseExperiment;
7341
7406
  type braintrust_BaseMetadata = BaseMetadata;
7407
+ type braintrust_BraintrustExporter = BraintrustExporter;
7408
+ declare const braintrust_BraintrustExporter: typeof BraintrustExporter;
7342
7409
  type braintrust_BraintrustSpanProcessor = BraintrustSpanProcessor;
7343
7410
  declare const braintrust_BraintrustSpanProcessor: typeof BraintrustSpanProcessor;
7344
7411
  type braintrust_BraintrustState = BraintrustState;
@@ -7497,7 +7564,7 @@ declare const braintrust_wrapOpenAI: typeof wrapOpenAI;
7497
7564
  declare const braintrust_wrapOpenAIv4: typeof wrapOpenAIv4;
7498
7565
  declare const braintrust_wrapTraced: typeof wrapTraced;
7499
7566
  declare namespace braintrust {
7500
- export { braintrust_AISpanProcessor as AISpanProcessor, type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, braintrust_BaseExperiment as BaseExperiment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustSpanProcessor as BraintrustSpanProcessor, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, braintrust_CodeFunction as CodeFunction, type braintrust_CodeOpts as CodeOpts, braintrust_CodePrompt as CodePrompt, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_CreateProjectOpts as CreateProjectOpts, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetSummary as DatasetSummary, type braintrust_DefaultMetadataType as DefaultMetadataType, type braintrust_DefaultPromptArgs as DefaultPromptArgs, braintrust_ERR_PERMALINK as ERR_PERMALINK, type braintrust_EndSpanArgs as EndSpanArgs, braintrust_Eval as Eval, type braintrust_EvalCase as EvalCase, type braintrust_EvalHooks as EvalHooks, type braintrust_EvalResult as EvalResult, braintrust_EvalResultWithSummary as EvalResultWithSummary, type braintrust_EvalScorer as EvalScorer, type braintrust_EvalScorerArgs as EvalScorerArgs, type braintrust_EvalTask as EvalTask, type braintrust_Evaluator as Evaluator, type braintrust_EvaluatorDef as EvaluatorDef, type braintrust_EvaluatorFile as EvaluatorFile, braintrust_Experiment as Experiment, type braintrust_ExperimentSummary as ExperimentSummary, type braintrust_Exportable as Exportable, braintrust_ExternalAttachment as ExternalAttachment, type braintrust_ExternalAttachmentParams as ExternalAttachmentParams, braintrust_FailedHTTPResponse as FailedHTTPResponse, type braintrust_FullInitOptions as FullInitOptions, type braintrust_FullLoginOptions as FullLoginOptions, type braintrust_FunctionEvent as FunctionEvent, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_InitOptions as InitOptions, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogOptions as LogOptions, braintrust_Logger as Logger, type braintrust_LoginOptions as LoginOptions, type braintrust_MetricSummary as MetricSummary, braintrust_NOOP_SPAN as NOOP_SPAN, braintrust_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, braintrust_NoopSpan as NoopSpan, type braintrust_ObjectMetadata as ObjectMetadata, braintrust_Project as Project, braintrust_ProjectNameIdMap as ProjectNameIdMap, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, braintrust_PromptBuilder as PromptBuilder, type braintrust_PromptContents as PromptContents, type braintrust_PromptDefinition as PromptDefinition, type braintrust_PromptDefinitionWithTools as PromptDefinitionWithTools, type braintrust_PromptOpts as PromptOpts, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, braintrust_Reporter as Reporter, type braintrust_ReporterBody as ReporterBody, type braintrust_ScoreSummary as ScoreSummary, braintrust_ScorerBuilder as ScorerBuilder, type braintrust_ScorerOpts as ScorerOpts, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type Span$1 as Span, type braintrust_SpanContext as SpanContext, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, braintrust_ToolBuilder as ToolBuilder, type braintrust_WithTransactionId as WithTransactionId, braintrust_X_CACHED_HEADER as X_CACHED_HEADER, braintrust__exportsForTestingOnly as _exportsForTestingOnly, braintrust__internalGetGlobalState as _internalGetGlobalState, braintrust__internalSetInitialState as _internalSetInitialState, braintrust_braintrustStreamChunkSchema as braintrustStreamChunkSchema, braintrust_buildLocalSummary as buildLocalSummary, braintrust_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_defaultErrorScoreHandler as defaultErrorScoreHandler, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_flush as flush, braintrust_getSpanParentObject as getSpanParentObject, graphFramework as graph, braintrust_init as init, braintrust_initDataset as initDataset, braintrust_initExperiment as initExperiment, braintrust_initFunction as initFunction, braintrust_initLogger as initLogger, braintrust_invoke as invoke, braintrust_loadPrompt as loadPrompt, braintrust_log as log, braintrust_logError as logError, braintrust_login as login, braintrust_loginToState as loginToState, braintrust_newId as newId, braintrust_parseCachedHeader as parseCachedHeader, braintrust_permalink as permalink, braintrust_projects as projects, braintrust_promptContentsSchema as promptContentsSchema, braintrust_promptDefinitionSchema as promptDefinitionSchema, braintrust_promptDefinitionToPromptData as promptDefinitionToPromptData, braintrust_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, braintrust_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_reportFailures as reportFailures, braintrust_runEvaluator as runEvaluator, braintrust_setFetch as setFetch, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, braintrust_toolFunctionDefinitionSchema as toolFunctionDefinitionSchema, braintrust_traceable as traceable, braintrust_traced as traced, braintrust_updateSpan as updateSpan, braintrust_withCurrent as withCurrent, braintrust_withDataset as withDataset, braintrust_withExperiment as withExperiment, braintrust_withLogger as withLogger, braintrust_withParent as withParent, braintrust_wrapAISDKModel as wrapAISDKModel, braintrust_wrapAnthropic as wrapAnthropic, braintrust_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
7567
+ export { braintrust_AISpanProcessor as AISpanProcessor, type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, braintrust_BaseExperiment as BaseExperiment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustExporter as BraintrustExporter, braintrust_BraintrustSpanProcessor as BraintrustSpanProcessor, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, braintrust_CodeFunction as CodeFunction, type braintrust_CodeOpts as CodeOpts, braintrust_CodePrompt as CodePrompt, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_CreateProjectOpts as CreateProjectOpts, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetSummary as DatasetSummary, type braintrust_DefaultMetadataType as DefaultMetadataType, type braintrust_DefaultPromptArgs as DefaultPromptArgs, braintrust_ERR_PERMALINK as ERR_PERMALINK, type braintrust_EndSpanArgs as EndSpanArgs, braintrust_Eval as Eval, type braintrust_EvalCase as EvalCase, type braintrust_EvalHooks as EvalHooks, type braintrust_EvalResult as EvalResult, braintrust_EvalResultWithSummary as EvalResultWithSummary, type braintrust_EvalScorer as EvalScorer, type braintrust_EvalScorerArgs as EvalScorerArgs, type braintrust_EvalTask as EvalTask, type braintrust_Evaluator as Evaluator, type braintrust_EvaluatorDef as EvaluatorDef, type braintrust_EvaluatorFile as EvaluatorFile, braintrust_Experiment as Experiment, type braintrust_ExperimentSummary as ExperimentSummary, type braintrust_Exportable as Exportable, braintrust_ExternalAttachment as ExternalAttachment, type braintrust_ExternalAttachmentParams as ExternalAttachmentParams, braintrust_FailedHTTPResponse as FailedHTTPResponse, type braintrust_FullInitOptions as FullInitOptions, type braintrust_FullLoginOptions as FullLoginOptions, type braintrust_FunctionEvent as FunctionEvent, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_InitOptions as InitOptions, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogOptions as LogOptions, braintrust_Logger as Logger, type braintrust_LoginOptions as LoginOptions, type braintrust_MetricSummary as MetricSummary, braintrust_NOOP_SPAN as NOOP_SPAN, braintrust_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, braintrust_NoopSpan as NoopSpan, type braintrust_ObjectMetadata as ObjectMetadata, braintrust_Project as Project, braintrust_ProjectNameIdMap as ProjectNameIdMap, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, braintrust_PromptBuilder as PromptBuilder, type braintrust_PromptContents as PromptContents, type braintrust_PromptDefinition as PromptDefinition, type braintrust_PromptDefinitionWithTools as PromptDefinitionWithTools, type braintrust_PromptOpts as PromptOpts, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, braintrust_Reporter as Reporter, type braintrust_ReporterBody as ReporterBody, type braintrust_ScoreSummary as ScoreSummary, braintrust_ScorerBuilder as ScorerBuilder, type braintrust_ScorerOpts as ScorerOpts, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type Span$1 as Span, type braintrust_SpanContext as SpanContext, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, braintrust_ToolBuilder as ToolBuilder, type braintrust_WithTransactionId as WithTransactionId, braintrust_X_CACHED_HEADER as X_CACHED_HEADER, braintrust__exportsForTestingOnly as _exportsForTestingOnly, braintrust__internalGetGlobalState as _internalGetGlobalState, braintrust__internalSetInitialState as _internalSetInitialState, braintrust_braintrustStreamChunkSchema as braintrustStreamChunkSchema, braintrust_buildLocalSummary as buildLocalSummary, braintrust_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_defaultErrorScoreHandler as defaultErrorScoreHandler, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_flush as flush, braintrust_getSpanParentObject as getSpanParentObject, graphFramework as graph, braintrust_init as init, braintrust_initDataset as initDataset, braintrust_initExperiment as initExperiment, braintrust_initFunction as initFunction, braintrust_initLogger as initLogger, braintrust_invoke as invoke, braintrust_loadPrompt as loadPrompt, braintrust_log as log, braintrust_logError as logError, braintrust_login as login, braintrust_loginToState as loginToState, braintrust_newId as newId, braintrust_parseCachedHeader as parseCachedHeader, braintrust_permalink as permalink, braintrust_projects as projects, braintrust_promptContentsSchema as promptContentsSchema, braintrust_promptDefinitionSchema as promptDefinitionSchema, braintrust_promptDefinitionToPromptData as promptDefinitionToPromptData, braintrust_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, braintrust_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_reportFailures as reportFailures, braintrust_runEvaluator as runEvaluator, braintrust_setFetch as setFetch, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, braintrust_toolFunctionDefinitionSchema as toolFunctionDefinitionSchema, braintrust_traceable as traceable, braintrust_traced as traced, braintrust_updateSpan as updateSpan, braintrust_withCurrent as withCurrent, braintrust_withDataset as withDataset, braintrust_withExperiment as withExperiment, braintrust_withLogger as withLogger, braintrust_withParent as withParent, braintrust_wrapAISDKModel as wrapAISDKModel, braintrust_wrapAnthropic as wrapAnthropic, braintrust_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
7501
7568
  }
7502
7569
 
7503
7570
  type EvaluatorManifest = Record<string, EvaluatorDef<unknown, unknown, unknown, BaseMetadata>>;
@@ -7590,23 +7657,23 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
7590
7657
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
7591
7658
  }, "strip", z.ZodTypeAny, {
7592
7659
  url: string;
7593
- detail?: "auto" | "high" | "low" | undefined;
7660
+ detail?: "auto" | "low" | "high" | undefined;
7594
7661
  }, {
7595
7662
  url?: unknown;
7596
- detail?: "auto" | "high" | "low" | undefined;
7663
+ detail?: "auto" | "low" | "high" | undefined;
7597
7664
  }>;
7598
7665
  type: z.ZodLiteral<"image_url">;
7599
7666
  }, "strip", z.ZodTypeAny, {
7600
7667
  type: "image_url";
7601
7668
  image_url: {
7602
7669
  url: string;
7603
- detail?: "auto" | "high" | "low" | undefined;
7670
+ detail?: "auto" | "low" | "high" | undefined;
7604
7671
  };
7605
7672
  }, {
7606
7673
  type: "image_url";
7607
7674
  image_url: {
7608
7675
  url?: unknown;
7609
- detail?: "auto" | "high" | "low" | undefined;
7676
+ detail?: "auto" | "low" | "high" | undefined;
7610
7677
  };
7611
7678
  }>]>, "many">]>;
7612
7679
  role: z.ZodLiteral<"user">;
@@ -7622,7 +7689,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
7622
7689
  type: "image_url";
7623
7690
  image_url: {
7624
7691
  url: string;
7625
- detail?: "auto" | "high" | "low" | undefined;
7692
+ detail?: "auto" | "low" | "high" | undefined;
7626
7693
  };
7627
7694
  })[];
7628
7695
  role: "user";
@@ -7640,7 +7707,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
7640
7707
  type: "image_url";
7641
7708
  image_url: {
7642
7709
  url?: unknown;
7643
- detail?: "auto" | "high" | "low" | undefined;
7710
+ detail?: "auto" | "low" | "high" | undefined;
7644
7711
  };
7645
7712
  })[] | undefined;
7646
7713
  }>, z.ZodObject<{
@@ -7943,7 +8010,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
7943
8010
  type: "image_url";
7944
8011
  image_url: {
7945
8012
  url: string;
7946
- detail?: "auto" | "high" | "low" | undefined;
8013
+ detail?: "auto" | "low" | "high" | undefined;
7947
8014
  };
7948
8015
  })[];
7949
8016
  role: "user";
@@ -8028,7 +8095,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
8028
8095
  type: "image_url";
8029
8096
  image_url: {
8030
8097
  url?: unknown;
8031
- detail?: "auto" | "high" | "low" | undefined;
8098
+ detail?: "auto" | "low" | "high" | undefined;
8032
8099
  };
8033
8100
  })[] | undefined;
8034
8101
  } | {
@@ -8831,7 +8898,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
8831
8898
  type: "image_url";
8832
8899
  image_url: {
8833
8900
  url: string;
8834
- detail?: "auto" | "high" | "low" | undefined;
8901
+ detail?: "auto" | "low" | "high" | undefined;
8835
8902
  };
8836
8903
  })[];
8837
8904
  role: "user";
@@ -9052,7 +9119,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
9052
9119
  type: "image_url";
9053
9120
  image_url: {
9054
9121
  url?: unknown;
9055
- detail?: "auto" | "high" | "low" | undefined;
9122
+ detail?: "auto" | "low" | "high" | undefined;
9056
9123
  };
9057
9124
  })[] | undefined;
9058
9125
  } | {
@@ -9273,7 +9340,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
9273
9340
  type: "image_url";
9274
9341
  image_url: {
9275
9342
  url: string;
9276
- detail?: "auto" | "high" | "low" | undefined;
9343
+ detail?: "auto" | "low" | "high" | undefined;
9277
9344
  };
9278
9345
  })[];
9279
9346
  role: "user";
@@ -9498,7 +9565,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
9498
9565
  type: "image_url";
9499
9566
  image_url: {
9500
9567
  url?: unknown;
9501
- detail?: "auto" | "high" | "low" | undefined;
9568
+ detail?: "auto" | "low" | "high" | undefined;
9502
9569
  };
9503
9570
  })[] | undefined;
9504
9571
  } | {
@@ -9673,23 +9740,23 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
9673
9740
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
9674
9741
  }, "strip", z.ZodTypeAny, {
9675
9742
  url: string;
9676
- detail?: "auto" | "high" | "low" | undefined;
9743
+ detail?: "auto" | "low" | "high" | undefined;
9677
9744
  }, {
9678
9745
  url?: unknown;
9679
- detail?: "auto" | "high" | "low" | undefined;
9746
+ detail?: "auto" | "low" | "high" | undefined;
9680
9747
  }>;
9681
9748
  type: z.ZodLiteral<"image_url">;
9682
9749
  }, "strip", z.ZodTypeAny, {
9683
9750
  type: "image_url";
9684
9751
  image_url: {
9685
9752
  url: string;
9686
- detail?: "auto" | "high" | "low" | undefined;
9753
+ detail?: "auto" | "low" | "high" | undefined;
9687
9754
  };
9688
9755
  }, {
9689
9756
  type: "image_url";
9690
9757
  image_url: {
9691
9758
  url?: unknown;
9692
- detail?: "auto" | "high" | "low" | undefined;
9759
+ detail?: "auto" | "low" | "high" | undefined;
9693
9760
  };
9694
9761
  }>]>, "many">]>;
9695
9762
  role: z.ZodLiteral<"user">;
@@ -9705,7 +9772,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
9705
9772
  type: "image_url";
9706
9773
  image_url: {
9707
9774
  url: string;
9708
- detail?: "auto" | "high" | "low" | undefined;
9775
+ detail?: "auto" | "low" | "high" | undefined;
9709
9776
  };
9710
9777
  })[];
9711
9778
  role: "user";
@@ -9723,7 +9790,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
9723
9790
  type: "image_url";
9724
9791
  image_url: {
9725
9792
  url?: unknown;
9726
- detail?: "auto" | "high" | "low" | undefined;
9793
+ detail?: "auto" | "low" | "high" | undefined;
9727
9794
  };
9728
9795
  })[] | undefined;
9729
9796
  }>, z.ZodObject<{
@@ -10026,7 +10093,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
10026
10093
  type: "image_url";
10027
10094
  image_url: {
10028
10095
  url: string;
10029
- detail?: "auto" | "high" | "low" | undefined;
10096
+ detail?: "auto" | "low" | "high" | undefined;
10030
10097
  };
10031
10098
  })[];
10032
10099
  role: "user";
@@ -10111,7 +10178,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
10111
10178
  type: "image_url";
10112
10179
  image_url: {
10113
10180
  url?: unknown;
10114
- detail?: "auto" | "high" | "low" | undefined;
10181
+ detail?: "auto" | "low" | "high" | undefined;
10115
10182
  };
10116
10183
  })[] | undefined;
10117
10184
  } | {
@@ -10914,7 +10981,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
10914
10981
  type: "image_url";
10915
10982
  image_url: {
10916
10983
  url: string;
10917
- detail?: "auto" | "high" | "low" | undefined;
10984
+ detail?: "auto" | "low" | "high" | undefined;
10918
10985
  };
10919
10986
  })[];
10920
10987
  role: "user";
@@ -11135,7 +11202,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
11135
11202
  type: "image_url";
11136
11203
  image_url: {
11137
11204
  url?: unknown;
11138
- detail?: "auto" | "high" | "low" | undefined;
11205
+ detail?: "auto" | "low" | "high" | undefined;
11139
11206
  };
11140
11207
  })[] | undefined;
11141
11208
  } | {
@@ -11356,7 +11423,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
11356
11423
  type: "image_url";
11357
11424
  image_url: {
11358
11425
  url: string;
11359
- detail?: "auto" | "high" | "low" | undefined;
11426
+ detail?: "auto" | "low" | "high" | undefined;
11360
11427
  };
11361
11428
  })[];
11362
11429
  role: "user";
@@ -11581,7 +11648,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
11581
11648
  type: "image_url";
11582
11649
  image_url: {
11583
11650
  url?: unknown;
11584
- detail?: "auto" | "high" | "low" | undefined;
11651
+ detail?: "auto" | "low" | "high" | undefined;
11585
11652
  };
11586
11653
  })[] | undefined;
11587
11654
  } | {
@@ -11819,7 +11886,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
11819
11886
  type: "image_url";
11820
11887
  image_url: {
11821
11888
  url: string;
11822
- detail?: "auto" | "high" | "low" | undefined;
11889
+ detail?: "auto" | "low" | "high" | undefined;
11823
11890
  };
11824
11891
  })[];
11825
11892
  role: "user";
@@ -12051,7 +12118,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
12051
12118
  type: "image_url";
12052
12119
  image_url: {
12053
12120
  url?: unknown;
12054
- detail?: "auto" | "high" | "low" | undefined;
12121
+ detail?: "auto" | "low" | "high" | undefined;
12055
12122
  };
12056
12123
  })[] | undefined;
12057
12124
  } | {
@@ -12217,23 +12284,23 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
12217
12284
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
12218
12285
  }, "strip", z.ZodTypeAny, {
12219
12286
  url: string;
12220
- detail?: "auto" | "high" | "low" | undefined;
12287
+ detail?: "auto" | "low" | "high" | undefined;
12221
12288
  }, {
12222
12289
  url?: unknown;
12223
- detail?: "auto" | "high" | "low" | undefined;
12290
+ detail?: "auto" | "low" | "high" | undefined;
12224
12291
  }>;
12225
12292
  type: z.ZodLiteral<"image_url">;
12226
12293
  }, "strip", z.ZodTypeAny, {
12227
12294
  type: "image_url";
12228
12295
  image_url: {
12229
12296
  url: string;
12230
- detail?: "auto" | "high" | "low" | undefined;
12297
+ detail?: "auto" | "low" | "high" | undefined;
12231
12298
  };
12232
12299
  }, {
12233
12300
  type: "image_url";
12234
12301
  image_url: {
12235
12302
  url?: unknown;
12236
- detail?: "auto" | "high" | "low" | undefined;
12303
+ detail?: "auto" | "low" | "high" | undefined;
12237
12304
  };
12238
12305
  }>]>, "many">]>;
12239
12306
  role: z.ZodLiteral<"user">;
@@ -12249,7 +12316,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
12249
12316
  type: "image_url";
12250
12317
  image_url: {
12251
12318
  url: string;
12252
- detail?: "auto" | "high" | "low" | undefined;
12319
+ detail?: "auto" | "low" | "high" | undefined;
12253
12320
  };
12254
12321
  })[];
12255
12322
  role: "user";
@@ -12267,7 +12334,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
12267
12334
  type: "image_url";
12268
12335
  image_url: {
12269
12336
  url?: unknown;
12270
- detail?: "auto" | "high" | "low" | undefined;
12337
+ detail?: "auto" | "low" | "high" | undefined;
12271
12338
  };
12272
12339
  })[] | undefined;
12273
12340
  }>, z.ZodObject<{
@@ -12570,7 +12637,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
12570
12637
  type: "image_url";
12571
12638
  image_url: {
12572
12639
  url: string;
12573
- detail?: "auto" | "high" | "low" | undefined;
12640
+ detail?: "auto" | "low" | "high" | undefined;
12574
12641
  };
12575
12642
  })[];
12576
12643
  role: "user";
@@ -12655,7 +12722,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
12655
12722
  type: "image_url";
12656
12723
  image_url: {
12657
12724
  url?: unknown;
12658
- detail?: "auto" | "high" | "low" | undefined;
12725
+ detail?: "auto" | "low" | "high" | undefined;
12659
12726
  };
12660
12727
  })[] | undefined;
12661
12728
  } | {
@@ -13458,7 +13525,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
13458
13525
  type: "image_url";
13459
13526
  image_url: {
13460
13527
  url: string;
13461
- detail?: "auto" | "high" | "low" | undefined;
13528
+ detail?: "auto" | "low" | "high" | undefined;
13462
13529
  };
13463
13530
  })[];
13464
13531
  role: "user";
@@ -13679,7 +13746,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
13679
13746
  type: "image_url";
13680
13747
  image_url: {
13681
13748
  url?: unknown;
13682
- detail?: "auto" | "high" | "low" | undefined;
13749
+ detail?: "auto" | "low" | "high" | undefined;
13683
13750
  };
13684
13751
  })[] | undefined;
13685
13752
  } | {
@@ -13900,7 +13967,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
13900
13967
  type: "image_url";
13901
13968
  image_url: {
13902
13969
  url: string;
13903
- detail?: "auto" | "high" | "low" | undefined;
13970
+ detail?: "auto" | "low" | "high" | undefined;
13904
13971
  };
13905
13972
  })[];
13906
13973
  role: "user";
@@ -14125,7 +14192,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
14125
14192
  type: "image_url";
14126
14193
  image_url: {
14127
14194
  url?: unknown;
14128
- detail?: "auto" | "high" | "low" | undefined;
14195
+ detail?: "auto" | "low" | "high" | undefined;
14129
14196
  };
14130
14197
  })[] | undefined;
14131
14198
  } | {
@@ -14363,7 +14430,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
14363
14430
  type: "image_url";
14364
14431
  image_url: {
14365
14432
  url: string;
14366
- detail?: "auto" | "high" | "low" | undefined;
14433
+ detail?: "auto" | "low" | "high" | undefined;
14367
14434
  };
14368
14435
  })[];
14369
14436
  role: "user";
@@ -14595,7 +14662,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
14595
14662
  type: "image_url";
14596
14663
  image_url: {
14597
14664
  url?: unknown;
14598
- detail?: "auto" | "high" | "low" | undefined;
14665
+ detail?: "auto" | "low" | "high" | undefined;
14599
14666
  };
14600
14667
  })[] | undefined;
14601
14668
  } | {
@@ -14725,4 +14792,4 @@ type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
14725
14792
  * @module braintrust
14726
14793
  */
14727
14794
 
14728
- export { AISpanProcessor, type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustSpanProcessor, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type CreateProjectOpts, type DataSummary, Dataset, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, type FunctionEvent, INTERNAL_BTQL_LIMIT, type InitOptions, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, Reporter, type ReporterBody, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span$1 as Span, type SpanContext, SpanImpl, type StartSpanArgs, TestBackgroundLogger, ToolBuilder, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, buildLocalSummary, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getSpanParentObject, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, renderMessage, renderPromptParams, reportFailures, runEvaluator, setFetch, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDKModel, wrapAnthropic, wrapOpenAI, wrapOpenAIv4, wrapTraced };
14795
+ export { AISpanProcessor, type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustExporter, BraintrustSpanProcessor, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type CreateProjectOpts, type DataSummary, Dataset, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, type FunctionEvent, INTERNAL_BTQL_LIMIT, type InitOptions, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, Reporter, type ReporterBody, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span$1 as Span, type SpanContext, SpanImpl, type StartSpanArgs, TestBackgroundLogger, ToolBuilder, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, buildLocalSummary, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getSpanParentObject, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, renderMessage, renderPromptParams, reportFailures, runEvaluator, setFetch, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDKModel, wrapAnthropic, wrapOpenAI, wrapOpenAIv4, wrapTraced };