promptfoo 0.120.24 → 0.120.26

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 (304) hide show
  1. package/README.md +35 -22
  2. package/dist/src/{ListApp-55OAHww3.js → ListApp-D3DG0F8h.js} +1 -1
  3. package/dist/src/{accounts-BwVGYllP.cjs → accounts-BzEY8H3v.cjs} +5 -5
  4. package/dist/src/{accounts-BOlMHrvn.js → accounts-DHHiXsy6.js} +6 -6
  5. package/dist/src/{accounts-DxR9x_En.js → accounts-R3gfCR_g.js} +5 -5
  6. package/dist/src/{agentic-utils-t9-1raty.js → agentic-utils-D6_gzOUF.js} +3 -3
  7. package/dist/src/{agents-DMpQ860j.cjs → agents-C7BiinFI.cjs} +7 -7
  8. package/dist/src/{agents-9Z7pO8yx.js → agents-Cao4i7AX.js} +8 -8
  9. package/dist/src/{agents-DjExVR3v.js → agents-Cnph5GLD.js} +2 -2
  10. package/dist/src/{agents-CI0Ad69d.cjs → agents-CwM7re15.cjs} +5 -5
  11. package/dist/src/{agents-BwI-Tm5m.js → agents-DETIQHqF.js} +7 -7
  12. package/dist/src/{agents-CRAmwjo-.js → agents-DYIT-hQy.js} +6 -6
  13. package/dist/src/{agents-BbIpDhgp.js → agents-GiUianme.js} +5 -5
  14. package/dist/src/{agents-yL5DzIKY.js → agents-v4cW_ZgC.js} +2 -2
  15. package/dist/src/{aimlapi-xHHqwNg8.js → aimlapi-CMJpKK-B.js} +13 -13
  16. package/dist/src/{aimlapi-BM9P45Bp.js → aimlapi-DMF6v_vb.js} +15 -15
  17. package/dist/src/{aimlapi-DKo7IxJg.cjs → aimlapi-DoGLcQW_.cjs} +14 -14
  18. package/dist/src/{aimlapi-ivzDkqbs.js → aimlapi-DtSf1ykJ.js} +2 -2
  19. package/dist/src/app/assets/index-BOgkICuY.css +1 -0
  20. package/dist/src/app/assets/index-CSgqn_Vd.js +428 -0
  21. package/dist/src/app/assets/{vendor-charts-DnwydkkY.js → vendor-charts-CYyo8R8v.js} +1 -1
  22. package/dist/src/app/assets/{vendor-markdown-DjKAU15k.js → vendor-markdown-DSmzq4Jh.js} +1 -1
  23. package/dist/src/app/assets/vendor-react-AtKqiNEf.js +4 -0
  24. package/dist/src/app/assets/{vendor-syntax-Dc86c4Bu.js → vendor-syntax-D06x6TQF.js} +1 -1
  25. package/dist/src/app/index.html +6 -6
  26. package/dist/src/app/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/src/{audio-B3QGL6Nl.cjs → audio-BWjyvHn9.cjs} +4 -4
  28. package/dist/src/{audio-C-1oBiVZ.js → audio-BrJBFN2b.js} +4 -4
  29. package/dist/src/{audio-DnfDVjhL.js → audio-DUH4q0Xq.js} +5 -5
  30. package/dist/src/{audio-DQWHfAr8.js → audio-U580w8jM.js} +2 -2
  31. package/dist/src/{base-DHam07ip.js → base-BaXmtXYp.js} +3 -3
  32. package/dist/src/{base-BjsgxJp9.js → base-Dtp8b4_N.js} +3 -3
  33. package/dist/src/{base-Bso8ccGu.cjs → base-f71xxWai.cjs} +3 -3
  34. package/dist/src/{blobs-DOdc-E8L.cjs → blobs-673H0jCl.cjs} +3 -3
  35. package/dist/src/{blobs-Dcm272OH.js → blobs-C9J2mVgo.js} +3 -3
  36. package/dist/src/{blobs-MlVQyoSc.js → blobs-kt8v3UyH.js} +3 -3
  37. package/dist/src/{cache-KNsTJLKP.cjs → cache-7xULbvt3.cjs} +35 -8
  38. package/dist/src/{cache-BMl3AIo5.js → cache-BLLayYEN.js} +24 -9
  39. package/dist/src/{cache-B0ptF7sO.js → cache-BUPcq0Ad.js} +3 -3
  40. package/dist/src/cache-CVfRb-HD.cjs +6 -0
  41. package/dist/src/{cache-DPztwHxt.js → cache-O4EuX2JV.js} +4 -4
  42. package/dist/src/{cache-DHm8Pc8l.js → cache-mIszOnuz.js} +5 -22
  43. package/dist/src/{chat-DOQIJx7O.cjs → chat-C4zqjObh.cjs} +10 -10
  44. package/dist/src/{chat-DDGU7Tik.js → chat-C8Ei4f87.js} +9 -9
  45. package/dist/src/{chat-BnzIuoTQ.js → chat-CgyGj2hC.js} +12 -12
  46. package/dist/src/{chat-BRMJOuCv.js → chat-Cpz3O-Xl.js} +14 -14
  47. package/dist/src/{chat-CVOyOBYk.js → chat-DIywASPG.js} +11 -11
  48. package/dist/src/{chat-CrnXMbvh.cjs → chat-Fl6TZJRS.cjs} +13 -13
  49. package/dist/src/{chat-D8GcWK9l.js → chat-XPN9YHhr.js} +2 -2
  50. package/dist/src/{chatkit-IWIuhxFE.js → chatkit-DEls11hE.js} +4 -4
  51. package/dist/src/{chatkit-DlOZ-eNb.js → chatkit-DIrJX8xk.js} +4 -4
  52. package/dist/src/{chatkit-CcktkleS.js → chatkit-Dpxrq4eD.js} +2 -2
  53. package/dist/src/{chatkit-yeVtURUi.cjs → chatkit-e25Ziu17.cjs} +4 -4
  54. package/dist/src/{claude-agent-sdk-BiMgSH9g.js → claude-agent-sdk-6-xTaLwM.js} +48 -19
  55. package/dist/src/{claude-agent-sdk-Yj9Hq0cH.cjs → claude-agent-sdk-BzxF6NIJ.cjs} +48 -19
  56. package/dist/src/{claude-agent-sdk-rVqlUIJl.js → claude-agent-sdk-CmkTnKGH.js} +49 -20
  57. package/dist/src/{claude-agent-sdk-yid1kGsL.js → claude-agent-sdk-rXCBLK_o.js} +40 -11
  58. package/dist/src/{cloud-ByJVRSQI.js → cloud-BMbRVJFw.js} +3 -3
  59. package/dist/src/cloud-CZ4hytdm.js +5 -0
  60. package/dist/src/{cloudflare-ai-DmJZcvVx.cjs → cloudflare-ai-BAQ0u_dg.cjs} +14 -14
  61. package/dist/src/{cloudflare-ai-CWKYPCCF.js → cloudflare-ai-CUg4BTcj.js} +13 -13
  62. package/dist/src/{cloudflare-ai-goDJ5bwr.js → cloudflare-ai-CobxMTR4.js} +15 -15
  63. package/dist/src/{cloudflare-ai-CdKv38f6.js → cloudflare-ai-Z9X219gp.js} +2 -2
  64. package/dist/src/{cloudflare-gateway-BW8hcdB0.cjs → cloudflare-gateway-C0sgfr_z.cjs} +15 -15
  65. package/dist/src/{cloudflare-gateway-CDCOS1Os.js → cloudflare-gateway-D2_yi-Fh.js} +16 -16
  66. package/dist/src/{cloudflare-gateway-Dz_HCMGY.js → cloudflare-gateway-Djf3F3_H.js} +2 -2
  67. package/dist/src/{cloudflare-gateway-gzmTsXcd.js → cloudflare-gateway-_itGuXry.js} +14 -14
  68. package/dist/src/{codex-sdk-BlvhxMr0.js → codex-sdk-BASDNkIl.js} +90 -34
  69. package/dist/src/{codex-sdk-BC5qbCjh.js → codex-sdk-dSnGdgIp.js} +92 -36
  70. package/dist/src/{codex-sdk-CBpm53B8.js → codex-sdk-ibXwdglL.js} +91 -35
  71. package/dist/src/{codex-sdk-Cf5_CQch.cjs → codex-sdk-wTEpMM_X.cjs} +92 -36
  72. package/dist/src/{cometapi-DoaO5SLq.js → cometapi-B01btbfb.js} +16 -16
  73. package/dist/src/{cometapi-BUKGSUCw.js → cometapi-ChAaRjg5.js} +14 -14
  74. package/dist/src/{cometapi-C6BSw9k3.js → cometapi-DHUAH6nK.js} +2 -2
  75. package/dist/src/{cometapi-B3TzpkNI.cjs → cometapi-JbvOJSCO.cjs} +15 -15
  76. package/dist/src/{completion-BLe7SUA4.js → completion-BBJ6zmG3.js} +6 -6
  77. package/dist/src/{completion-1RAiLcwi.js → completion-D9_MDlnd.js} +6 -6
  78. package/dist/src/{completion-D6BTVt6e.cjs → completion-DDyL3Cb2.cjs} +6 -6
  79. package/dist/src/{docker-CkOzlD1W.js → docker-BuButc4D.js} +15 -15
  80. package/dist/src/{docker-BWsSX8Pn.cjs → docker-Ckw-j7Rr.cjs} +14 -14
  81. package/dist/src/{docker-CMf5SGLq.js → docker-JAAubMw3.js} +13 -13
  82. package/dist/src/{docker-C0AzMsuf.js → docker-vnOg96gi.js} +2 -2
  83. package/dist/src/errors-DnGCbnx8.js +36 -0
  84. package/dist/src/{esm-gWVPXn3r.cjs → esm-BQkx5roy.cjs} +2 -2
  85. package/dist/src/{esm-Lh6czAFT.js → esm-CYhseqj4.js} +2 -2
  86. package/dist/src/{esm-D40XsWlR.js → esm-rDtG_2rg.js} +2 -2
  87. package/dist/src/eval-CKHWqG9f.js +16 -0
  88. package/dist/src/{eval-WaSg64w3.js → eval-CYrbG57o.js} +106 -29
  89. package/dist/src/{evalResult-CGrGU_cG.js → evalResult-6JaUIStC.js} +7 -7
  90. package/dist/src/{evalResult-C_UM63nn.js → evalResult-COsVttMA.js} +7 -7
  91. package/dist/src/evalResult-CxTP-LMm.cjs +11 -0
  92. package/dist/src/evalResult-CzLURDcP.js +13 -0
  93. package/dist/src/{evalResult-BU4huold.cjs → evalResult-DlRfu_Rq.cjs} +7 -7
  94. package/dist/src/evalResult-DyttNQ_G.js +11 -0
  95. package/dist/src/evaluator-0PvfeBYh.js +38 -0
  96. package/dist/src/{evaluator-gmF3Vddp.js → evaluator-3EJCMTs0.js} +75 -49
  97. package/dist/src/{extractor-D-RM2m6A.cjs → extractor-DbhlYEeo.cjs} +23 -6
  98. package/dist/src/{extractor-Da8IxCeS.js → extractor-Hs7la_19.js} +23 -6
  99. package/dist/src/{extractor-BA90EtLq.js → extractor-LSYjrhK0.js} +23 -6
  100. package/dist/src/{fetch-BIfcW-Fd.js → fetch-18MuNu9i.js} +21 -7
  101. package/dist/src/{fetch-CW9GabAi.js → fetch-Bi0o-fdp.js} +2 -2
  102. package/dist/src/fetch-CMptBDVg.cjs +4 -0
  103. package/dist/src/fetch-DAZkv3gV.js +6 -0
  104. package/dist/src/{fetch-Mb7SbeM-.js → fetch-SRsE6Ctl.js} +21 -7
  105. package/dist/src/{fetch-MvWxCS5U.cjs → fetch-ZMn_oemb.cjs} +21 -7
  106. package/dist/src/{fileExtensions-CzcPkiKZ.js → fileExtensions-BpuMmaFL.js} +1 -1
  107. package/dist/src/{formatDuration-CCiZ-wBY.js → formatDuration-Doo0xq-z.js} +1 -1
  108. package/dist/src/{genaiTracer-BQ8AmajD.cjs → genaiTracer-CQlpZkrp.cjs} +2 -2
  109. package/dist/src/{genaiTracer-foKtbVa2.js → genaiTracer-CqNnnXrE.js} +1 -1
  110. package/dist/src/graders-BCytzXrb.js +34 -0
  111. package/dist/src/{graders-CwtelA9k.js → graders-BaMCwIKp.js} +212 -91
  112. package/dist/src/graders-CGZQShfJ.cjs +33 -0
  113. package/dist/src/{graders-2dabIkXs.cjs → graders-DzUUnUjC.cjs} +212 -91
  114. package/dist/src/{graders-BscQ6O1Q.js → graders-QsALpIdy.js} +211 -90
  115. package/dist/src/graders-spkuVC-E.js +36 -0
  116. package/dist/src/{image-Dv0o-Ab7.js → image-BXt_7u0v.js} +4 -4
  117. package/dist/src/{image-B6TV9l0v.js → image-BiEVdpdP.js} +7 -7
  118. package/dist/src/{image-DS9hlgSc.cjs → image-C3BjJUAU.cjs} +7 -7
  119. package/dist/src/{image-_jKUeeh9.js → image-COCWy5dX.js} +2 -2
  120. package/dist/src/{image-DqElR73O.cjs → image-D10zEe1f.cjs} +4 -4
  121. package/dist/src/{image-BVEVjrwl.js → image-DB4sHxdJ.js} +5 -5
  122. package/dist/src/{image-C1i3NoZo.js → image-mhAGP07h.js} +7 -7
  123. package/dist/src/index.cjs +305 -112
  124. package/dist/src/index.d.cts +137 -3
  125. package/dist/src/index.d.ts +137 -3
  126. package/dist/src/index.js +304 -111
  127. package/dist/src/{interactiveCheck-CjK2R4rB.js → interactiveCheck-DU-MAhp5.js} +2 -2
  128. package/dist/src/{knowledgeBase-K5fJN2kC.cjs → knowledgeBase-Bnb00xKs.cjs} +8 -8
  129. package/dist/src/{knowledgeBase-D-xthvn0.js → knowledgeBase-CMvMlLZR.js} +9 -9
  130. package/dist/src/{knowledgeBase-DJZHeJqg.js → knowledgeBase-DotRBzUE.js} +2 -2
  131. package/dist/src/{knowledgeBase-BSs2ldSR.js → knowledgeBase-XJQ0Qyez.js} +8 -8
  132. package/dist/src/{litellm-kPhaZkzz.js → litellm-BECdjOTx.js} +3 -3
  133. package/dist/src/{litellm-uRLukY7s.cjs → litellm-BrnZhMcL.cjs} +15 -15
  134. package/dist/src/{litellm-DH_rVIOd.js → litellm-CHrRmPAe.js} +16 -16
  135. package/dist/src/{litellm-DoXGHlpD.js → litellm-CrLJrPIm.js} +14 -14
  136. package/dist/src/{logger-CMp-NS-e.cjs → logger-BdZ-IqBc.cjs} +5 -2
  137. package/dist/src/{logger-Bzi5o47S.js → logger-BotXmWKW.js} +5 -2
  138. package/dist/src/{logger-q5I8CByj.js → logger-w8Ozp0Td.js} +5 -2
  139. package/dist/src/{luma-ray-B3GiVpuq.js → luma-ray-BOeX-h0M.js} +10 -10
  140. package/dist/src/{luma-ray-CPISsLu-.js → luma-ray-C-w6EsJm.js} +2 -2
  141. package/dist/src/{luma-ray-BrWrKIIB.cjs → luma-ray-C0RkI3lt.cjs} +10 -10
  142. package/dist/src/{luma-ray-gyI_GEy2.js → luma-ray-DgKLS0BF.js} +11 -11
  143. package/dist/src/main.js +3260 -2537
  144. package/dist/src/{messages-CJgEjRQF.js → messages-CDZYGNlS.js} +13 -10
  145. package/dist/src/{messages-BMkwrfmt.js → messages-D61tPFQo.js} +14 -11
  146. package/dist/src/{messages-B5HsO_dM.cjs → messages-DXV3Qh8_.cjs} +14 -11
  147. package/dist/src/{meteor-CBciquOS.js → meteor-Dj8cTkU_.js} +1 -1
  148. package/dist/src/{meteor-0cLf9TIn.js → meteor-P2rUE-Uz.js} +1 -1
  149. package/dist/src/{meteor-BQ6Ws9k2.js → meteor-SLNTgmXm.js} +2 -2
  150. package/dist/src/{meteor-DRuEfzuQ.cjs → meteor-odmwVbyG.cjs} +1 -1
  151. package/dist/src/{nova-reel-B5SOonY2.js → nova-reel-Bk5npr2q.js} +11 -11
  152. package/dist/src/{nova-reel-CT9ZuhJ3.js → nova-reel-C2LFfVTf.js} +2 -2
  153. package/dist/src/{nova-reel-ByTx85ed.cjs → nova-reel-D9FXq3Mt.cjs} +10 -10
  154. package/dist/src/{nova-reel-ChM7WaHR.js → nova-reel-DtCjbD5O.js} +10 -10
  155. package/dist/src/{nova-sonic-D4M3kKYu.js → nova-sonic-BXRfQyF-.js} +8 -8
  156. package/dist/src/{nova-sonic-C-H3eDvL.cjs → nova-sonic-BoRSY_U6.cjs} +7 -7
  157. package/dist/src/{nova-sonic-DgifpOKF.js → nova-sonic-CgaWLDM1.js} +7 -7
  158. package/dist/src/{nova-sonic-BqP59oOu.js → nova-sonic-D_qERM-K.js} +2 -2
  159. package/dist/src/{openai-BjpdxIOG.cjs → openai-Bigwjgo1.cjs} +2 -2
  160. package/dist/src/{openai-Cv9pEKxp.js → openai-CT5fwbve.js} +2 -2
  161. package/dist/src/{openai-CitF-gEN.js → openai-Dz3surb_.js} +2 -2
  162. package/dist/src/openclaw-B6XY2kUf.js +526 -0
  163. package/dist/src/openclaw-CpPrXwf6.js +524 -0
  164. package/dist/src/openclaw-DDSfq5fp.cjs +528 -0
  165. package/dist/src/openclaw-dHLcXUWZ.js +511 -0
  166. package/dist/src/{opencode-sdk-Dakn4QMp.js → opencode-sdk-CImWVqy9.js} +7 -7
  167. package/dist/src/{opencode-sdk-BcLvVMV-.js → opencode-sdk-CuCztr4P.js} +6 -6
  168. package/dist/src/{opencode-sdk-z7KKOCdB.js → opencode-sdk-DhcfRbBH.js} +3 -3
  169. package/dist/src/{opencode-sdk-Cqszt4br.cjs → opencode-sdk-mqF-Oj3f.cjs} +6 -6
  170. package/dist/src/{otlpReceiver-BvmMgacx.cjs → otlpReceiver-B6Xo4KZM.cjs} +6 -6
  171. package/dist/src/{otlpReceiver-DRNetlJH.js → otlpReceiver-BO0rbDzh.js} +6 -6
  172. package/dist/src/{otlpReceiver-Bhj_vnzl.js → otlpReceiver-Dg817agV.js} +6 -6
  173. package/dist/src/{otlpReceiver-Cpnk-Hjf.js → otlpReceiver-DmRb0NBj.js} +2 -2
  174. package/dist/src/{providerRegistry-D32Lt9vp.js → providerRegistry-Xf0qdqGQ.js} +2 -2
  175. package/dist/src/{providerRegistry-HGQd2MF6.cjs → providerRegistry-lc7a7utN.cjs} +2 -2
  176. package/dist/src/{providerRegistry-BdKWcUa8.js → providerRegistry-wCWd7sKQ.js} +2 -2
  177. package/dist/src/providers-BMZZmPBJ.cjs +32 -0
  178. package/dist/src/{providers-BWoVY_Wz.cjs → providers-BNKVY53V.cjs} +294 -782
  179. package/dist/src/{providers-Co_FGgH8.js → providers-BiNq_Iyc.js} +281 -769
  180. package/dist/src/{providers-CUCHJCHD.js → providers-BlEhY5mi.js} +286 -779
  181. package/dist/src/providers-CQQrNaJk.js +32 -0
  182. package/dist/src/providers-Ck8HyrC-.js +34 -0
  183. package/dist/src/{pythonUtils-rOCm9w_5.cjs → pythonUtils-DZ6EbdY4.cjs} +3 -3
  184. package/dist/src/{pythonUtils-B9JA-gsC.js → pythonUtils-r1uBuA0n.js} +3 -3
  185. package/dist/src/{pythonUtils-eNq6Wsfr.js → pythonUtils-vMlk9Qp5.js} +3 -3
  186. package/dist/src/{quiverai-BpWtOEQZ.cjs → quiverai-BNfIwKCO.cjs} +13 -13
  187. package/dist/src/{quiverai-Cj-PUa3p.js → quiverai-BQigKdIH.js} +14 -14
  188. package/dist/src/{quiverai-BN8OVvDE.js → quiverai-Bfy2WnE2.js} +12 -12
  189. package/dist/src/{quiverai-D5MSsd2c.js → quiverai-CedIP0PJ.js} +2 -2
  190. package/dist/src/{render-D2710HbA.js → render-CAZvKKkB.js} +4 -4
  191. package/dist/src/responses-DLLjADw5.js +653 -0
  192. package/dist/src/responses-TsdODUpm.js +654 -0
  193. package/dist/src/responses-zOtKtnY_.cjs +671 -0
  194. package/dist/src/{rubyUtils-Dn6MGcsk.js → rubyUtils-BtjlqyXt.js} +3 -3
  195. package/dist/src/{rubyUtils-LBsk3zIm.js → rubyUtils-Cs35SDYa.js} +3 -3
  196. package/dist/src/rubyUtils-D7--T12C.js +6 -0
  197. package/dist/src/{rubyUtils-rnCVDgH-.cjs → rubyUtils-DCVaJ3mc.cjs} +3 -3
  198. package/dist/src/rubyUtils-DRRiMFV2.js +5 -0
  199. package/dist/src/rubyUtils-vb8OYFC-.cjs +5 -0
  200. package/dist/src/{sagemaker-C8MeZIkH.js → sagemaker-BcgLu0U4.js} +18 -18
  201. package/dist/src/{sagemaker-4ukMNSN0.js → sagemaker-CLdUAv5z.js} +17 -17
  202. package/dist/src/{sagemaker-DyVHy2BW.js → sagemaker-Du4LIR97.js} +2 -2
  203. package/dist/src/{sagemaker-DB3Eojau.cjs → sagemaker-DwNnEVYt.cjs} +17 -17
  204. package/dist/src/{scanner-C28XVEq2.js → scanner-Dyw21Wg_.js} +12 -12
  205. package/dist/src/server/index.js +1818 -605
  206. package/dist/src/server-BUbS0Qfh.js +6 -0
  207. package/dist/src/{server-BF3HkMhe.js → server-CbMTRQkg.js} +8 -6
  208. package/dist/src/{server-CSbLW-UI.cjs → server-CgUQ25qW.cjs} +8 -6
  209. package/dist/src/{server-mycZbUH8.js → server-DWmZLfCy.js} +10 -7
  210. package/dist/src/server-XpGXFHkS.cjs +6 -0
  211. package/dist/src/server-gfOx5Zrk.js +8 -0
  212. package/dist/src/{signal-DM_SPNmi.js → signal-Bl32q42d.js} +3 -3
  213. package/dist/src/{slack-Ed1yyt_j.js → slack-BfdBx2tO.js} +2 -2
  214. package/dist/src/{slack-D1F9Y7CH.cjs → slack-BtMkB6xP.cjs} +2 -2
  215. package/dist/src/{slack-DkAF58Tr.js → slack-DPqj42Ts.js} +2 -2
  216. package/dist/src/{slack-BK312SXM.js → slack-OZYxoVON.js} +2 -2
  217. package/dist/src/{store-CT_e5OZX.js → store-2ocbYY9D.js} +3 -3
  218. package/dist/src/store-5u2yriTV.js +7 -0
  219. package/dist/src/{store-BpumNYCl.cjs → store-BqwfFEyF.cjs} +3 -3
  220. package/dist/src/{store-BFLqwuc_.js → store-D4gdn9ih.js} +3 -3
  221. package/dist/src/store-D_lq_8oQ.js +6 -0
  222. package/dist/src/store-m5KT6Ly7.cjs +6 -0
  223. package/dist/src/{tables-Dansasnu.cjs → tables-B9E1kRp-.cjs} +3 -3
  224. package/dist/src/{tables-BjaApSAB.js → tables-C7TT2XVn.js} +3 -3
  225. package/dist/src/{tables-Dwexr5Z6.js → tables-D-NSwNIb.js} +3 -3
  226. package/dist/src/telemetry-5RHFoCJh.js +6 -0
  227. package/dist/src/{telemetry-MVkZQxt9.js → telemetry-BXyVqyAg.js} +5 -4
  228. package/dist/src/{telemetry-DFDFKdnr.cjs → telemetry-D0_yFdtU.cjs} +5 -4
  229. package/dist/src/{telemetry-Ds5Nn81l.js → telemetry-DZ_7PaVq.js} +5 -4
  230. package/dist/src/telemetry-Do8wMnA-.js +8 -0
  231. package/dist/src/telemetry-LojxPoFq.cjs +6 -0
  232. package/dist/src/{text-PYISqVm1.cjs → text-DF2hMKdg.cjs} +1 -1
  233. package/dist/src/{text-DuYSUYPB.js → text-DgMr_tiM.js} +1 -1
  234. package/dist/src/{text-Dx0GJOCN.js → text-Dm78AVGG.js} +1 -1
  235. package/dist/src/{tokenUsageUtils-BtZd3sP7.cjs → tokenUsageUtils-CXhxVj72.cjs} +9 -4
  236. package/dist/src/{tokenUsageUtils-DoinwgKF.js → tokenUsageUtils-DmZSD2eU.js} +9 -4
  237. package/dist/src/{tokenUsageUtils-cFdLMERB.js → tokenUsageUtils-FZd5O_4A.js} +9 -4
  238. package/dist/src/{transcription-Cp19m_Mt.js → transcription-C-M81iDA.js} +2 -2
  239. package/dist/src/{transcription-CLRpAg07.js → transcription-CYuY5sFO.js} +10 -10
  240. package/dist/src/{transcription-D8ifIKOv.js → transcription-Ch7S-LWw.js} +11 -11
  241. package/dist/src/{transcription-CXXFEVM_.cjs → transcription-FNIz3YOe.cjs} +10 -10
  242. package/dist/src/transform-8eGmaH-7.js +7 -0
  243. package/dist/src/transform-BRVvWaG4.cjs +6 -0
  244. package/dist/src/{transform-Bn-lgBE2.js → transform-CoP2bJ7P.js} +44 -5
  245. package/dist/src/{transform-BFPYuBaW.js → transform-CqTFr7KR.js} +5 -5
  246. package/dist/src/{transform-DvQWeBSR.js → transform-D8dILpfZ.js} +4 -4
  247. package/dist/src/{transform-BUrxadlA.js → transform-DMaxQwDx.js} +44 -5
  248. package/dist/src/transform-GybT0X0u.js +8 -0
  249. package/dist/src/{transform-DshYLyBq.cjs → transform-Kd6u-oNm.cjs} +4 -4
  250. package/dist/src/{transform-Bw1IstDE.cjs → transform-ivxEY4f7.cjs} +55 -4
  251. package/dist/src/{transformersAvailability-BaoWHpu1.cjs → transformersAvailability-Bkep3ka7.cjs} +1 -1
  252. package/dist/src/{transformersAvailability-Dhh45n5P.js → transformersAvailability-DEU2naS1.js} +1 -1
  253. package/dist/src/{transformersAvailability-DtpwoeFC.js → transformersAvailability-DkAWaK5B.js} +1 -1
  254. package/dist/src/{transformersAvailability-O2YaCv9Z.js → transformersAvailability-DwmezkVe.js} +1 -1
  255. package/dist/src/{types-B-XUqfNs.cjs → types-BIfttHrT.cjs} +22 -2
  256. package/dist/src/{types-BsU_PxR3.js → types-DMVjYLpx.js} +16 -2
  257. package/dist/src/{types-CgrxBFgm.js → types-t52w-XsS.js} +19 -3
  258. package/dist/src/{util-M2MoNCUR.js → util-BSh4a_Q8.js} +7 -7
  259. package/dist/src/{util-DTJWKLkl.cjs → util-C08Kns6-.cjs} +18 -4
  260. package/dist/src/{util-DHBpsbZE.js → util-CUEt0Vum.js} +18 -4
  261. package/dist/src/{util-Bnw6EyZN.js → util-Cl0zfT3V.js} +18 -4
  262. package/dist/src/{util-C7A-PlKK.cjs → util-DUYOvxAy.cjs} +6 -6
  263. package/dist/src/{util-WYC3rB_p.js → util-DiCePfDu.js} +6 -6
  264. package/dist/src/{util-CV99ps44.cjs → util-DkFTvieG.cjs} +17 -5
  265. package/dist/src/{util-CfepsNVK.js → util-mJ58qbbw.js} +17 -5
  266. package/dist/src/{util-BZaMVBMq.js → util-vjscpUzy.js} +17 -5
  267. package/dist/src/{utils-BryuD3vq.js → utils-CVzb4YiI.js} +3 -3
  268. package/dist/src/{utils-Dezi3MBH.cjs → utils-DFaZa6Rf.cjs} +3 -3
  269. package/dist/src/{utils-GiyI2K4P.js → utils-JaY9veb5.js} +3 -3
  270. package/dist/tsconfig.tsbuildinfo +1 -1
  271. package/package.json +75 -77
  272. package/dist/src/app/assets/index-07dbAcWK.js +0 -427
  273. package/dist/src/app/assets/index-DnEcCQgk.css +0 -1
  274. package/dist/src/app/assets/vendor-react-DHoaNLma.js +0 -4
  275. package/dist/src/cache-BujOdYlc.cjs +0 -6
  276. package/dist/src/cloud-BHYz0XkH.js +0 -5
  277. package/dist/src/eval-0IFf8hON.js +0 -16
  278. package/dist/src/evalResult-BCCv6FXj.js +0 -13
  279. package/dist/src/evalResult-C8iVgVvr.js +0 -11
  280. package/dist/src/evalResult-CqFeWKYx.cjs +0 -11
  281. package/dist/src/evaluator-DwS5NAEj.js +0 -37
  282. package/dist/src/fetch-BH9KSaUC.cjs +0 -4
  283. package/dist/src/fetch-BL6kqunF.js +0 -6
  284. package/dist/src/graders-BK3LuhJ8.cjs +0 -32
  285. package/dist/src/graders-Bpjtip-E.js +0 -35
  286. package/dist/src/graders-KIf6Uej3.js +0 -33
  287. package/dist/src/providers-41mSodR_.js +0 -31
  288. package/dist/src/providers-CiZCpIxz.cjs +0 -31
  289. package/dist/src/providers-G531909f.js +0 -33
  290. package/dist/src/rubyUtils-BLd6EE1u.cjs +0 -5
  291. package/dist/src/rubyUtils-CVELPvUH.js +0 -6
  292. package/dist/src/rubyUtils-_t9Gmf7U.js +0 -5
  293. package/dist/src/server-Bc4T4XDt.cjs +0 -6
  294. package/dist/src/server-CMyxJ7ct.js +0 -6
  295. package/dist/src/server-D9FuxNYE.js +0 -8
  296. package/dist/src/store-CrMinjmN.cjs +0 -6
  297. package/dist/src/store-EaWZOoxz.js +0 -7
  298. package/dist/src/store-KXWnHB15.js +0 -6
  299. package/dist/src/telemetry-BXD2mCyr.cjs +0 -6
  300. package/dist/src/telemetry-CYiBm56v.js +0 -8
  301. package/dist/src/telemetry-lICYKIMB.js +0 -6
  302. package/dist/src/transform-DZI2t8-9.js +0 -8
  303. package/dist/src/transform-DZUV3qpO.js +0 -7
  304. package/dist/src/transform-XcotjzZX.cjs +0 -6
