promptfoo 0.120.27 → 0.121.1
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.
- package/README.md +1 -1
- package/dist/src/{ListApp-8WOe2nT6.js → ListApp-Du7YVwj5.js} +2 -4
- package/dist/src/accounts-BgNJDBE6.js +206 -0
- package/dist/src/{accounts-Fl2J3_Fu.cjs → accounts-Bx-x3bmW.cjs} +77 -78
- package/dist/src/{accounts-DVINui-2.js → accounts-CMqkzrVf.js} +39 -34
- package/dist/src/{accounts-CPDRAMND.js → accounts-xrUGFA6n.js} +38 -33
- package/dist/src/{agentic-utils-D922n6mm.js → agentic-utils-BKIN5PKu.js} +9 -10
- package/dist/src/{agents-BO2n8Z0d.cjs → agents-B0f4HICh.cjs} +37 -40
- package/dist/src/{agents-BXLmVsxR.js → agents-C-dDThPK.js} +37 -37
- package/dist/src/{agents-DgJf2-ez.cjs → agents-CErsqg5U.cjs} +16 -17
- package/dist/src/{agents-BcsN_BgB.js → agents-CVIn-Utx.js} +16 -12
- package/dist/src/{agents-hqgSV-3o.js → agents-CXknwsFX.js} +37 -40
- package/dist/src/{agents-pMfppv9Z.js → agents-DeH4Gu94.js} +18 -18
- package/dist/src/{agents-BdUTAwi-.js → agents-Dy2YpZpa.js} +38 -41
- package/dist/src/{agents-DNvSH78i.js → agents-aF4-T121.js} +16 -20
- package/dist/src/{aimlapi-DOib86oE.js → aimlapi-BAGZDo5G.js} +16 -18
- package/dist/src/{aimlapi-DtgPI0nE.js → aimlapi-BNfTBexL.js} +15 -17
- package/dist/src/{aimlapi-DTPACCB1.js → aimlapi-DHRKlBEA.js} +15 -4
- package/dist/src/{aimlapi-BE_Tg9Fl.cjs → aimlapi-tg0Gkcvr.cjs} +15 -16
- package/dist/src/app/assets/index-BFCZg7hQ.js +439 -0
- package/dist/src/app/index.html +1 -1
- package/dist/src/{audio-BRYU0BFo.js → audio-BRODU0UK.js} +7 -9
- package/dist/src/{audio-Cwo68yZS.cjs → audio-BWeaWovU.cjs} +6 -7
- package/dist/src/{audio-BnRUGAm_.js → audio-CHQ4r-RV.js} +6 -5
- package/dist/src/{audio-MSRki4JU.js → audio-tf_NBjlC.js} +6 -8
- package/dist/src/{base-h961VXYk.js → base-B0tcrnq_.js} +11 -13
- package/dist/src/{base-XB2tDJrB.js → base-B4QJRyFS.js} +11 -13
- package/dist/src/{base-pGVmXNl4.cjs → base-DBtwl2FR.cjs} +36 -38
- package/dist/src/base-fEDN28WM.js +193 -0
- package/dist/src/{blobs-BM_e6hCa.js → blobs-BAU-dXan.js} +9 -12
- package/dist/src/{blobs-CR5C4Ihh.js → blobs-Bpg5rH6i.js} +9 -12
- package/dist/src/{blobs-B-KQAFhX.cjs → blobs-DvS-O6be.cjs} +34 -37
- package/dist/src/blobs-qTYm-1PY.js +236 -0
- package/dist/src/{cache-CIpsoBZR.js → cache-8XhNqPKW.js} +64 -67
- package/dist/src/cache-Bbn1Nyrd.cjs +5 -0
- package/dist/src/cache-BwsMSda7.js +6 -0
- package/dist/src/{cache-jsiwsAJv.js → cache-CG0SlR1d.js} +64 -66
- package/dist/src/{cache-BTVYfbka.cjs → cache-COish3-W.cjs} +114 -117
- package/dist/src/cache-D3eqDYGU.js +739 -0
- package/dist/src/{chat-D31K7C4u.cjs → chat-2K608PeQ.cjs} +20 -21
- package/dist/src/chat-BKm79wib.js +764 -0
- package/dist/src/{chat-B84t99NW.js → chat-CM_kyI8B.js} +20 -9
- package/dist/src/{chat-BcPjZXIp.js → chat-CRWNNq73.js} +41 -44
- package/dist/src/{chat-CcUCysjU.js → chat-CznLWr_D.js} +41 -44
- package/dist/src/{chat-DwWifjxi.js → chat-DHMH-N64.js} +20 -22
- package/dist/src/{chat-BE44YOc6.cjs → chat-DaqekjFr.cjs} +61 -64
- package/dist/src/{chat-DZM2GUHO.js → chat-DxysjBvt.js} +21 -23
- package/dist/src/{chatkit-D67HS_0b.js → chatkit-65VXf5SR.js} +58 -58
- package/dist/src/{chatkit-DAB_qfzI.js → chatkit-Be-Q-a9F.js} +58 -60
- package/dist/src/{chatkit-Biqb_wsD.js → chatkit-BxFvW8KY.js} +58 -60
- package/dist/src/{chatkit-PGG4ZYIn.cjs → chatkit-DKyPi1Gs.cjs} +58 -60
- package/dist/src/chunk-DEq-mXcV.js +15 -0
- package/dist/src/chunk-DRamLcfz.js +16 -0
- package/dist/src/{claude-agent-sdk-SVM6AdBu.js → claude-agent-sdk-BLTu0WBO.js} +31 -31
- package/dist/src/{claude-agent-sdk-C9SiaQub.cjs → claude-agent-sdk-CJH22shf.cjs} +31 -28
- package/dist/src/{claude-agent-sdk-C-IOTPfo.js → claude-agent-sdk-D6_k9FKA.js} +31 -29
- package/dist/src/{claude-agent-sdk-CiluSyW1.js → claude-agent-sdk-Dy5lT-Tx.js} +33 -20
- package/dist/src/{cloud-CZ-q9Ier.js → cloud-Bc9526yV.js} +7 -9
- package/dist/src/cloud-DmE0EwsY.js +4 -0
- package/dist/src/{cloudflare-ai-BahKHyhh.js → cloudflare-ai-C9r2sRhw.js} +16 -18
- package/dist/src/{cloudflare-ai-Dxyt50Nl.js → cloudflare-ai-CWWJCRim.js} +16 -4
- package/dist/src/{cloudflare-ai-Dfahv5SY.cjs → cloudflare-ai-ClWSdor4.cjs} +16 -17
- package/dist/src/{cloudflare-ai-v_qZD6_q.js → cloudflare-ai-ICsOuD-z.js} +17 -19
- package/dist/src/{cloudflare-gateway-BPWoZIzJ.cjs → cloudflare-gateway-C2_-KG5o.cjs} +21 -22
- package/dist/src/{cloudflare-gateway-Bi_FpOFy.js → cloudflare-gateway-D6O7AlYb.js} +23 -23
- package/dist/src/{cloudflare-gateway-btS7h1OZ.js → cloudflare-gateway-D6xFc5pa.js} +21 -25
- package/dist/src/{cloudflare-gateway-C0guUNwk.js → cloudflare-gateway-pXGHxJ47.js} +26 -14
- package/dist/src/{codex-sdk-DSxAnbfT.js → codex-sdk-C6UMlxwV.js} +28 -29
- package/dist/src/{codex-sdk-IYVi9fuM.js → codex-sdk-DUwKWezN.js} +28 -27
- package/dist/src/{codex-sdk-DulY0ZRq.js → codex-sdk-GGAw0qbD.js} +28 -29
- package/dist/src/{codex-sdk-DFKMtAyf.cjs → codex-sdk-fAO0c3yA.cjs} +28 -29
- package/dist/src/{cometapi-DkNBMk0G.js → cometapi-BasUi7-_.js} +17 -19
- package/dist/src/{cometapi-DzrR3SR_.js → cometapi-Bbjp5V4x.js} +16 -4
- package/dist/src/{cometapi-C9EEpJzT.js → cometapi-DkXrKi5z.js} +21 -24
- package/dist/src/{cometapi-DIO64tf4.cjs → cometapi-vY6aDZgo.cjs} +21 -22
- package/dist/src/{completion-CG29bfKX.js → completion-6Mx_iXxK.js} +11 -13
- package/dist/src/{completion-Bgf1VJoq.js → completion-C5rtR_9P.js} +11 -13
- package/dist/src/{completion-CCRT4kX1.cjs → completion-CDOouNzq.cjs} +21 -23
- package/dist/src/completion-C_P3ypkJ.js +120 -0
- package/dist/src/{createHash-Dw_iLu31.js → createHash-CTQmL3G2.js} +2 -3
- package/dist/src/{createHash-CYQy4YeL.cjs → createHash-CfZSc0b4.cjs} +13 -14
- package/dist/src/{createHash-CJcfskIZ.js → createHash-Da8fMwqB.js} +2 -3
- package/dist/src/createHash-DmPQkvBh.js +15 -0
- package/dist/src/{docker-D-ayp2FW.js → docker-5KcG-_86.js} +18 -20
- package/dist/src/{docker-DNcLR4Ig.cjs → docker-BwsKwxFs.cjs} +18 -19
- package/dist/src/{docker-egERKxCF.js → docker-CZnqU1XV.js} +18 -7
- package/dist/src/{docker-B81N0t4e.js → docker-DzxyDPIj.js} +19 -21
- package/dist/src/entrypoint.js +2 -3
- package/dist/src/{errors-DnGCbnx8.js → errors-P6ll7XSJ.js} +2 -2
- package/dist/src/{esm-B9dPm_BF.js → esm-C03C-mv3.js} +17 -20
- package/dist/src/{esm-D2pZ87fL.js → esm-CaIwzWR5.js} +18 -21
- package/dist/src/esm-Cd1AjG1D.js +379 -0
- package/dist/src/{esm-Ct-Joyue.cjs → esm-CnNt7sI4.cjs} +47 -49
- package/dist/src/eval-17JizQIv.js +15 -0
- package/dist/src/{eval-C-Nr6wX_.js → eval-DmFyWU7i.js} +47 -54
- package/dist/src/{evalResult-4BzI2tmj.js → evalResult-CDQiuUuf.js} +16 -12
- package/dist/src/{evalResult-DXMWJ3sx.js → evalResult-CTG2AHOS.js} +10 -11
- package/dist/src/evalResult-Cqj8pldJ.js +12 -0
- package/dist/src/{evalResult-CX8wQecI.cjs → evalResult-Dap2CekP.cjs} +20 -21
- package/dist/src/evalResult-DvcJAWJU.cjs +10 -0
- package/dist/src/evalResult-Hftn-S_i.js +10 -0
- package/dist/src/evaluator-B2CFNt-P.js +36 -0
- package/dist/src/{evaluator-8aGyV12L.js → evaluator-DPFRbFIL.js} +201 -229
- package/dist/src/{extractor-CD5yKL-G.js → extractor-CFG6bcWJ.js} +22 -24
- package/dist/src/{extractor-C031XmTA.cjs → extractor-DX36oYEv.cjs} +37 -39
- package/dist/src/{extractor-V5x_m1i0.js → extractor-M67RUtg6.js} +22 -24
- package/dist/src/extractor-YMU_Gvt8.js +374 -0
- package/dist/src/{fetch-D3OHf-lV.js → fetch-4M3YRaqL.js} +40 -45
- package/dist/src/fetch-60Gzydls.js +777 -0
- package/dist/src/{fetch-CXZI9RRr.js → fetch-BMv0O527.js} +23 -35
- package/dist/src/{fetch-BmbD-v1L.cjs → fetch-BxUk8odA.cjs} +244 -277
- package/dist/src/fetch-KV5kNASw.js +5 -0
- package/dist/src/{fileExtensions-ePDqouxn.js → fileExtensions-DnqA1y9x.js} +2 -2
- package/dist/src/{fileExtensions-BpuMmaFL.js → fileExtensions-Ds-foDzt.js} +2 -2
- package/dist/src/fileExtensions-LcDYkU4v.js +85 -0
- package/dist/src/{fileExtensions-DkJYkWUy.cjs → fileExtensions-bYh77CN8.cjs} +27 -28
- package/dist/src/{formatDuration-CdevI3An.js → formatDuration-DgBVMN65.js} +2 -2
- package/dist/src/{genaiTracer-Ce19n68P.js → genaiTracer-70Z8BIuV.js} +2 -3
- package/dist/src/{genaiTracer-CqNnnXrE.js → genaiTracer-C1rxGO8Q.js} +2 -3
- package/dist/src/genaiTracer-D3fD9dNV.js +256 -0
- package/dist/src/{genaiTracer-Dres3qrN.cjs → genaiTracer-DN4dQywX.cjs} +13 -14
- package/dist/src/graders-Bu0H9nXi.js +32 -0
- package/dist/src/{graders-DTeBrzWp.js → graders-CHO8EPM4.js} +349 -397
- package/dist/src/graders-Cfhkvx-e.js +34 -0
- package/dist/src/{graders--1y2u9HO.js → graders-CpdqD9PI.js} +349 -397
- package/dist/src/graders-DClJVpGP.cjs +32 -0
- package/dist/src/{graders-DohM2dir.cjs → graders-DOXycdlG.cjs} +684 -732
- package/dist/src/graders-DcnJsrMO.js +32 -0
- package/dist/src/graders-R9rYUM0d.js +13466 -0
- package/dist/src/{image-C3wHC9_h.js → image-BmEZqVmk.js} +9 -10
- package/dist/src/{image-O1u4bCFg.js → image-CBBVXWuT.js} +9 -10
- package/dist/src/{image-DpKl2F15.cjs → image-CDLQOcqT.cjs} +6 -7
- package/dist/src/{image-DmE-niFE.js → image-DJEvKveK.js} +6 -5
- package/dist/src/{image-CuKHuccK.cjs → image-DTedmQPg.cjs} +29 -30
- package/dist/src/{image-B0U4Hqll.js → image-gvmivTEe.js} +7 -9
- package/dist/src/image-pAX56tPG.js +257 -0
- package/dist/src/{image-DNEIf_aI.js → image-tL5hIOFh.js} +6 -8
- package/dist/src/index.cjs +605 -689
- package/dist/src/index.d.cts +11 -7
- package/dist/src/index.d.ts +11 -3
- package/dist/src/index.js +570 -658
- package/dist/src/{interactiveCheck-Bxj1Swex.js → interactiveCheck-BgLZUIt3.js} +7 -8
- package/dist/src/{invariant-DT20jrBd.js → invariant-BtWWVVhl.js} +2 -2
- package/dist/src/{invariant-1pAf2CD1.js → invariant-Ddh24eXh.js} +2 -2
- package/dist/src/{invariant-CKcJAQ6M.cjs → invariant-kfQ8Bu82.cjs} +7 -8
- package/dist/src/invariant-vgHWClmd.js +25 -0
- package/dist/src/{knowledgeBase-Be_zyW4L.js → knowledgeBase-CLJybhnF.js} +16 -16
- package/dist/src/{knowledgeBase-CEzQobWX.js → knowledgeBase-CoU-UQBg.js} +14 -9
- package/dist/src/{knowledgeBase-BZ41IFwq.js → knowledgeBase-DjWPVqSb.js} +14 -18
- package/dist/src/{knowledgeBase-D-5BMXlr.cjs → knowledgeBase-wkxuRFhA.cjs} +14 -15
- package/dist/src/{litellm-DnbRJ2if.js → litellm-B9Hysuri.js} +16 -18
- package/dist/src/{litellm-CRDqPhNI.js → litellm-CTfa0hqi.js} +15 -17
- package/dist/src/{litellm-hUSNM_M2.cjs → litellm-NYpQ8RQu.cjs} +15 -16
- package/dist/src/{litellm-9vR8zpfU.js → litellm-ePxtr9F1.js} +15 -4
- package/dist/src/{logger-CG1uZPbQ.js → logger-CT3IKMKA.js} +10 -29
- package/dist/src/{logger-B7sBeGa0.cjs → logger-Cp1GPUjj.cjs} +152 -180
- package/dist/src/logger-DLcq4dWf.js +713 -0
- package/dist/src/{logger-LSBxlt7a.js → logger-KkObSCzq.js} +13 -31
- package/dist/src/{luma-ray-Hm3d6VJE.cjs → luma-ray-B0GGNRc1.cjs} +20 -21
- package/dist/src/{luma-ray-drvgdpP9.js → luma-ray-BE2mOt6N.js} +20 -13
- package/dist/src/{luma-ray-4blv9iZ2.js → luma-ray-BW9IRGIc.js} +22 -21
- package/dist/src/{luma-ray-B2__8lYH.js → luma-ray-Cm1KZBhs.js} +20 -23
- package/dist/src/main.js +1170 -1321
- package/dist/src/{messages-XhiwCbi4.cjs → messages-1JrJs91T.cjs} +32 -34
- package/dist/src/{messages-CGPPidQr.js → messages-1x9atZmP.js} +22 -24
- package/dist/src/{messages-Uee41Mj5.js → messages-BLbWdsyt.js} +22 -24
- package/dist/src/messages-D8EA0oDc.js +240 -0
- package/dist/src/{meteor-BYykdXrV.js → meteor-44VjEACX.js} +3 -4
- package/dist/src/{meteor-CsopaHrH.js → meteor-D-SotUw9.js} +3 -4
- package/dist/src/{meteor-e-E-2vVl.cjs → meteor-DLZZ3osF.cjs} +3 -4
- package/dist/src/{meteor-C8lGP6P4.js → meteor-DUiCJRC-.js} +3 -4
- package/dist/src/{modelslab-yKz-ZNB4.js → modelslab-C1OLRmVX.js} +17 -10
- package/dist/src/{modelslab-E9gO-bYd.js → modelslab-CqXBy3U8.js} +18 -20
- package/dist/src/{modelslab-lUVW0cmB.cjs → modelslab-DcOSFwKh.cjs} +17 -18
- package/dist/src/{modelslab-ClBkr8_9.js → modelslab-X5-4LroM.js} +17 -19
- package/dist/src/{nova-reel-Dk8jNpId.js → nova-reel-BgS1ZWuK.js} +20 -13
- package/dist/src/{nova-reel-u2eF2Cxm.js → nova-reel-D2ZkOSyr.js} +22 -21
- package/dist/src/{nova-reel-D8CuO6QH.cjs → nova-reel-D9xfaMBs.cjs} +20 -21
- package/dist/src/{nova-reel-P9bwvtYX.js → nova-reel-DihqLeol.js} +20 -23
- package/dist/src/{nova-sonic-Ds1C-dpm.cjs → nova-sonic-DVu3mMIy.cjs} +30 -31
- package/dist/src/{nova-sonic-CK2rAiKi.js → nova-sonic-DezhVUYT.js} +30 -26
- package/dist/src/{nova-sonic-BaqWlkds.js → nova-sonic-P-CdUMlV.js} +30 -31
- package/dist/src/{nova-sonic-yZapPLv7.js → nova-sonic-Q3BOJeig.js} +31 -32
- package/dist/src/{openai-DUFopMrH.cjs → openai-Cuif0GEt.cjs} +8 -9
- package/dist/src/{openai-PblZ3jUE.js → openai-DElQ-fPX.js} +3 -4
- package/dist/src/{openai-CcN1B8Sb.js → openai-DhbB7eWK.js} +3 -4
- package/dist/src/openai-j-sE2O7r.js +44 -0
- package/dist/src/{openclaw-A-3_loM7.js → openclaw-BiSZPL7J.js} +20 -14
- package/dist/src/{openclaw-COn6QzDi.js → openclaw-Bv1DINsX.js} +20 -27
- package/dist/src/{openclaw-a3lylB-V.js → openclaw-D1D_ej1z.js} +21 -28
- package/dist/src/{openclaw-B6qqDr_u.cjs → openclaw-DAfWQn-o.cjs} +33 -39
- package/dist/src/opencode-sdk-C7m-wRfI.js +560 -0
- package/dist/src/opencode-sdk-CfaLN8PY.cjs +564 -0
- package/dist/src/opencode-sdk-D95s6SnR.js +562 -0
- package/dist/src/opencode-sdk-DxUPkLT7.js +560 -0
- package/dist/src/{otlpReceiver-oyf5wLGC.js → otlpReceiver--AIRW_S4.js} +53 -51
- package/dist/src/{otlpReceiver-BmmTiMjA.js → otlpReceiver-Bn5wGB1v.js} +53 -55
- package/dist/src/{otlpReceiver-lXsYVbpj.cjs → otlpReceiver-Diec4cln.cjs} +53 -55
- package/dist/src/{otlpReceiver-94URx7UW.js → otlpReceiver-g3ByGaXs.js} +53 -55
- package/dist/src/{providerRegistry-Cq_JK_CJ.js → providerRegistry-B0RUOLI_.js} +7 -8
- package/dist/src/{providerRegistry-DSSHjMKf.js → providerRegistry-CD8MEar9.js} +7 -8
- package/dist/src/{providerRegistry-CvHEVJad.cjs → providerRegistry-Civky8Ar.cjs} +12 -13
- package/dist/src/providerRegistry-DM8rZYol.js +45 -0
- package/dist/src/providers-B3HvufyI.js +33246 -0
- package/dist/src/{providers-BnFpbY_s.js → providers-BKRJTjBz.js} +1536 -1669
- package/dist/src/providers-C1rOSHiR.js +32 -0
- package/dist/src/{providers-Iil64vk9.js → providers-CFLy1_ji.js} +1543 -1676
- package/dist/src/{providers-DHbjzW2e.cjs → providers-CFu-TZl-.cjs} +1896 -2029
- package/dist/src/providers-CxmDwEFf.cjs +31 -0
- package/dist/src/providers-Dodakqr0.js +30 -0
- package/dist/src/providers-GIQ2TcsA.js +30 -0
- package/dist/src/{pythonUtils-CcT5LH1M.js → pythonUtils-C3py6GC1.js} +18 -19
- package/dist/src/{pythonUtils-DBbuI3QJ.cjs → pythonUtils-CTU3Y3lw.cjs} +42 -43
- package/dist/src/{pythonUtils-hZ8LeQLv.js → pythonUtils-D5nxkQ0P.js} +18 -19
- package/dist/src/pythonUtils-D6fwaDSg.js +249 -0
- package/dist/src/{quiverai-BuI0tE39.js → quiverai-C2jVwbH1.js} +8 -7
- package/dist/src/{quiverai-DCGSZt4U.js → quiverai-CI6gYJVI.js} +8 -10
- package/dist/src/{quiverai-DiMVJQDz.cjs → quiverai-CLkWkyZc.cjs} +8 -9
- package/dist/src/{quiverai-fQNkExW4.js → quiverai-MHSxbmmZ.js} +9 -11
- package/dist/src/{render-Dj1smHEb.js → render-Drod8m7K.js} +4 -5
- package/dist/src/{responses-DOAFFENS.js → responses-BKqJmhhc.js} +22 -25
- package/dist/src/{responses-CxzoQoBe.js → responses-CGw0DCzh.js} +22 -25
- package/dist/src/responses-jxdehPkC.js +660 -0
- package/dist/src/{responses-ghR3IOfy.cjs → responses-tD4Bd4dc.cjs} +37 -40
- package/dist/src/rubyUtils-BUHu6PhO.js +5 -0
- package/dist/src/{rubyUtils-CwbGmgYN.js → rubyUtils-BUVePouc.js} +27 -20
- package/dist/src/rubyUtils-BcuGX77l.js +222 -0
- package/dist/src/{rubyUtils-DudlFZed.js → rubyUtils-Boc4HZzX.js} +18 -19
- package/dist/src/rubyUtils-CP42kMvq.cjs +4 -0
- package/dist/src/{rubyUtils-C8MhKGHb.cjs → rubyUtils-DhCAlxZr.cjs} +48 -50
- package/dist/src/{sagemaker-gmskuyre.js → sagemaker-BK4Zb993.js} +75 -70
- package/dist/src/{sagemaker-DuM71dVU.js → sagemaker-BfiWTmvn.js} +77 -77
- package/dist/src/{sagemaker-77zbJ2Q2.cjs → sagemaker-CcQHM1jV.cjs} +75 -76
- package/dist/src/{sagemaker-CcxhlOAR.js → sagemaker-D2Q1c-sD.js} +75 -79
- package/dist/src/{scanner-DJYiSXQj.js → scanner-J8CA3LsV.js} +100 -121
- package/dist/src/server/index.js +5505 -67416
- package/dist/src/{server-B5v33lvE.cjs → server-B0PPuDw-.cjs} +57 -67
- package/dist/src/server-B1vi21hA.js +7 -0
- package/dist/src/{server-RV_i_YX5.js → server-BC7XJFgr.js} +19 -24
- package/dist/src/server-Cm9Kai_h.cjs +5 -0
- package/dist/src/{server-BJ4m4f1D.js → server-DbFphssR.js} +26 -29
- package/dist/src/server-OAs3nBRT.js +229 -0
- package/dist/src/{signal-BW33JuId.js → signal-BOTbd53Z.js} +9 -11
- package/dist/src/{slack-DEURelTy.cjs → slack-BmVAVGaK.cjs} +7 -8
- package/dist/src/{slack-BQYeW9L3.js → slack-DCUPTzS2.js} +8 -8
- package/dist/src/{slack-BB6yuZzp.js → slack-DOdy_kyv.js} +7 -8
- package/dist/src/{slack-2pRrhhgJ.js → slack-DXMKtA-f.js} +7 -9
- package/dist/src/store-BNmZ1KAz.cjs +5 -0
- package/dist/src/{store-D7CgQzAR.cjs → store-BSc-TF2w.cjs} +44 -45
- package/dist/src/store-BltJg2cd.js +6 -0
- package/dist/src/{store-s3SftUwF.js → store-D1tv90v3.js} +34 -35
- package/dist/src/{store-DJNsD1iC.js → store-DQLEjuEO.js} +40 -36
- package/dist/src/store-Ub2vaGJ1.js +228 -0
- package/dist/src/{tables-DfTsNN7X.js → tables-5EvT_Bwn.js} +19 -21
- package/dist/src/{tables-BKTmd6u7.cjs → tables-C7K-XKWp.cjs} +89 -91
- package/dist/src/{tables-DMegD0Xf.js → tables-D36WTqKX.js} +21 -23
- package/dist/src/tables-xKANLRBD.js +288 -0
- package/dist/src/telemetry-5BCRNBbe.cjs +5 -0
- package/dist/src/{telemetry-BedSm-bZ.js → telemetry-C15ziL8u.js} +17 -14
- package/dist/src/{telemetry--WAdAfVi.js → telemetry-C2YDkUQH.js} +11 -13
- package/dist/src/{telemetry-DQgVBCAb.cjs → telemetry-CbrnxHp_.cjs} +21 -24
- package/dist/src/telemetry-D4W5hboe.js +7 -0
- package/dist/src/telemetry-DMb2Mpfm.js +171 -0
- package/dist/src/{text-oiSbwSOI.js → text-B_UCRPp2.js} +2 -2
- package/dist/src/{text-oKzCBnK6.cjs → text-CW1cyrwj.cjs} +12 -13
- package/dist/src/{text-B_IrO4GZ.js → text-Db-Wt2u2.js} +2 -2
- package/dist/src/text-TIv0QYnd.js +22 -0
- package/dist/src/{tokenUsageUtils-FZd5O_4A.js → tokenUsageUtils-BDGe-iyI.js} +2 -2
- package/dist/src/{tokenUsageUtils-DmZSD2eU.js → tokenUsageUtils-DflFMjS0.js} +2 -2
- package/dist/src/tokenUsageUtils-NYT-WKS6.js +138 -0
- package/dist/src/{tokenUsageUtils-CXhxVj72.cjs → tokenUsageUtils-bVa1ga6f.cjs} +32 -33
- package/dist/src/{transcription-BO1AHegO.cjs → transcription-CL78qbOU.cjs} +14 -15
- package/dist/src/{transcription-mYS9vd5v.js → transcription-DAtxHhAM.js} +14 -7
- package/dist/src/{transcription-X2-B4vkX.js → transcription-LNZTNUUL.js} +14 -16
- package/dist/src/{transcription-lzBLiTFJ.js → transcription-QHh3AH6Z.js} +15 -17
- package/dist/src/{transform-DeGlxb0D.js → transform-Cgi24fJ7.js} +39 -47
- package/dist/src/{transform-B1Hi5lWS.cjs → transform-CzK1Q0zl.cjs} +24 -26
- package/dist/src/{transform-CYDILYDe.js → transform-DECvGmzp.js} +15 -13
- package/dist/src/{transform-Dfl89yi4.js → transform-DGLazrMm.js} +39 -47
- package/dist/src/transform-DGxXocjk.js +1506 -0
- package/dist/src/{transform-D5PjiWiZ.cjs → transform-DOcQeLld.cjs} +179 -187
- package/dist/src/transform-DTGDnAzW.js +6 -0
- package/dist/src/{transform-BEgStbHK.js → transform-DilY9wbS.js} +10 -12
- package/dist/src/transform-aa6tmVpZ.js +216 -0
- package/dist/src/transform-m3qNw4KP.cjs +5 -0
- package/dist/src/{transformersAvailability-SZnTS3pJ.js → transformersAvailability-CEVM2GNQ.js} +2 -2
- package/dist/src/{transformersAvailability-D-glmEy7.cjs → transformersAvailability-CwayUSlh.cjs} +2 -3
- package/dist/src/{transformersAvailability-CjeFXhuJ.js → transformersAvailability-D6c6ROpT.js} +2 -2
- package/dist/src/{types-CXQduE9o.js → types-CH3Ge2sE.js} +30 -90
- package/dist/src/{types-C5hEkb-x.js → types-CLKiCBW3.js} +25 -89
- package/dist/src/types-CN_TZ2GJ.js +3260 -0
- package/dist/src/{types-DWNf48sT.cjs → types-LJ0r3wbR.cjs} +500 -564
- package/dist/src/util-5cB-L7U3.js +1430 -0
- package/dist/src/util-6-GqIvzS.js +599 -0
- package/dist/src/{util-CoQjmE3u.js → util-B7T3SiBS.js} +4 -5
- package/dist/src/{util-D9eLdGfa.js → util-Betm42rL.js} +5 -6
- package/dist/src/{util-Bm_-UMD_.js → util-C-PPYSMq.js} +5 -6
- package/dist/src/{util-CyUdMzV0.cjs → util-CchiqXh_.cjs} +34 -35
- package/dist/src/{util-Du96oyYS.js → util-DaWTWKBK.js} +4 -5
- package/dist/src/{util-1wWM599Z.cjs → util-Db0a0AFH.cjs} +50 -51
- package/dist/src/{util-DQ984syk.js → util-Dlz_Wvgm.js} +37 -48
- package/dist/src/{util-_h4pVqrz.js → util-YT5HPZaS.js} +37 -48
- package/dist/src/{util-aLhtl3fe.cjs → util-Yz-1aEhW.cjs} +209 -220
- package/dist/src/util-ZZH-3QZz.js +293 -0
- package/dist/src/{utils-BjLy-Q72.cjs → utils-Cz9qXqII.cjs} +29 -32
- package/dist/src/{utils-CFMn2yHW.js → utils-XiOAgly5.js} +4 -7
- package/dist/src/utils-dLokC-eR.js +94 -0
- package/dist/src/{utils-DvWMzuMx.js → utils-f2-Moju7.js} +4 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +30 -30
- package/dist/src/app/assets/index-B2D0bCSI.js +0 -439
- package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
- package/dist/src/cache-ChPcurj7.js +0 -6
- package/dist/src/cache-VVu_W-yg.js +0 -8
- package/dist/src/cache-YLNCFEM2.cjs +0 -6
- package/dist/src/chunk-DHDDz29n.js +0 -22
- package/dist/src/chunk-FhC4c-0y.js +0 -21
- package/dist/src/cloud-BndfXy4H.js +0 -5
- package/dist/src/eval-BhHvMY82.js +0 -17
- package/dist/src/evalResult-Dq2gFNQY.js +0 -12
- package/dist/src/evalResult-nmcP5VKH.cjs +0 -12
- package/dist/src/evalResult-trqZjVYh.js +0 -14
- package/dist/src/evaluator-CnfPstzT.js +0 -39
- package/dist/src/fetch-IDPDue6F.cjs +0 -4
- package/dist/src/fetch-hKJ-It8q.js +0 -6
- package/dist/src/fetch-ouKnrWK-.js +0 -4
- package/dist/src/graders-CQn7WUsd.cjs +0 -34
- package/dist/src/graders-DC6QAbpW.js +0 -35
- package/dist/src/graders-DUWz3Y7j.js +0 -37
- package/dist/src/opencode-sdk-4bL9n-Gk.js +0 -382
- package/dist/src/opencode-sdk-BfC2zWcR.js +0 -376
- package/dist/src/opencode-sdk-DMJyuwMg.js +0 -380
- package/dist/src/opencode-sdk-Da-9adza.cjs +0 -383
- package/dist/src/providers-CsXB2Ix-.js +0 -35
- package/dist/src/providers-DO8ltjLC.js +0 -33
- package/dist/src/providers-Dtq-xnXd.cjs +0 -33
- package/dist/src/rubyUtils-BUbcND2f.js +0 -6
- package/dist/src/rubyUtils-Cr55X_KE.js +0 -5
- package/dist/src/rubyUtils-DlIiqoYo.cjs +0 -5
- package/dist/src/server-C2eQH4Gu.js +0 -6
- package/dist/src/server-CXWycu7H.cjs +0 -6
- package/dist/src/server-Q6OGlxxT.js +0 -8
- package/dist/src/store-B3EDO9Q3.js +0 -7
- package/dist/src/store-Dl9F8aw5.js +0 -6
- package/dist/src/store-SnrGrlt9.cjs +0 -6
- package/dist/src/telemetry-BGhiPZtl.js +0 -8
- package/dist/src/telemetry-CFfiYan6.cjs +0 -6
- package/dist/src/telemetry-DHzEduxX.js +0 -6
- package/dist/src/transform-C1x1ZlMQ.cjs +0 -6
- package/dist/src/transform-DYHjFmQu.js +0 -8
- package/dist/src/transform-rmwJT5JQ.js +0 -7
- package/dist/src/transformersAvailability-eJooj0gX.js +0 -35
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
import { d as getAjv, m as safeJsonStringify } from "./logger-DLcq4dWf.js";
|
|
2
|
+
import { m as calculateCost } from "./fetch-4M3YRaqL.js";
|
|
3
|
+
import { E as maybeLoadFromExternalFileWithVars } from "./util-5cB-L7U3.js";
|
|
4
|
+
import OpenAI from "openai";
|
|
5
|
+
//#region src/providers/openai/util.ts
|
|
6
|
+
const ajv = getAjv();
|
|
7
|
+
const OPENAI_CHAT_MODELS = [
|
|
8
|
+
{
|
|
9
|
+
id: "gpt-4o-mini-tts",
|
|
10
|
+
cost: {
|
|
11
|
+
input: .6 / 1e6,
|
|
12
|
+
output: 0 / 1e6,
|
|
13
|
+
audioOutput: 12 / 1e6
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
...["gpt-4o-search-preview", "gpt-4o-search-preview-2025-03-11"].map((model) => ({
|
|
17
|
+
id: model,
|
|
18
|
+
cost: {
|
|
19
|
+
input: 2.5 / 1e6,
|
|
20
|
+
output: 10 / 1e6
|
|
21
|
+
}
|
|
22
|
+
})),
|
|
23
|
+
...["gpt-4o-mini-search-preview", "gpt-4o-mini-search-preview-2025-03-11"].map((model) => ({
|
|
24
|
+
id: model,
|
|
25
|
+
cost: {
|
|
26
|
+
input: .15 / 1e6,
|
|
27
|
+
output: .6 / 1e6
|
|
28
|
+
}
|
|
29
|
+
})),
|
|
30
|
+
...["computer-use-preview", "computer-use-preview-2025-03-11"].map((model) => ({
|
|
31
|
+
id: model,
|
|
32
|
+
cost: {
|
|
33
|
+
input: 3 / 1e6,
|
|
34
|
+
output: 12 / 1e6
|
|
35
|
+
}
|
|
36
|
+
})),
|
|
37
|
+
...["chatgpt-4o-latest"].map((model) => ({
|
|
38
|
+
id: model,
|
|
39
|
+
cost: {
|
|
40
|
+
input: 5 / 1e6,
|
|
41
|
+
output: 15 / 1e6
|
|
42
|
+
}
|
|
43
|
+
})),
|
|
44
|
+
...["gpt-4.1", "gpt-4.1-2025-04-14"].map((model) => ({
|
|
45
|
+
id: model,
|
|
46
|
+
cost: {
|
|
47
|
+
input: 2 / 1e6,
|
|
48
|
+
output: 8 / 1e6
|
|
49
|
+
}
|
|
50
|
+
})),
|
|
51
|
+
...["gpt-4.1-mini", "gpt-4.1-mini-2025-04-14"].map((model) => ({
|
|
52
|
+
id: model,
|
|
53
|
+
cost: {
|
|
54
|
+
input: .4 / 1e6,
|
|
55
|
+
output: 1.6 / 1e6
|
|
56
|
+
}
|
|
57
|
+
})),
|
|
58
|
+
...["gpt-4.1-nano", "gpt-4.1-nano-2025-04-14"].map((model) => ({
|
|
59
|
+
id: model,
|
|
60
|
+
cost: {
|
|
61
|
+
input: .1 / 1e6,
|
|
62
|
+
output: .4 / 1e6
|
|
63
|
+
}
|
|
64
|
+
})),
|
|
65
|
+
...["o1-pro", "o1-pro-2025-03-19"].map((model) => ({
|
|
66
|
+
id: model,
|
|
67
|
+
cost: {
|
|
68
|
+
input: 150 / 1e6,
|
|
69
|
+
output: 600 / 1e6
|
|
70
|
+
}
|
|
71
|
+
})),
|
|
72
|
+
...[
|
|
73
|
+
"o1",
|
|
74
|
+
"o1-2024-12-17",
|
|
75
|
+
"o1-preview",
|
|
76
|
+
"o1-preview-2024-09-12"
|
|
77
|
+
].map((model) => ({
|
|
78
|
+
id: model,
|
|
79
|
+
cost: {
|
|
80
|
+
input: 15 / 1e6,
|
|
81
|
+
output: 60 / 1e6
|
|
82
|
+
}
|
|
83
|
+
})),
|
|
84
|
+
...["o1-mini", "o1-mini-2024-09-12"].map((model) => ({
|
|
85
|
+
id: model,
|
|
86
|
+
cost: {
|
|
87
|
+
input: 1.1 / 1e6,
|
|
88
|
+
output: 4.4 / 1e6
|
|
89
|
+
}
|
|
90
|
+
})),
|
|
91
|
+
...["o3", "o3-2025-04-16"].map((model) => ({
|
|
92
|
+
id: model,
|
|
93
|
+
cost: {
|
|
94
|
+
input: 2 / 1e6,
|
|
95
|
+
output: 8 / 1e6
|
|
96
|
+
}
|
|
97
|
+
})),
|
|
98
|
+
...["o3-pro", "o3-pro-2025-06-10"].map((model) => ({
|
|
99
|
+
id: model,
|
|
100
|
+
cost: {
|
|
101
|
+
input: 20 / 1e6,
|
|
102
|
+
output: 80 / 1e6
|
|
103
|
+
}
|
|
104
|
+
})),
|
|
105
|
+
...["o3-mini", "o3-mini-2025-01-31"].map((model) => ({
|
|
106
|
+
id: model,
|
|
107
|
+
cost: {
|
|
108
|
+
input: 1.1 / 1e6,
|
|
109
|
+
output: 4.4 / 1e6
|
|
110
|
+
}
|
|
111
|
+
})),
|
|
112
|
+
...[
|
|
113
|
+
"gpt-4o-audio-preview",
|
|
114
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
115
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
116
|
+
"gpt-4o-audio-preview-2025-06-03"
|
|
117
|
+
].map((model) => ({
|
|
118
|
+
id: model,
|
|
119
|
+
cost: {
|
|
120
|
+
input: 2.5 / 1e6,
|
|
121
|
+
output: 10 / 1e6,
|
|
122
|
+
audioInput: 40 / 1e6,
|
|
123
|
+
audioOutput: 80 / 1e6
|
|
124
|
+
}
|
|
125
|
+
})),
|
|
126
|
+
...["gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17"].map((model) => ({
|
|
127
|
+
id: model,
|
|
128
|
+
cost: {
|
|
129
|
+
input: .15 / 1e6,
|
|
130
|
+
output: .6 / 1e6,
|
|
131
|
+
audioInput: 10 / 1e6,
|
|
132
|
+
audioOutput: 20 / 1e6
|
|
133
|
+
}
|
|
134
|
+
})),
|
|
135
|
+
...[
|
|
136
|
+
"gpt-4o",
|
|
137
|
+
"gpt-4o-2024-11-20",
|
|
138
|
+
"gpt-4o-2024-08-06"
|
|
139
|
+
].map((model) => ({
|
|
140
|
+
id: model,
|
|
141
|
+
cost: {
|
|
142
|
+
input: 2.5 / 1e6,
|
|
143
|
+
output: 10 / 1e6
|
|
144
|
+
}
|
|
145
|
+
})),
|
|
146
|
+
...["gpt-4o-2024-05-13"].map((model) => ({
|
|
147
|
+
id: model,
|
|
148
|
+
cost: {
|
|
149
|
+
input: 5 / 1e6,
|
|
150
|
+
output: 15 / 1e6
|
|
151
|
+
}
|
|
152
|
+
})),
|
|
153
|
+
...["gpt-4o-mini", "gpt-4o-mini-2024-07-18"].map((model) => ({
|
|
154
|
+
id: model,
|
|
155
|
+
cost: {
|
|
156
|
+
input: .15 / 1e6,
|
|
157
|
+
output: .6 / 1e6
|
|
158
|
+
}
|
|
159
|
+
})),
|
|
160
|
+
...[
|
|
161
|
+
"gpt-4",
|
|
162
|
+
"gpt-4-0613",
|
|
163
|
+
"gpt-4-0314"
|
|
164
|
+
].map((model) => ({
|
|
165
|
+
id: model,
|
|
166
|
+
cost: {
|
|
167
|
+
input: 30 / 1e6,
|
|
168
|
+
output: 60 / 1e6
|
|
169
|
+
}
|
|
170
|
+
})),
|
|
171
|
+
...[
|
|
172
|
+
"gpt-4-32k",
|
|
173
|
+
"gpt-4-32k-0314",
|
|
174
|
+
"gpt-4-32k-0613"
|
|
175
|
+
].map((model) => ({
|
|
176
|
+
id: model,
|
|
177
|
+
cost: {
|
|
178
|
+
input: 60 / 1e6,
|
|
179
|
+
output: 120 / 1e6
|
|
180
|
+
}
|
|
181
|
+
})),
|
|
182
|
+
...[
|
|
183
|
+
"gpt-4-turbo",
|
|
184
|
+
"gpt-4-turbo-2024-04-09",
|
|
185
|
+
"gpt-4-turbo-preview",
|
|
186
|
+
"gpt-4-0125-preview",
|
|
187
|
+
"gpt-4-1106-preview",
|
|
188
|
+
"gpt-4-1106-vision-preview",
|
|
189
|
+
"gpt-4-vision-preview"
|
|
190
|
+
].map((model) => ({
|
|
191
|
+
id: model,
|
|
192
|
+
cost: {
|
|
193
|
+
input: 10 / 1e6,
|
|
194
|
+
output: 30 / 1e6
|
|
195
|
+
}
|
|
196
|
+
})),
|
|
197
|
+
{
|
|
198
|
+
id: "gpt-3.5-turbo",
|
|
199
|
+
cost: {
|
|
200
|
+
input: .5 / 1e6,
|
|
201
|
+
output: 1.5 / 1e6
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "gpt-3.5-turbo-0125",
|
|
206
|
+
cost: {
|
|
207
|
+
input: .5 / 1e6,
|
|
208
|
+
output: 1.5 / 1e6
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "gpt-3.5-turbo-1106",
|
|
213
|
+
cost: {
|
|
214
|
+
input: 1 / 1e6,
|
|
215
|
+
output: 2 / 1e6
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
...["gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613"].map((model) => ({
|
|
219
|
+
id: model,
|
|
220
|
+
cost: {
|
|
221
|
+
input: 1.5 / 1e6,
|
|
222
|
+
output: 2 / 1e6
|
|
223
|
+
}
|
|
224
|
+
})),
|
|
225
|
+
...["gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613"].map((model) => ({
|
|
226
|
+
id: model,
|
|
227
|
+
cost: {
|
|
228
|
+
input: 3 / 1e6,
|
|
229
|
+
output: 4 / 1e6
|
|
230
|
+
}
|
|
231
|
+
})),
|
|
232
|
+
...["gpt-3.5-turbo-instruct"].map((model) => ({
|
|
233
|
+
id: model,
|
|
234
|
+
cost: {
|
|
235
|
+
input: 1.5 / 1e6,
|
|
236
|
+
output: 2 / 1e6
|
|
237
|
+
}
|
|
238
|
+
})),
|
|
239
|
+
...["o4-mini", "o4-mini-2025-04-16"].map((model) => ({
|
|
240
|
+
id: model,
|
|
241
|
+
cost: {
|
|
242
|
+
input: 1.1 / 1e6,
|
|
243
|
+
output: 4.4 / 1e6
|
|
244
|
+
}
|
|
245
|
+
})),
|
|
246
|
+
...[
|
|
247
|
+
"gpt-5",
|
|
248
|
+
"gpt-5-2025-08-07",
|
|
249
|
+
"gpt-5-chat",
|
|
250
|
+
"gpt-5-chat-latest"
|
|
251
|
+
].map((model) => ({
|
|
252
|
+
id: model,
|
|
253
|
+
cost: {
|
|
254
|
+
input: 1.25 / 1e6,
|
|
255
|
+
output: 10 / 1e6
|
|
256
|
+
}
|
|
257
|
+
})),
|
|
258
|
+
...["gpt-5-nano", "gpt-5-nano-2025-08-07"].map((model) => ({
|
|
259
|
+
id: model,
|
|
260
|
+
cost: {
|
|
261
|
+
input: .05 / 1e6,
|
|
262
|
+
output: .4 / 1e6
|
|
263
|
+
}
|
|
264
|
+
})),
|
|
265
|
+
...["gpt-5-mini", "gpt-5-mini-2025-08-07"].map((model) => ({
|
|
266
|
+
id: model,
|
|
267
|
+
cost: {
|
|
268
|
+
input: .25 / 1e6,
|
|
269
|
+
output: 2 / 1e6
|
|
270
|
+
}
|
|
271
|
+
})),
|
|
272
|
+
...["codex-mini-latest"].map((model) => ({
|
|
273
|
+
id: model,
|
|
274
|
+
cost: {
|
|
275
|
+
input: 1.5 / 1e6,
|
|
276
|
+
output: 6 / 1e6
|
|
277
|
+
}
|
|
278
|
+
})),
|
|
279
|
+
...["gpt-5-codex"].map((model) => ({
|
|
280
|
+
id: model,
|
|
281
|
+
cost: {
|
|
282
|
+
input: 1.25 / 1e6,
|
|
283
|
+
output: 10 / 1e6
|
|
284
|
+
}
|
|
285
|
+
})),
|
|
286
|
+
...["gpt-5-pro", "gpt-5-pro-2025-10-06"].map((model) => ({
|
|
287
|
+
id: model,
|
|
288
|
+
cost: {
|
|
289
|
+
input: 15 / 1e6,
|
|
290
|
+
output: 120 / 1e6
|
|
291
|
+
}
|
|
292
|
+
})),
|
|
293
|
+
...[
|
|
294
|
+
"gpt-5.1",
|
|
295
|
+
"gpt-5.1-2025-11-13",
|
|
296
|
+
"gpt-5.1-chat-latest"
|
|
297
|
+
].map((model) => ({
|
|
298
|
+
id: model,
|
|
299
|
+
cost: {
|
|
300
|
+
input: 1.25 / 1e6,
|
|
301
|
+
output: 10 / 1e6
|
|
302
|
+
}
|
|
303
|
+
})),
|
|
304
|
+
...["gpt-5.1-nano"].map((model) => ({
|
|
305
|
+
id: model,
|
|
306
|
+
cost: {
|
|
307
|
+
input: .05 / 1e6,
|
|
308
|
+
output: .4 / 1e6
|
|
309
|
+
}
|
|
310
|
+
})),
|
|
311
|
+
...["gpt-5.1-mini"].map((model) => ({
|
|
312
|
+
id: model,
|
|
313
|
+
cost: {
|
|
314
|
+
input: .25 / 1e6,
|
|
315
|
+
output: 2 / 1e6
|
|
316
|
+
}
|
|
317
|
+
})),
|
|
318
|
+
...["gpt-5.1-codex", "gpt-5.1-codex-max"].map((model) => ({
|
|
319
|
+
id: model,
|
|
320
|
+
cost: {
|
|
321
|
+
input: 1.25 / 1e6,
|
|
322
|
+
output: 10 / 1e6
|
|
323
|
+
}
|
|
324
|
+
})),
|
|
325
|
+
...[
|
|
326
|
+
"gpt-5.2",
|
|
327
|
+
"gpt-5.2-2025-12-11",
|
|
328
|
+
"gpt-5.2-chat-latest",
|
|
329
|
+
"gpt-5.2-codex"
|
|
330
|
+
].map((model) => ({
|
|
331
|
+
id: model,
|
|
332
|
+
cost: {
|
|
333
|
+
input: 1.75 / 1e6,
|
|
334
|
+
output: 14 / 1e6
|
|
335
|
+
}
|
|
336
|
+
})),
|
|
337
|
+
...["gpt-5.2-pro", "gpt-5.2-pro-2025-12-11"].map((model) => ({
|
|
338
|
+
id: model,
|
|
339
|
+
cost: {
|
|
340
|
+
input: 15 / 1e6,
|
|
341
|
+
output: 120 / 1e6
|
|
342
|
+
}
|
|
343
|
+
})),
|
|
344
|
+
...["gpt-5.3-chat-latest", "gpt-5.3-codex"].map((model) => ({
|
|
345
|
+
id: model,
|
|
346
|
+
cost: {
|
|
347
|
+
input: 1.75 / 1e6,
|
|
348
|
+
output: 14 / 1e6
|
|
349
|
+
}
|
|
350
|
+
})),
|
|
351
|
+
...["gpt-5.3-codex-spark"].map((model) => ({
|
|
352
|
+
id: model,
|
|
353
|
+
cost: {
|
|
354
|
+
input: .5 / 1e6,
|
|
355
|
+
output: 4 / 1e6
|
|
356
|
+
}
|
|
357
|
+
})),
|
|
358
|
+
...["gpt-5.4", "gpt-5.4-2026-03-05"].map((model) => ({
|
|
359
|
+
id: model,
|
|
360
|
+
cost: {
|
|
361
|
+
input: 2.5 / 1e6,
|
|
362
|
+
output: 15 / 1e6
|
|
363
|
+
}
|
|
364
|
+
})),
|
|
365
|
+
...["gpt-5.4-pro", "gpt-5.4-pro-2026-03-05"].map((model) => ({
|
|
366
|
+
id: model,
|
|
367
|
+
cost: {
|
|
368
|
+
input: 30 / 1e6,
|
|
369
|
+
output: 180 / 1e6
|
|
370
|
+
}
|
|
371
|
+
})),
|
|
372
|
+
...["gpt-audio", "gpt-audio-2025-08-28"].map((model) => ({
|
|
373
|
+
id: model,
|
|
374
|
+
cost: {
|
|
375
|
+
input: 2.5 / 1e6,
|
|
376
|
+
output: 10 / 1e6,
|
|
377
|
+
audioInput: 40 / 1e6,
|
|
378
|
+
audioOutput: 80 / 1e6
|
|
379
|
+
}
|
|
380
|
+
})),
|
|
381
|
+
...["gpt-audio-mini", "gpt-audio-mini-2025-10-06"].map((model) => ({
|
|
382
|
+
id: model,
|
|
383
|
+
cost: {
|
|
384
|
+
input: .6 / 1e6,
|
|
385
|
+
output: 2.4 / 1e6,
|
|
386
|
+
audioInput: 10 / 1e6,
|
|
387
|
+
audioOutput: 20 / 1e6
|
|
388
|
+
}
|
|
389
|
+
}))
|
|
390
|
+
];
|
|
391
|
+
const OPENAI_DEEP_RESEARCH_MODELS = [...["o3-deep-research", "o3-deep-research-2025-06-26"].map((model) => ({
|
|
392
|
+
id: model,
|
|
393
|
+
cost: {
|
|
394
|
+
input: 10 / 1e6,
|
|
395
|
+
output: 40 / 1e6
|
|
396
|
+
}
|
|
397
|
+
})), ...["o4-mini-deep-research", "o4-mini-deep-research-2025-06-26"].map((model) => ({
|
|
398
|
+
id: model,
|
|
399
|
+
cost: {
|
|
400
|
+
input: 2 / 1e6,
|
|
401
|
+
output: 8 / 1e6
|
|
402
|
+
}
|
|
403
|
+
}))];
|
|
404
|
+
const OPENAI_COMPLETION_MODELS = [
|
|
405
|
+
{
|
|
406
|
+
id: "gpt-3.5-turbo-instruct",
|
|
407
|
+
cost: {
|
|
408
|
+
input: 1.5 / 1e6,
|
|
409
|
+
output: 2 / 1e6
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{ id: "text-davinci-002" },
|
|
413
|
+
{ id: "text-babbage-002" }
|
|
414
|
+
];
|
|
415
|
+
const OPENAI_REALTIME_MODELS = [
|
|
416
|
+
{
|
|
417
|
+
id: "gpt-realtime",
|
|
418
|
+
type: "chat",
|
|
419
|
+
cost: {
|
|
420
|
+
input: 32 / 1e6,
|
|
421
|
+
output: 64 / 1e6,
|
|
422
|
+
audioInput: 32 / 1e6,
|
|
423
|
+
audioOutput: 64 / 1e6
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
id: "gpt-realtime",
|
|
428
|
+
type: "chat",
|
|
429
|
+
cost: {
|
|
430
|
+
input: 4 / 1e6,
|
|
431
|
+
output: 16 / 1e6,
|
|
432
|
+
audioInput: 40 / 1e6,
|
|
433
|
+
audioOutput: 80 / 1e6
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
id: "gpt-4o-realtime-preview",
|
|
438
|
+
type: "chat",
|
|
439
|
+
cost: {
|
|
440
|
+
input: 5 / 1e6,
|
|
441
|
+
output: 20 / 1e6,
|
|
442
|
+
audioInput: 40 / 1e6,
|
|
443
|
+
audioOutput: 80 / 1e6
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: "gpt-4o-realtime-preview-2024-12-17",
|
|
448
|
+
type: "chat",
|
|
449
|
+
cost: {
|
|
450
|
+
input: 5 / 1e6,
|
|
451
|
+
output: 20 / 1e6,
|
|
452
|
+
audioInput: 40 / 1e6,
|
|
453
|
+
audioOutput: 80 / 1e6
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: "gpt-4o-realtime-preview-2024-10-01",
|
|
458
|
+
type: "chat",
|
|
459
|
+
cost: {
|
|
460
|
+
input: 5 / 1e6,
|
|
461
|
+
output: 20 / 1e6,
|
|
462
|
+
audioInput: 100 / 1e6,
|
|
463
|
+
audioOutput: 200 / 1e6
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
id: "gpt-4o-mini-realtime-preview",
|
|
468
|
+
type: "chat",
|
|
469
|
+
cost: {
|
|
470
|
+
input: .6 / 1e6,
|
|
471
|
+
output: 2.4 / 1e6,
|
|
472
|
+
audioInput: 10 / 1e6,
|
|
473
|
+
audioOutput: 20 / 1e6
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
id: "gpt-4o-mini-realtime-preview-2024-12-17",
|
|
478
|
+
type: "chat",
|
|
479
|
+
cost: {
|
|
480
|
+
input: .6 / 1e6,
|
|
481
|
+
output: 2.4 / 1e6,
|
|
482
|
+
audioInput: 10 / 1e6,
|
|
483
|
+
audioOutput: 20 / 1e6
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "gpt-realtime-mini",
|
|
488
|
+
type: "chat",
|
|
489
|
+
cost: {
|
|
490
|
+
input: .6 / 1e6,
|
|
491
|
+
output: 2.4 / 1e6,
|
|
492
|
+
audioInput: 10 / 1e6,
|
|
493
|
+
audioOutput: 20 / 1e6
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: "gpt-realtime-mini-2025-10-06",
|
|
498
|
+
type: "chat",
|
|
499
|
+
cost: {
|
|
500
|
+
input: .6 / 1e6,
|
|
501
|
+
output: 2.4 / 1e6,
|
|
502
|
+
audioInput: 10 / 1e6,
|
|
503
|
+
audioOutput: 20 / 1e6
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
];
|
|
507
|
+
const OPENAI_TRANSCRIPTION_MODELS = [
|
|
508
|
+
{
|
|
509
|
+
id: "gpt-4o-transcribe",
|
|
510
|
+
cost: { perMinute: .006 }
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
id: "gpt-4o-mini-transcribe",
|
|
514
|
+
cost: { perMinute: .003 }
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
id: "gpt-4o-transcribe-diarize",
|
|
518
|
+
cost: { perMinute: .006 }
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
id: "whisper-1",
|
|
522
|
+
cost: { perMinute: .006 }
|
|
523
|
+
}
|
|
524
|
+
];
|
|
525
|
+
function calculateOpenAICost(modelName, config, promptTokens, completionTokens, audioPromptTokens, audioCompletionTokens) {
|
|
526
|
+
if (!audioPromptTokens && !audioCompletionTokens) return calculateCost(modelName, config, promptTokens, completionTokens, [
|
|
527
|
+
...OPENAI_CHAT_MODELS,
|
|
528
|
+
...OPENAI_COMPLETION_MODELS,
|
|
529
|
+
...OPENAI_REALTIME_MODELS,
|
|
530
|
+
...OPENAI_DEEP_RESEARCH_MODELS
|
|
531
|
+
]);
|
|
532
|
+
if (!Number.isFinite(promptTokens) || !Number.isFinite(completionTokens) || !Number.isFinite(audioPromptTokens) || !Number.isFinite(audioCompletionTokens) || typeof promptTokens === "undefined" || typeof completionTokens === "undefined" || typeof audioPromptTokens === "undefined" || typeof audioCompletionTokens === "undefined") return;
|
|
533
|
+
const model = [
|
|
534
|
+
...OPENAI_CHAT_MODELS,
|
|
535
|
+
...OPENAI_COMPLETION_MODELS,
|
|
536
|
+
...OPENAI_REALTIME_MODELS,
|
|
537
|
+
...OPENAI_DEEP_RESEARCH_MODELS
|
|
538
|
+
].find((m) => m.id === modelName);
|
|
539
|
+
if (!model || !model.cost) return;
|
|
540
|
+
let totalCost = 0;
|
|
541
|
+
const inputCost = config.cost ?? model.cost.input;
|
|
542
|
+
const outputCost = config.cost ?? model.cost.output;
|
|
543
|
+
totalCost += inputCost * promptTokens + outputCost * completionTokens;
|
|
544
|
+
if ("audioInput" in model.cost || "audioOutput" in model.cost) {
|
|
545
|
+
const audioInputCost = config.audioCost ?? model.cost.audioInput ?? 0;
|
|
546
|
+
const audioOutputCost = config.audioCost ?? model.cost.audioOutput ?? 0;
|
|
547
|
+
totalCost += audioInputCost * audioPromptTokens + audioOutputCost * audioCompletionTokens;
|
|
548
|
+
}
|
|
549
|
+
return totalCost;
|
|
550
|
+
}
|
|
551
|
+
function failApiCall(err) {
|
|
552
|
+
if (err instanceof OpenAI.APIError) {
|
|
553
|
+
const errorType = err.error?.type || err.type || "unknown";
|
|
554
|
+
const errorMessage = err.error?.message || err.message || "Unknown error";
|
|
555
|
+
return { error: `API error: ${errorType}${err.status ? ` ${err.status}` : ""} ${errorMessage}` };
|
|
556
|
+
}
|
|
557
|
+
return { error: `API error: ${String(err)}` };
|
|
558
|
+
}
|
|
559
|
+
function getTokenUsage(data, cached) {
|
|
560
|
+
if (data.usage) if (cached) return {
|
|
561
|
+
cached: data.usage.total_tokens,
|
|
562
|
+
total: data.usage.total_tokens
|
|
563
|
+
};
|
|
564
|
+
else return {
|
|
565
|
+
total: data.usage.total_tokens,
|
|
566
|
+
prompt: data.usage.prompt_tokens || 0,
|
|
567
|
+
completion: data.usage.completion_tokens || 0,
|
|
568
|
+
numRequests: 1,
|
|
569
|
+
...data.usage.completion_tokens_details ? { completionDetails: {
|
|
570
|
+
reasoning: data.usage.completion_tokens_details.reasoning_tokens,
|
|
571
|
+
acceptedPrediction: data.usage.completion_tokens_details.accepted_prediction_tokens,
|
|
572
|
+
rejectedPrediction: data.usage.completion_tokens_details.rejected_prediction_tokens
|
|
573
|
+
} } : {}
|
|
574
|
+
};
|
|
575
|
+
return {};
|
|
576
|
+
}
|
|
577
|
+
function validateFunctionCall(output, functions, vars) {
|
|
578
|
+
if (typeof output === "object" && "function_call" in output) output = output.function_call;
|
|
579
|
+
const functionCall = output;
|
|
580
|
+
if (typeof functionCall !== "object" || typeof functionCall.name !== "string" || typeof functionCall.arguments !== "string") throw new Error(`OpenAI did not return a valid-looking function call: ${JSON.stringify(functionCall)}`);
|
|
581
|
+
const interpolatedFunctions = maybeLoadFromExternalFileWithVars(functions, vars);
|
|
582
|
+
const functionArgs = JSON.parse(functionCall.arguments);
|
|
583
|
+
const functionName = functionCall.name;
|
|
584
|
+
const functionSchema = interpolatedFunctions?.find((f) => f.name === functionName)?.parameters;
|
|
585
|
+
if (!functionSchema) throw new Error(`Called "${functionName}", but there is no function with that name`);
|
|
586
|
+
const validate = ajv.compile(functionSchema);
|
|
587
|
+
if (!validate(functionArgs)) throw new Error(`Call to "${functionName}" does not match schema: ${JSON.stringify(validate.errors)}`);
|
|
588
|
+
}
|
|
589
|
+
function formatOpenAiError(data) {
|
|
590
|
+
let errorMessage = `API error: ${data.error.message}`;
|
|
591
|
+
if (data.error.type) errorMessage += `, Type: ${data.error.type}`;
|
|
592
|
+
if (data.error.code) errorMessage += `, Code: ${data.error.code}`;
|
|
593
|
+
errorMessage += "\n\n" + safeJsonStringify(data, true);
|
|
594
|
+
return errorMessage;
|
|
595
|
+
}
|
|
596
|
+
//#endregion
|
|
597
|
+
export { calculateOpenAICost as a, getTokenUsage as c, OPENAI_TRANSCRIPTION_MODELS as i, validateFunctionCall as l, OPENAI_COMPLETION_MODELS as n, failApiCall as o, OPENAI_REALTIME_MODELS as r, formatOpenAiError as s, OPENAI_CHAT_MODELS as t };
|
|
598
|
+
|
|
599
|
+
//# sourceMappingURL=util-6-GqIvzS.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { p as calculateCost } from "./fetch-
|
|
3
|
-
import { x as parseDataUrl } from "./transform-
|
|
4
|
-
|
|
2
|
+
import { p as calculateCost } from "./fetch-BMv0O527.js";
|
|
3
|
+
import { x as parseDataUrl } from "./transform-Cgi24fJ7.js";
|
|
5
4
|
//#region src/providers/anthropic/util.ts
|
|
6
5
|
const ANTHROPIC_MODELS = [
|
|
7
6
|
...["claude-sonnet-4-6", "claude-sonnet-4-6-latest"].map((model) => ({
|
|
@@ -289,7 +288,7 @@ function transformWebSearchTool(config) {
|
|
|
289
288
|
if (config.cache_control) tool.cache_control = config.cache_control;
|
|
290
289
|
return tool;
|
|
291
290
|
}
|
|
292
|
-
|
|
293
291
|
//#endregion
|
|
294
292
|
export { parseMessages as a, outputFromMessage as i, calculateAnthropicCost as n, processAnthropicTools as o, getTokenUsage as r, ANTHROPIC_MODELS as t };
|
|
295
|
-
|
|
293
|
+
|
|
294
|
+
//# sourceMappingURL=util-B7T3SiBS.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { d as getAjv, m as safeJsonStringify } from "./logger-
|
|
2
|
-
import { l as maybeLoadFromExternalFileWithVars } from "./util-
|
|
3
|
-
import {
|
|
1
|
+
import { d as getAjv, m as safeJsonStringify } from "./logger-CT3IKMKA.js";
|
|
2
|
+
import { l as maybeLoadFromExternalFileWithVars } from "./util-Dlz_Wvgm.js";
|
|
3
|
+
import { m as calculateCost } from "./fetch-60Gzydls.js";
|
|
4
4
|
import OpenAI from "openai";
|
|
5
|
-
|
|
6
5
|
//#region src/providers/openai/util.ts
|
|
7
6
|
const ajv = getAjv();
|
|
8
7
|
const OPENAI_CHAT_MODELS = [
|
|
@@ -594,7 +593,7 @@ function formatOpenAiError(data) {
|
|
|
594
593
|
errorMessage += "\n\n" + safeJsonStringify(data, true);
|
|
595
594
|
return errorMessage;
|
|
596
595
|
}
|
|
597
|
-
|
|
598
596
|
//#endregion
|
|
599
597
|
export { calculateOpenAICost as a, getTokenUsage as c, OPENAI_TRANSCRIPTION_MODELS as i, validateFunctionCall as l, OPENAI_COMPLETION_MODELS as n, failApiCall as o, OPENAI_REALTIME_MODELS as r, formatOpenAiError as s, OPENAI_CHAT_MODELS as t };
|
|
600
|
-
|
|
598
|
+
|
|
599
|
+
//# sourceMappingURL=util-Betm42rL.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { g as safeJsonStringify, p as getAjv } from "./logger-
|
|
3
|
-
import { p as calculateCost } from "./fetch-
|
|
4
|
-
import { m as maybeLoadFromExternalFileWithVars } from "./util-
|
|
2
|
+
import { g as safeJsonStringify, p as getAjv } from "./logger-KkObSCzq.js";
|
|
3
|
+
import { p as calculateCost } from "./fetch-BMv0O527.js";
|
|
4
|
+
import { m as maybeLoadFromExternalFileWithVars } from "./util-YT5HPZaS.js";
|
|
5
5
|
import OpenAI from "openai";
|
|
6
|
-
|
|
7
6
|
//#region src/providers/openai/util.ts
|
|
8
7
|
const ajv = getAjv();
|
|
9
8
|
const OPENAI_CHAT_MODELS = [
|
|
@@ -595,7 +594,7 @@ function formatOpenAiError(data) {
|
|
|
595
594
|
errorMessage += "\n\n" + safeJsonStringify(data, true);
|
|
596
595
|
return errorMessage;
|
|
597
596
|
}
|
|
598
|
-
|
|
599
597
|
//#endregion
|
|
600
598
|
export { calculateOpenAICost as a, getTokenUsage as c, OPENAI_TRANSCRIPTION_MODELS as i, validateFunctionCall as l, OPENAI_COMPLETION_MODELS as n, failApiCall as o, OPENAI_REALTIME_MODELS as r, formatOpenAiError as s, OPENAI_CHAT_MODELS as t };
|
|
601
|
-
|
|
599
|
+
|
|
600
|
+
//# sourceMappingURL=util-C-PPYSMq.js.map
|