@@ -1,27 +1,28 @@
1
1
  #!/usr/bin/env node
2
- import { C as getEnvString, E as isCI, O as cliState_default, S as getEnvInt, T as getMaxEvalTimeMs, _ as summarizeEvaluateResultForLogging, b as getEnvBool, f as extractJsonObjects, g as safeJsonStringify, o as logger_default, p as getAjv, w as getEvalTimeoutMs } from "./logger-Bzi5o47S.js";
3
- import { F as FILE_METADATA_KEY, P as VERSION, h as isPromptfooSampleTarget, l as sleep, r as fetchWithRetries, v as parseChatPrompt, w as DEFAULT_MAX_CONCURRENCY } from "./fetch-Mb7SbeM-.js";
2
+ import { C as getEnvString, E as isCI, O as cliState_default, S as getEnvInt, T as getMaxEvalTimeMs, _ as summarizeEvaluateResultForLogging, b as getEnvBool, f as extractJsonObjects, g as safeJsonStringify, o as logger_default, p as getAjv, w as getEvalTimeoutMs } from "./logger-BotXmWKW.js";
3
+ import { F as FILE_METADATA_KEY, P as VERSION, h as isPromptfooSampleTarget, l as sleep, r as fetchWithRetries, v as parseChatPrompt, w as DEFAULT_MAX_CONCURRENCY } from "./fetch-SRsE6Ctl.js";
4
4
  import { t as invariant } from "./invariant-DT20jrBd.js";
5
- import { r as telemetry_default } from "./telemetry-MVkZQxt9.js";
6
- import { d as isGradingResult, p as isApiProvider, s as ResultFailureReason } from "./types-CgrxBFgm.js";
7
- import { c as promptYesNo } from "./server-mycZbUH8.js";
8
- import { A as renderPrompt, E as isBasicRefusal, F as TokenUsageTracker, I as createRateLimitRegistry, K as VertexChatProvider, L as createProviderRateLimitOptions, M as isPackagePath, N as loadFromPackage, P as redteamProviderManager, j as runExtensionHook, k as collectFileMetadata, q as AIStudioChatProvider, u as GoogleLiveProvider, v as checkExfilTracking, w as getSessionId } from "./providers-CUCHJCHD.js";
9
- import { o as getCache } from "./cache-DHm8Pc8l.js";
10
- import { i as isJavascriptFile } from "./fileExtensions-CzcPkiKZ.js";
11
- import { E as parseFileUrl, F as isAnthropicProvider, I as isGoogleProvider, L as isOpenAiProvider, R as isProviderAllowed, T as loadFunction, g as maybeLoadToolsFromExternalFile, w as getNunjucksEngine } from "./util-M2MoNCUR.js";
12
- import { r as runPython } from "./pythonUtils-B9JA-gsC.js";
13
- import { n as transform, r as getProcessShim, t as TransformInputType } from "./transform-BFPYuBaW.js";
14
- import { $ as matchesSearchRubric, B as getAndCheckProvider, G as matchesContextFaithfulness, H as matchesAnswerRelevance, J as matchesFactuality, K as matchesContextRecall, Q as matchesPiScore, R as callProviderWithContext, U as matchesClassification, V as loadRubricPrompt, W as matchesClosedQa, X as matchesLlmRubric, Y as matchesGEval, Z as matchesModeration, at as DefaultSuggestionsProvider, dt as getFinalTest, et as matchesSelectBest, ft as loadFromJavaScriptFile, it as getDefaultProviders, lt as SUGGEST_PROMPTS_SYSTEM_MESSAGE, mt as resolveContext, n as getGraderById, nt as selectMaxScore, pt as processFileReference, q as matchesContextRelevance, tt as matchesSimilarity, ut as coerceString, z as fail } from "./graders-CwtelA9k.js";
15
- import { i as generateIdFromPrompt } from "./utils-GiyI2K4P.js";
16
- import { t as extractAndStoreBinaryData } from "./extractor-BA90EtLq.js";
17
- import { t as OpenAiChatCompletionProvider } from "./chat-CVOyOBYk.js";
18
- import { a as createEmptyTokenUsage, i as createEmptyAssertions, n as accumulateResponseTokenUsage, o as normalizeTokenUsage, r as accumulateTokenUsage, t as accumulateAssertionTokenUsage } from "./tokenUsageUtils-DoinwgKF.js";
19
- import { p as validateFunctionCall } from "./transform-Bn-lgBE2.js";
20
- import { l as validateFunctionCall$1 } from "./util-DHBpsbZE.js";
21
- import { n as getTraceStore } from "./store-BFLqwuc_.js";
22
- import { t as providerRegistry } from "./providerRegistry-D32Lt9vp.js";
23
- import { n as runRuby } from "./rubyUtils-Dn6MGcsk.js";
24
- import { a as getActualPromptWithFallback, r as updateSignalFile } from "./signal-DM_SPNmi.js";
5
+ import { r as telemetry_default } from "./telemetry-BXyVqyAg.js";
6
+ import { d as isGradingResult, p as isApiProvider, s as ResultFailureReason } from "./types-t52w-XsS.js";
7
+ import { c as promptYesNo } from "./server-DWmZLfCy.js";
8
+ import { A as renderPrompt, E as isBasicRefusal, F as TokenUsageTracker, G as VertexChatProvider, I as createRateLimitRegistry, K as AIStudioChatProvider, L as createProviderRateLimitOptions, M as isPackagePath, N as loadFromPackage, P as redteamProviderManager, j as runExtensionHook, k as collectFileMetadata, u as GoogleLiveProvider, v as checkExfilTracking, w as getSessionId } from "./providers-BlEhY5mi.js";
9
+ import { o as getCache } from "./cache-mIszOnuz.js";
10
+ import { n as isNonTransientHttpStatus } from "./errors-DnGCbnx8.js";
11
+ import { i as isJavascriptFile } from "./fileExtensions-BpuMmaFL.js";
12
+ import { E as parseFileUrl, F as isAnthropicProvider, I as isGoogleProvider, L as isOpenAiProvider, R as isProviderAllowed, T as loadFunction, g as maybeLoadToolsFromExternalFile, w as getNunjucksEngine } from "./util-BSh4a_Q8.js";
13
+ import { r as runPython } from "./pythonUtils-r1uBuA0n.js";
14
+ import { n as transform, r as getProcessShim, t as TransformInputType } from "./transform-CqTFr7KR.js";
15
+ import { $ as matchesSearchRubric, B as getAndCheckProvider, G as matchesContextFaithfulness, H as matchesAnswerRelevance, J as matchesFactuality, K as matchesContextRecall, Q as matchesPiScore, R as callProviderWithContext, U as matchesClassification, V as loadRubricPrompt, W as matchesClosedQa, X as matchesLlmRubric, Y as matchesGEval, Z as matchesModeration, at as DefaultSuggestionsProvider, dt as getFinalTest, et as matchesSelectBest, ft as loadFromJavaScriptFile, it as getDefaultProviders, lt as SUGGEST_PROMPTS_SYSTEM_MESSAGE, mt as resolveContext, n as getGraderById, nt as selectMaxScore, pt as processFileReference, q as matchesContextRelevance, tt as matchesSimilarity, ut as coerceString, z as fail } from "./graders-BaMCwIKp.js";
16
+ import { i as generateIdFromPrompt } from "./utils-JaY9veb5.js";
17
+ import { t as extractAndStoreBinaryData } from "./extractor-LSYjrhK0.js";
18
+ import { t as OpenAiChatCompletionProvider } from "./chat-DIywASPG.js";
19
+ import { a as createEmptyTokenUsage, i as createEmptyAssertions, n as accumulateResponseTokenUsage, o as normalizeTokenUsage, r as accumulateTokenUsage, t as accumulateAssertionTokenUsage } from "./tokenUsageUtils-DmZSD2eU.js";
20
+ import { m as validateFunctionCall } from "./transform-CoP2bJ7P.js";
21
+ import { l as validateFunctionCall$1 } from "./util-CUEt0Vum.js";
22
+ import { n as getTraceStore } from "./store-D4gdn9ih.js";
23
+ import { t as providerRegistry } from "./providerRegistry-Xf0qdqGQ.js";
24
+ import { n as runRuby } from "./rubyUtils-BtjlqyXt.js";
25
+ import { a as getActualPromptWithFallback, r as updateSignalFile } from "./signal-Bl32q42d.js";
25
26
  import chalk from "chalk";
26
27
  import fs, { createWriteStream } from "fs";
27
28
  import path from "path";
@@ -259,7 +260,7 @@ async function startOtlpReceiverIfNeeded(testSuite) {
259
260
  telemetry_default.record("feature_used", { feature: "tracing" });
260
261
  try {
261
262
  logger_default.debug("[EvaluatorTracing] Tracing configuration detected, starting OTLP receiver");
262
- const { startOTLPReceiver } = await import("./otlpReceiver-Bhj_vnzl.js");
263
+ const { startOTLPReceiver } = await import("./otlpReceiver-Dg817agV.js");
263
264
  const port = testSuite.tracing.otlp.http.port || 4318;
264
265
  const host = testSuite.tracing.otlp.http.host || "127.0.0.1";
265
266
  logger_default.debug(`[EvaluatorTracing] Starting OTLP receiver on ${host}:${port}`);
@@ -282,7 +283,7 @@ async function startOtlpReceiverIfNeeded(testSuite) {
282
283
  async function stopOtlpReceiverIfNeeded() {
283
284
  if (otlpReceiverStarted) try {
284
285
  logger_default.debug("[EvaluatorTracing] Stopping OTLP receiver");
285
- const { stopOTLPReceiver } = await import("./otlpReceiver-Bhj_vnzl.js");
286
+ const { stopOTLPReceiver } = await import("./otlpReceiver-Dg817agV.js");
286
287
  await stopOTLPReceiver();
287
288
  otlpReceiverStarted = false;
288
289
  logger_default.info("[EvaluatorTracing] OTLP receiver stopped successfully");
@@ -317,7 +318,7 @@ async function generateTraceContextIfNeeded(test, evaluateOptions, testIdx, prom
317
318
  }
318
319
  if (!tracingEnabled) return null;
319
320
  logger_default.debug("[EvaluatorTracing] Importing trace store");
320
- const { getTraceStore } = await import("./store-EaWZOoxz.js");
321
+ const { getTraceStore } = await import("./store-5u2yriTV.js");
321
322
  const traceStore = getTraceStore();
322
323
  const traceId = generateTraceId();
323
324
  const spanId = generateSpanId();
@@ -2685,7 +2686,7 @@ const ASSERTION_HANDLERS = {
2685
2686
  "llm-rubric": handleLlmRubric,
2686
2687
  meteor: async (params) => {
2687
2688
  try {
2688
- const { handleMeteorAssertion } = await import("./meteor-0cLf9TIn.js");
2689
+ const { handleMeteorAssertion } = await import("./meteor-P2rUE-Uz.js");
2689
2690
  return handleMeteorAssertion(params);
2690
2691
  } catch (error) {
2691
2692
  if (error instanceof Error && (error.message.includes("Cannot find module") || error.message.includes("natural\" package is required"))) return {
@@ -2795,9 +2796,9 @@ async function runAssertion({ prompt, provider, assertion, test, vars, latencyMs
2795
2796
  let filePath = fileRef;
2796
2797
  let functionName;
2797
2798
  if (fileRef.includes(":")) {
2798
- const [pathPart, funcPart] = fileRef.split(":");
2799
- filePath = pathPart;
2800
- functionName = funcPart;
2799
+ const colonIndex = fileRef.indexOf(":");
2800
+ filePath = fileRef.slice(0, colonIndex);
2801
+ functionName = fileRef.slice(colonIndex + 1);
2801
2802
  }
2802
2803
  filePath = path.resolve(basePath, filePath);
2803
2804
  if (isJavascriptFile(filePath)) {
@@ -2815,7 +2816,7 @@ async function runAssertion({ prompt, provider, assertion, test, vars, latencyMs
2815
2816
  };
2816
2817
  }
2817
2818
  else if (filePath.endsWith(".rb")) try {
2818
- const { runRuby } = await import("./rubyUtils-CVELPvUH.js");
2819
+ const { runRuby } = await import("./rubyUtils-D7--T12C.js");
2819
2820
  valueFromScript = await runRuby(filePath, functionName || "get_assert", [output, context]);
2820
2821
  logger_default.debug(`Ruby script ${filePath} output: ${valueFromScript}`);
2821
2822
  } catch (error) {
@@ -3805,7 +3806,7 @@ async function runEval({ provider, prompt, test, testSuite, delay, nunjucksFilte
3805
3806
  promptIdx,
3806
3807
  testIdx
3807
3808
  });
3808
- logger_default.error("Provider call failed during eval", logContext);
3809
+ if (!(err instanceof Error && err.name === "AbortError")) logger_default.error("Provider call failed during eval", logContext);
3809
3810
  return [{
3810
3811
  ...setup,
3811
3812
  error: errorWithStack,
@@ -3986,11 +3987,17 @@ var Evaluator = class {
3986
3987
  let globalTimeout;
3987
3988
  let globalAbortController;
3988
3989
  const processedIndices = /* @__PURE__ */ new Set();
3990
+ let targetUnavailable = false;
3991
+ let targetErrorStatus;
3992
+ const targetErrorAbortController = new AbortController();
3989
3993
  let ciProgressReporter = null;
3990
3994
  let progressBarManager = null;
3995
+ let providerAbortSignal = options.abortSignal;
3996
+ let combinedAbortSignal = options.abortSignal ? AbortSignal.any([options.abortSignal, targetErrorAbortController.signal]) : targetErrorAbortController.signal;
3991
3997
  if (maxEvalTimeMs > 0) {
3992
3998
  globalAbortController = new AbortController();
3993
- options.abortSignal = options.abortSignal ? AbortSignal.any([options.abortSignal, globalAbortController.signal]) : globalAbortController.signal;
3999
+ providerAbortSignal = providerAbortSignal ? AbortSignal.any([providerAbortSignal, globalAbortController.signal]) : globalAbortController.signal;
4000
+ combinedAbortSignal = AbortSignal.any([combinedAbortSignal, globalAbortController.signal]);
3994
4001
  globalTimeout = setTimeout(() => {
3995
4002
  evalTimedOut = true;
3996
4003
  globalAbortController?.abort();
@@ -3998,7 +4005,7 @@ var Evaluator = class {
3998
4005
  }
3999
4006
  const vars = /* @__PURE__ */ new Set();
4000
4007
  const checkAbort = () => {
4001
- if (options.abortSignal?.aborted) throw new Error("Operation cancelled");
4008
+ if (combinedAbortSignal.aborted) throw new Error("Operation cancelled");
4002
4009
  };
4003
4010
  if (!options.silent) logger_default.info(`Starting evaluation ${this.evalRecord.id}`);
4004
4011
  checkAbort();
@@ -4159,7 +4166,7 @@ var Evaluator = class {
4159
4166
  const defaultProvider = testSuite.defaultTest.provider;
4160
4167
  if (isApiProvider(defaultProvider)) testCase.provider = defaultProvider;
4161
4168
  else if (typeof defaultProvider === "object" && defaultProvider.id) {
4162
- const { loadApiProvider } = await import("./providers-G531909f.js");
4169
+ const { loadApiProvider } = await import("./providers-Ck8HyrC-.js");
4163
4170
  testCase.provider = await loadApiProvider(typeof defaultProvider.id === "function" ? defaultProvider.id() : defaultProvider.id, { options: defaultProvider });
4164
4171
  } else testCase.provider = defaultProvider;
4165
4172
  }
@@ -4229,7 +4236,7 @@ var Evaluator = class {
4229
4236
  registers: this.registers,
4230
4237
  isRedteam: testSuite.redteam != null,
4231
4238
  concurrency,
4232
- abortSignal: options.abortSignal,
4239
+ abortSignal: providerAbortSignal,
4233
4240
  evalId: this.evalRecord.id,
4234
4241
  rateLimitRegistry: this.rateLimitRegistry
4235
4242
  });
@@ -4243,7 +4250,7 @@ var Evaluator = class {
4243
4250
  if (evalOption.test.assert?.some((a) => a.type === "max-score")) rowsWithMaxScoreAssertion.add(evalOption.testIdx);
4244
4251
  }
4245
4252
  if (cliState_default.resume && this.evalRecord.persisted) try {
4246
- const { default: EvalResult } = await import("./evalResult-BCCv6FXj.js");
4253
+ const { default: EvalResult } = await import("./evalResult-CzLURDcP.js");
4247
4254
  const completedPairs = await EvalResult.getCompletedIndexPairs(this.evalRecord.id, { excludeErrors: cliState_default.retryMode });
4248
4255
  const originalCount = runEvalOptions.length;
4249
4256
  for (let i = runEvalOptions.length - 1; i >= 0; i--) {
@@ -4296,6 +4303,14 @@ var Evaluator = class {
4296
4303
  logger_default.error(`Error saving result: ${error} ${safeJsonStringify(resultSummary)}`);
4297
4304
  }
4298
4305
  for (const writer of this.fileWriters) await writer.write(row);
4306
+ const httpStatus = row.response?.metadata?.http?.status;
4307
+ if (typeof httpStatus === "number" && isNonTransientHttpStatus(httpStatus)) {
4308
+ targetUnavailable = true;
4309
+ targetErrorStatus = httpStatus;
4310
+ logger_default.error(`Target returned HTTP ${httpStatus}. Aborting scan - this error will not resolve on retry.`);
4311
+ targetErrorAbortController.abort();
4312
+ break;
4313
+ }
4299
4314
  const { promptIdx } = row;
4300
4315
  const metrics = prompts[promptIdx].metrics;
4301
4316
  invariant(metrics, "Expected prompt.metrics to be set");
@@ -4459,6 +4474,7 @@ var Evaluator = class {
4459
4474
  if (this.options.showProgressBar && progressBarManager) await progressBarManager.initialize(runEvalOptions, concurrency, 0);
4460
4475
  try {
4461
4476
  if (serialRunEvalOptions.length > 0) for (const evalStep of serialRunEvalOptions) {
4477
+ checkAbort();
4462
4478
  if (isWebUI) {
4463
4479
  const provider = evalStep.provider.label || evalStep.provider.id();
4464
4480
  const vars = formatVarsForDisplay(evalStep.test.vars || {}, 50);
@@ -4476,22 +4492,32 @@ var Evaluator = class {
4476
4492
  await this.evalRecord.addPrompts(prompts);
4477
4493
  });
4478
4494
  } catch (err) {
4479
- if (options.abortSignal?.aborted) if (evalTimedOut) logger_default.warn(`Evaluation stopped after reaching max duration (${maxEvalTimeMs}ms)`);
4480
- else {
4481
- logger_default.info("Evaluation interrupted, saving progress...");
4482
- if (globalTimeout) clearTimeout(globalTimeout);
4483
- if (progressBarManager) progressBarManager.stop();
4484
- if (ciProgressReporter) ciProgressReporter.finish();
4485
- this.evalRecord.setVars(Array.from(vars));
4486
- await this.evalRecord.addPrompts(prompts);
4487
- updateSignalFile(this.evalRecord.id);
4488
- return this.evalRecord;
4489
- }
4490
- else {
4495
+ if (combinedAbortSignal.aborted) {
4496
+ if (evalTimedOut) logger_default.warn(`Evaluation stopped after reaching max duration (${maxEvalTimeMs}ms)`);
4497
+ else if (!targetUnavailable) {
4498
+ logger_default.info("Evaluation interrupted, saving progress...");
4499
+ if (globalTimeout) clearTimeout(globalTimeout);
4500
+ if (progressBarManager) progressBarManager.stop();
4501
+ if (ciProgressReporter) ciProgressReporter.finish();
4502
+ this.evalRecord.setVars(Array.from(vars));
4503
+ await this.evalRecord.addPrompts(prompts);
4504
+ updateSignalFile(this.evalRecord.id);
4505
+ return this.evalRecord;
4506
+ }
4507
+ } else {
4491
4508
  if (ciProgressReporter) ciProgressReporter.error(`Evaluation failed: ${String(err)}`);
4492
4509
  throw err;
4493
4510
  }
4494
4511
  }
4512
+ if (targetUnavailable) {
4513
+ if (globalTimeout) clearTimeout(globalTimeout);
4514
+ if (progressBarManager) progressBarManager.stop();
4515
+ if (ciProgressReporter) ciProgressReporter.error(`Target unavailable (HTTP ${targetErrorStatus})`);
4516
+ this.evalRecord.setVars(Array.from(vars));
4517
+ await this.evalRecord.addPrompts(prompts);
4518
+ updateSignalFile(this.evalRecord.id);
4519
+ return this.evalRecord;
4520
+ }
4495
4521
  const compareRowsCount = rowsWithSelectBestAssertion.size + rowsWithMaxScoreAssertion.size;
4496
4522
  if (progressBarManager) {
4497
4523
  if (compareRowsCount > 0) progressBarManager.updateTotalCount(compareRowsCount);
@@ -4788,4 +4814,4 @@ function evaluate(testSuite, evalRecord, options) {
4788
4814
 
4789
4815
  //#endregion
4790
4816
  export { runEval as a, readAssertions as c, isAllowedPrompt as i, renderMetricName as l, formatVarsForDisplay as n, doesPromptRefMatch as o, generateVarCombinations as r, assertions_default as s, evaluate as t, runAssertions as u };
4791
- //# sourceMappingURL=evaluator-gmF3Vddp.js.map
4817
+ //# sourceMappingURL=evaluator-3EJCMTs0.js.map
@@ -1,7 +1,7 @@
1
- const require_logger = require('./logger-CMp-NS-e.cjs');
2
- const require_fetch = require('./fetch-MvWxCS5U.cjs');
3
- const require_accounts = require('./accounts-BwVGYllP.cjs');
4
- const require_blobs = require('./blobs-DOdc-E8L.cjs');
1
+ const require_logger = require('./logger-BdZ-IqBc.cjs');
2
+ const require_fetch = require('./fetch-ZMn_oemb.cjs');
3
+ const require_accounts = require('./accounts-BzEY8H3v.cjs');
4
+ const require_blobs = require('./blobs-673H0jCl.cjs');
5
5
  let crypto = require("crypto");
6
6
 
7
7
  //#region src/util/createHash.ts
@@ -39,7 +39,7 @@ async function uploadBlobRemote(buffer, mimeType, context) {
39
39
  const apiKey = require_fetch.cloudConfig.getApiKey();
40
40
  if (!url || !apiKey) return null;
41
41
  try {
42
- const { fetchWithProxy } = await Promise.resolve().then(() => require("./fetch-BH9KSaUC.cjs"));
42
+ const { fetchWithProxy } = await Promise.resolve().then(() => require("./fetch-CMptBDVg.cjs"));
43
43
  const response = await fetchWithProxy(url, {
44
44
  method: "POST",
45
45
  headers: {
@@ -254,6 +254,23 @@ async function extractAndStoreBinaryData(response, context) {
254
254
  });
255
255
  }
256
256
  }
257
+ if (response.images?.length) next.images = await Promise.all(response.images.map(async (img, idx) => {
258
+ if (!img.data || typeof img.data !== "string" || !isDataUrl(img.data)) return img;
259
+ const stored = await maybeStore(img.data, img.mimeType || "image/png", blobContext, `response.images[${idx}].data`, "image");
260
+ if (stored) {
261
+ mutated = true;
262
+ require_logger.logger_default.debug("[BlobExtractor] Stored image blob", {
263
+ ...context,
264
+ hash: stored.hash
265
+ });
266
+ return {
267
+ ...img,
268
+ data: void 0,
269
+ blobRef: stored
270
+ };
271
+ }
272
+ return img;
273
+ }));
257
274
  const turns = response.turns;
258
275
  if (Array.isArray(turns)) next.turns = await Promise.all(turns.map(async (turn, idx) => {
259
276
  if (turn?.audio?.data && typeof turn.audio.data === "string") {
@@ -398,4 +415,4 @@ Object.defineProperty(exports, 'shouldAttemptRemoteBlobUpload', {
398
415
  return shouldAttemptRemoteBlobUpload;
399
416
  }
400
417
  });
401
- //# sourceMappingURL=extractor-D-RM2m6A.cjs.map
418
+ //# sourceMappingURL=extractor-DbhlYEeo.cjs.map
@@ -1,7 +1,7 @@
1
- import { _ as getEnvBool, i as logger_default } from "./logger-q5I8CByj.js";
2
- import { c as cloudConfig } from "./fetch-BIfcW-Fd.js";
3
- import { o as isLoggedIntoCloud } from "./accounts-DxR9x_En.js";
4
- import { a as BLOB_MIN_SIZE, i as BLOB_MAX_SIZE, n as recordBlobReference, r as storeBlob } from "./blobs-Dcm272OH.js";
1
+ import { _ as getEnvBool, i as logger_default } from "./logger-w8Ozp0Td.js";
2
+ import { c as cloudConfig } from "./fetch-18MuNu9i.js";
3
+ import { o as isLoggedIntoCloud } from "./accounts-R3gfCR_g.js";
4
+ import { a as BLOB_MIN_SIZE, i as BLOB_MAX_SIZE, n as recordBlobReference, r as storeBlob } from "./blobs-C9J2mVgo.js";
5
5
  import { createHash } from "crypto";
6
6
 
7
7
  //#region src/util/createHash.ts
@@ -39,7 +39,7 @@ async function uploadBlobRemote(buffer, mimeType, context) {
39
39
  const apiKey = cloudConfig.getApiKey();
40
40
  if (!url || !apiKey) return null;
41
41
  try {
42
- const { fetchWithProxy } = await import("./fetch-CW9GabAi.js");
42
+ const { fetchWithProxy } = await import("./fetch-Bi0o-fdp.js");
43
43
  const response = await fetchWithProxy(url, {
44
44
  method: "POST",
45
45
  headers: {
@@ -254,6 +254,23 @@ async function extractAndStoreBinaryData(response, context) {
254
254
  });
255
255
  }
256
256
  }
257
+ if (response.images?.length) next.images = await Promise.all(response.images.map(async (img, idx) => {
258
+ if (!img.data || typeof img.data !== "string" || !isDataUrl(img.data)) return img;
259
+ const stored = await maybeStore(img.data, img.mimeType || "image/png", blobContext, `response.images[${idx}].data`, "image");
260
+ if (stored) {
261
+ mutated = true;
262
+ logger_default.debug("[BlobExtractor] Stored image blob", {
263
+ ...context,
264
+ hash: stored.hash
265
+ });
266
+ return {
267
+ ...img,
268
+ data: void 0,
269
+ blobRef: stored
270
+ };
271
+ }
272
+ return img;
273
+ }));
257
274
  const turns = response.turns;
258
275
  if (Array.isArray(turns)) next.turns = await Promise.all(turns.map(async (turn, idx) => {
259
276
  if (turn?.audio?.data && typeof turn.audio.data === "string") {
@@ -369,4 +386,4 @@ async function recordExistingBlobReferences(value, context, location) {
369
386
 
370
387
  //#endregion
371
388
  export { sha256 as a, randomSequence as i, isBlobStorageEnabled as n, shouldAttemptRemoteBlobUpload as r, extractAndStoreBinaryData as t };
372
- //# sourceMappingURL=extractor-Da8IxCeS.js.map
389
+ //# sourceMappingURL=extractor-Hs7la_19.js.map
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { b as getEnvBool, o as logger_default } from "./logger-Bzi5o47S.js";
3
- import { c as isLoggedIntoCloud } from "./accounts-BOlMHrvn.js";
4
- import { i as cloudConfig } from "./cloud-ByJVRSQI.js";
5
- import { a as BLOB_MAX_SIZE, i as storeBlob, o as BLOB_MIN_SIZE, r as recordBlobReference } from "./blobs-MlVQyoSc.js";
2
+ import { b as getEnvBool, o as logger_default } from "./logger-BotXmWKW.js";
3
+ import { c as isLoggedIntoCloud } from "./accounts-DHHiXsy6.js";
4
+ import { i as cloudConfig } from "./cloud-BMbRVJFw.js";
5
+ import { a as BLOB_MAX_SIZE, i as storeBlob, o as BLOB_MIN_SIZE, r as recordBlobReference } from "./blobs-kt8v3UyH.js";
6
6
  import { createHash } from "crypto";
7
7
 
8
8
  //#region src/util/createHash.ts
@@ -40,7 +40,7 @@ async function uploadBlobRemote(buffer, mimeType, context) {
40
40
  const apiKey = cloudConfig.getApiKey();
41
41
  if (!url || !apiKey) return null;
42
42
  try {
43
- const { fetchWithProxy } = await import("./fetch-BL6kqunF.js");
43
+ const { fetchWithProxy } = await import("./fetch-DAZkv3gV.js");
44
44
  const response = await fetchWithProxy(url, {
45
45
  method: "POST",
46
46
  headers: {
@@ -255,6 +255,23 @@ async function extractAndStoreBinaryData(response, context) {
255
255
  });
256
256
  }
257
257
  }
258
+ if (response.images?.length) next.images = await Promise.all(response.images.map(async (img, idx) => {
259
+ if (!img.data || typeof img.data !== "string" || !isDataUrl(img.data)) return img;
260
+ const stored = await maybeStore(img.data, img.mimeType || "image/png", blobContext, `response.images[${idx}].data`, "image");
261
+ if (stored) {
262
+ mutated = true;
263
+ logger_default.debug("[BlobExtractor] Stored image blob", {
264
+ ...context,
265
+ hash: stored.hash
266
+ });
267
+ return {
268
+ ...img,
269
+ data: void 0,
270
+ blobRef: stored
271
+ };
272
+ }
273
+ return img;
274
+ }));
258
275
  const turns = response.turns;
259
276
  if (Array.isArray(turns)) next.turns = await Promise.all(turns.map(async (turn, idx) => {
260
277
  if (turn?.audio?.data && typeof turn.audio.data === "string") {
@@ -370,4 +387,4 @@ async function recordExistingBlobReferences(value, context, location) {
370
387
 
371
388
  //#endregion
372
389
  export { sha256 as a, randomSequence as i, isBlobStorageEnabled as n, shouldAttemptRemoteBlobUpload as r, extractAndStoreBinaryData as t };
373
- //# sourceMappingURL=extractor-BA90EtLq.js.map
390
+ //# sourceMappingURL=extractor-LSYjrhK0.js.map
@@ -1,4 +1,4 @@
1
- import { _ as getEnvBool, b as getEnvString, c as sanitizeUrl, g as getConfigDirectoryPath, i as logger_default, r as logRequestResponse, w as cliState_default, y as getEnvInt } from "./logger-q5I8CByj.js";
1
+ import { _ as getEnvBool, b as getEnvString, c as sanitizeUrl, g as getConfigDirectoryPath, i as logger_default, r as logRequestResponse, w as cliState_default, y as getEnvInt } from "./logger-w8Ozp0Td.js";
2
2
  import { t as invariant } from "./invariant-1pAf2CD1.js";
3
3
  import * as fs$1 from "fs";
4
4
  import * as path$1 from "path";
@@ -24,7 +24,7 @@ const HUMAN_ASSERTION_TYPE = "human";
24
24
  * Application version from package.json.
25
25
  * Injected at build time, or read from npm environment in development.
26
26
  */
27
- const VERSION = "0.120.24";
27
+ const VERSION = "0.120.26";
28
28
  /**
29
29
  * PostHog analytics key.
30
30
  * Only populated during production builds via PROMPTFOO_POSTHOG_KEY env var.
@@ -415,7 +415,7 @@ var CloudConfig = class {
415
415
  }
416
416
  async validateAndSetApiToken(token, apiHost) {
417
417
  try {
418
- const { fetchWithProxy } = await import("./fetch-CW9GabAi.js");
418
+ const { fetchWithProxy } = await import("./fetch-Bi0o-fdp.js");
419
419
  const response = await fetchWithProxy(`${apiHost}/api/v1/users/me`, { headers: { Authorization: `Bearer ${token}` } });
420
420
  if (!response.ok) {
421
421
  const errorMessage = await response.text();
@@ -550,8 +550,22 @@ async function monkeyPatchFetch(url, options) {
550
550
  let cachedAgent = null;
551
551
  let cachedAgentConcurrency;
552
552
  let cachedProxyAgents = /* @__PURE__ */ new Map();
553
+ /**
554
+ * Get the connection pool size for HTTP agents.
555
+ * Priority: PROMPTFOO_FETCH_CONNECTIONS env var > CLI -j flag > DEFAULT_MAX_CONCURRENCY (4).
556
+ * Set PROMPTFOO_FETCH_CONNECTIONS to override independently of eval concurrency
557
+ * (e.g., server deployments that need more connections than the default 4).
558
+ */
559
+ function getConnectionPoolSize() {
560
+ const envConnections = getEnvString("PROMPTFOO_FETCH_CONNECTIONS");
561
+ if (envConnections != null) {
562
+ const parsed = parseInt(envConnections, 10);
563
+ if (!isNaN(parsed)) return parsed;
564
+ }
565
+ return cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
566
+ }
553
567
  function getOrCreateAgent(tlsOptions) {
554
- const concurrency = cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
568
+ const concurrency = getConnectionPoolSize();
555
569
  if (cachedAgent && cachedAgentConcurrency !== concurrency) {
556
570
  if (typeof cachedAgent.close === "function") cachedAgent.close();
557
571
  cachedAgent = null;
@@ -577,7 +591,7 @@ function getOrCreateProxyAgent(proxyUrl, tlsOptions) {
577
591
  headersTimeout: REQUEST_TIMEOUT_MS,
578
592
  keepAliveTimeout: 3e4,
579
593
  keepAliveMaxTimeout: 6e4,
580
- connections: cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY
594
+ connections: getConnectionPoolSize()
581
595
  });
582
596
  cachedProxyAgents.set(proxyUrl, agent);
583
597
  }
@@ -630,7 +644,7 @@ async function fetchWithProxy(url, options = {}, abortSignal) {
630
644
  logger_default.warn(`Failed to read CA certificate from ${caCertPath}: ${e}`);
631
645
  }
632
646
  const proxyUrl = finalUrlString ? getProxyForUrl(finalUrlString) : "";
633
- if (proxyUrl) {
647
+ if (!finalOptions.dispatcher) if (proxyUrl) {
634
648
  logger_default.debug(`Using proxy: ${sanitizeUrl(proxyUrl)}`);
635
649
  finalOptions.dispatcher = getOrCreateProxyAgent(proxyUrl, tlsOptions);
636
650
  } else finalOptions.dispatcher = getOrCreateAgent(tlsOptions);
@@ -746,4 +760,4 @@ async function fetchWithRetries(url, options = {}, timeout, maxRetries) {
746
760
 
747
761
  //#endregion
748
762
  export { EVENTS_ENDPOINT as A, toTitleCase as C, CONSENT_ENDPOINT as D, CLOUD_PROVIDER_PREFIX as E, getShareViewBaseUrl as F, POSTHOG_KEY as I, VERSION as L, TERMINAL_MAX_WIDTH as M, getDefaultShareViewBaseUrl as N, DEFAULT_MAX_CONCURRENCY as O, getShareApiBaseUrl as P, FILE_METADATA_KEY as R, parseChatPrompt as S, transformTools as T, isOpenAIToolArray as _, isRateLimited as a, openaiToolChoiceToBedrock as b, cloudConfig as c, writeGlobalConfigPartial as d, getCurrentTimestamp as f, calculateCost as g, REQUEST_TIMEOUT_MS as h, handleRateLimit as i, R_ENDPOINT as j, DEFAULT_QUERY_LIMIT as k, readGlobalConfig as l, LONG_RUNNING_MODEL_TIMEOUT_MS as m, fetchWithRetries as n, isTransientError as o, sleep as p, fetchWithTimeout as r, CloudConfig as s, fetchWithProxy as t, writeGlobalConfig as u, isOpenAIToolChoice as v, transformToolChoice as w, openaiToolsToBedrock as x, isPromptfooSampleTarget as y, HUMAN_ASSERTION_TYPE as z };
749
- //# sourceMappingURL=fetch-BIfcW-Fd.js.map
763
+ //# sourceMappingURL=fetch-18MuNu9i.js.map
@@ -1,4 +1,4 @@
1
- import "./logger-q5I8CByj.js";
2
- import { a as isRateLimited, i as handleRateLimit, n as fetchWithRetries, o as isTransientError, r as fetchWithTimeout, t as fetchWithProxy } from "./fetch-BIfcW-Fd.js";
1
+ import "./logger-w8Ozp0Td.js";
2
+ import { a as isRateLimited, i as handleRateLimit, n as fetchWithRetries, o as isTransientError, r as fetchWithTimeout, t as fetchWithProxy } from "./fetch-18MuNu9i.js";
3
3
 
4
4
  export { fetchWithProxy };
@@ -0,0 +1,4 @@
1
+ require('./logger-BdZ-IqBc.cjs');
2
+ const require_fetch = require('./fetch-ZMn_oemb.cjs');
3
+
4
+ exports.fetchWithProxy = require_fetch.fetchWithProxy;
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import "./logger-BotXmWKW.js";
3
+ import { a as handleRateLimit, i as fetchWithTimeout, n as fetchWithProxy, o as isRateLimited, r as fetchWithRetries, s as isTransientError, t as clearAgentCache } from "./fetch-SRsE6Ctl.js";
4
+ import "./cloud-BMbRVJFw.js";
5
+
6
+ export { fetchWithProxy };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { C as getEnvString, O as cliState_default, S as getEnvInt, a as logRequestResponse, b as getEnvBool, o as logger_default, u as sanitizeUrl } from "./logger-Bzi5o47S.js";
2
+ import { C as getEnvString, O as cliState_default, S as getEnvInt, a as logRequestResponse, b as getEnvBool, o as logger_default, u as sanitizeUrl } from "./logger-BotXmWKW.js";
3
3
  import { t as invariant } from "./invariant-DT20jrBd.js";
4
- import { i as cloudConfig, n as CLOUD_API_HOST } from "./cloud-ByJVRSQI.js";
4
+ import { i as cloudConfig, n as CLOUD_API_HOST } from "./cloud-BMbRVJFw.js";
5
5
  import { Agent, ProxyAgent } from "undici";
6
6
  import path from "path";
7
7
  import yaml from "js-yaml";
@@ -24,7 +24,7 @@ const HUMAN_ASSERTION_TYPE = "human";
24
24
  * Application version from package.json.
25
25
  * Injected at build time, or read from npm environment in development.
26
26
  */
27
- const VERSION = "0.120.24";
27
+ const VERSION = "0.120.26";
28
28
  /**
29
29
  * PostHog analytics key.
30
30
  * Only populated during production builds via PROMPTFOO_POSTHOG_KEY env var.
@@ -369,6 +369,20 @@ let cachedAgent = null;
369
369
  let cachedAgentConcurrency;
370
370
  let cachedProxyAgents = /* @__PURE__ */ new Map();
371
371
  /**
372
+ * Get the connection pool size for HTTP agents.
373
+ * Priority: PROMPTFOO_FETCH_CONNECTIONS env var > CLI -j flag > DEFAULT_MAX_CONCURRENCY (4).
374
+ * Set PROMPTFOO_FETCH_CONNECTIONS to override independently of eval concurrency
375
+ * (e.g., server deployments that need more connections than the default 4).
376
+ */
377
+ function getConnectionPoolSize() {
378
+ const envConnections = getEnvString("PROMPTFOO_FETCH_CONNECTIONS");
379
+ if (envConnections != null) {
380
+ const parsed = parseInt(envConnections, 10);
381
+ if (!isNaN(parsed)) return parsed;
382
+ }
383
+ return cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
384
+ }
385
+ /**
372
386
  * Clear cached agents so the next request creates fresh ones.
373
387
  * Exported for testing only.
374
388
  */
@@ -380,7 +394,7 @@ function clearAgentCache() {
380
394
  cachedProxyAgents = /* @__PURE__ */ new Map();
381
395
  }
382
396
  function getOrCreateAgent(tlsOptions) {
383
- const concurrency = cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
397
+ const concurrency = getConnectionPoolSize();
384
398
  if (cachedAgent && cachedAgentConcurrency !== concurrency) {
385
399
  if (typeof cachedAgent.close === "function") cachedAgent.close();
386
400
  cachedAgent = null;
@@ -406,7 +420,7 @@ function getOrCreateProxyAgent(proxyUrl, tlsOptions) {
406
420
  headersTimeout: REQUEST_TIMEOUT_MS,
407
421
  keepAliveTimeout: 3e4,
408
422
  keepAliveMaxTimeout: 6e4,
409
- connections: cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY
423
+ connections: getConnectionPoolSize()
410
424
  });
411
425
  cachedProxyAgents.set(proxyUrl, agent);
412
426
  }
@@ -459,7 +473,7 @@ async function fetchWithProxy(url, options = {}, abortSignal) {
459
473
  logger_default.warn(`Failed to read CA certificate from ${caCertPath}: ${e}`);
460
474
  }
461
475
  const proxyUrl = finalUrlString ? getProxyForUrl(finalUrlString) : "";
462
- if (proxyUrl) {
476
+ if (!finalOptions.dispatcher) if (proxyUrl) {
463
477
  logger_default.debug(`Using proxy: ${sanitizeUrl(proxyUrl)}`);
464
478
  finalOptions.dispatcher = getOrCreateProxyAgent(proxyUrl, tlsOptions);
465
479
  } else finalOptions.dispatcher = getOrCreateAgent(tlsOptions);
@@ -575,4 +589,4 @@ async function fetchWithRetries(url, options = {}, timeout, maxRetries) {
575
589
 
576
590
  //#endregion
577
591
  export { getDefaultShareViewBaseUrl as A, CONSENT_ENDPOINT as C, R_ENDPOINT as D, EVENTS_ENDPOINT as E, FILE_METADATA_KEY as F, HUMAN_ASSERTION_TYPE as I, getShareViewBaseUrl as M, POSTHOG_KEY as N, TERMINAL_MAX_WIDTH as O, VERSION as P, CLOUD_PROVIDER_PREFIX as S, DEFAULT_QUERY_LIMIT as T, openaiToolsToBedrock as _, handleRateLimit as a, transformToolChoice as b, getCurrentTimestamp as c, REQUEST_TIMEOUT_MS as d, calculateCost as f, openaiToolChoiceToBedrock as g, isPromptfooSampleTarget as h, fetchWithTimeout as i, getShareApiBaseUrl as j, getDefaultPort as k, sleep as l, isOpenAIToolChoice as m, fetchWithProxy as n, isRateLimited as o, isOpenAIToolArray as p, fetchWithRetries as r, isTransientError as s, clearAgentCache as t, LONG_RUNNING_MODEL_TIMEOUT_MS as u, parseChatPrompt as v, DEFAULT_MAX_CONCURRENCY as w, transformTools as x, toTitleCase as y };
578
- //# sourceMappingURL=fetch-Mb7SbeM-.js.map
592
+ //# sourceMappingURL=fetch-SRsE6Ctl.js.map
@@ -1,4 +1,4 @@
1
- const require_logger = require('./logger-CMp-NS-e.cjs');
1
+ const require_logger = require('./logger-BdZ-IqBc.cjs');
2
2
  const require_invariant = require('./invariant-CKcJAQ6M.cjs');
3
3
  let fs = require("fs");
4
4
  fs = require_logger.__toESM(fs);
@@ -27,7 +27,7 @@ const HUMAN_ASSERTION_TYPE = "human";
27
27
  * Application version from package.json.
28
28
  * Injected at build time, or read from npm environment in development.
29
29
  */
30
- const VERSION = "0.120.24";
30
+ const VERSION = "0.120.26";
31
31
  /**
32
32
  * PostHog analytics key.
33
33
  * Only populated during production builds via PROMPTFOO_POSTHOG_KEY env var.
@@ -418,7 +418,7 @@ var CloudConfig = class {
418
418
  }
419
419
  async validateAndSetApiToken(token, apiHost) {
420
420
  try {
421
- const { fetchWithProxy } = await Promise.resolve().then(() => require("./fetch-BH9KSaUC.cjs"));
421
+ const { fetchWithProxy } = await Promise.resolve().then(() => require("./fetch-CMptBDVg.cjs"));
422
422
  const response = await fetchWithProxy(`${apiHost}/api/v1/users/me`, { headers: { Authorization: `Bearer ${token}` } });
423
423
  if (!response.ok) {
424
424
  const errorMessage = await response.text();
@@ -553,8 +553,22 @@ async function monkeyPatchFetch(url, options) {
553
553
  let cachedAgent = null;
554
554
  let cachedAgentConcurrency;
555
555
  let cachedProxyAgents = /* @__PURE__ */ new Map();
556
+ /**
557
+ * Get the connection pool size for HTTP agents.
558
+ * Priority: PROMPTFOO_FETCH_CONNECTIONS env var > CLI -j flag > DEFAULT_MAX_CONCURRENCY (4).
559
+ * Set PROMPTFOO_FETCH_CONNECTIONS to override independently of eval concurrency
560
+ * (e.g., server deployments that need more connections than the default 4).
561
+ */
562
+ function getConnectionPoolSize() {
563
+ const envConnections = require_logger.getEnvString("PROMPTFOO_FETCH_CONNECTIONS");
564
+ if (envConnections != null) {
565
+ const parsed = parseInt(envConnections, 10);
566
+ if (!isNaN(parsed)) return parsed;
567
+ }
568
+ return require_logger.cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
569
+ }
556
570
  function getOrCreateAgent(tlsOptions) {
557
- const concurrency = require_logger.cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY;
571
+ const concurrency = getConnectionPoolSize();
558
572
  if (cachedAgent && cachedAgentConcurrency !== concurrency) {
559
573
  if (typeof cachedAgent.close === "function") cachedAgent.close();
560
574
  cachedAgent = null;
@@ -580,7 +594,7 @@ function getOrCreateProxyAgent(proxyUrl, tlsOptions) {
580
594
  headersTimeout: REQUEST_TIMEOUT_MS,
581
595
  keepAliveTimeout: 3e4,
582
596
  keepAliveMaxTimeout: 6e4,
583
- connections: require_logger.cliState_default.maxConcurrency || DEFAULT_MAX_CONCURRENCY
597
+ connections: getConnectionPoolSize()
584
598
  });
585
599
  cachedProxyAgents.set(proxyUrl, agent);
586
600
  }
@@ -633,7 +647,7 @@ async function fetchWithProxy(url, options = {}, abortSignal) {
633
647
  require_logger.logger_default.warn(`Failed to read CA certificate from ${caCertPath}: ${e}`);
634
648
  }
635
649
  const proxyUrl = finalUrlString ? (0, proxy_from_env.getProxyForUrl)(finalUrlString) : "";
636
- if (proxyUrl) {
650
+ if (!finalOptions.dispatcher) if (proxyUrl) {
637
651
  require_logger.logger_default.debug(`Using proxy: ${require_logger.sanitizeUrl(proxyUrl)}`);
638
652
  finalOptions.dispatcher = getOrCreateProxyAgent(proxyUrl, tlsOptions);
639
653
  } else finalOptions.dispatcher = getOrCreateAgent(tlsOptions);
@@ -982,4 +996,4 @@ Object.defineProperty(exports, 'writeGlobalConfigPartial', {
982
996
  return writeGlobalConfigPartial;
983
997
  }
984
998
  });
985
- //# sourceMappingURL=fetch-MvWxCS5U.cjs.map
999
+ //# sourceMappingURL=fetch-ZMn_oemb.cjs.map
@@ -83,4 +83,4 @@ function isAudioFile(filePath) {
83
83
 
84
84
  //#endregion
85
85
  export { isVideoFile as a, isJavascriptFile as i, isAudioFile as n, isImageFile as r, JAVASCRIPT_EXTENSIONS as t };
86
- //# sourceMappingURL=fileExtensions-CzcPkiKZ.js.map
86
+ //# sourceMappingURL=fileExtensions-BpuMmaFL.js.map