promptfoo 0.120.26 → 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/drizzle/0023_wooden_mandrill.sql +2 -0
- package/dist/drizzle/meta/0023_snapshot.json +1496 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/src/{ListApp-D3DG0F8h.js → ListApp-Du7YVwj5.js} +2 -4
- package/dist/src/accounts-BgNJDBE6.js +206 -0
- package/dist/src/{accounts-BzEY8H3v.cjs → accounts-Bx-x3bmW.cjs} +99 -80
- package/dist/src/{accounts-DHHiXsy6.js → accounts-CMqkzrVf.js} +61 -36
- package/dist/src/{accounts-R3gfCR_g.js → accounts-xrUGFA6n.js} +60 -35
- package/dist/src/{agentic-utils-D6_gzOUF.js → agentic-utils-BKIN5PKu.js} +9 -10
- package/dist/src/{agents-CwM7re15.cjs → agents-B0f4HICh.cjs} +37 -40
- package/dist/src/{agents-Cnph5GLD.js → agents-C-dDThPK.js} +37 -37
- package/dist/src/{agents-C7BiinFI.cjs → agents-CErsqg5U.cjs} +19 -27
- package/dist/src/{agents-v4cW_ZgC.js → agents-CVIn-Utx.js} +19 -22
- package/dist/src/{agents-GiUianme.js → agents-CXknwsFX.js} +37 -40
- package/dist/src/{agents-DETIQHqF.js → agents-DeH4Gu94.js} +21 -28
- package/dist/src/{agents-DYIT-hQy.js → agents-Dy2YpZpa.js} +38 -41
- package/dist/src/{agents-Cao4i7AX.js → agents-aF4-T121.js} +19 -30
- package/dist/src/{aimlapi-DMF6v_vb.js → aimlapi-BAGZDo5G.js} +16 -18
- package/dist/src/{aimlapi-CMJpKK-B.js → aimlapi-BNfTBexL.js} +15 -17
- package/dist/src/{aimlapi-DtSf1ykJ.js → aimlapi-DHRKlBEA.js} +15 -4
- package/dist/src/{aimlapi-DoGLcQW_.cjs → aimlapi-tg0Gkcvr.cjs} +15 -16
- package/dist/src/app/assets/index-BFCZg7hQ.js +439 -0
- package/dist/src/app/assets/index-NCn4eVBv.css +1 -0
- package/dist/src/app/assets/{vendor-charts-CYyo8R8v.js → vendor-charts-CCl15Imd.js} +1 -1
- package/dist/src/app/assets/{vendor-markdown-DSmzq4Jh.js → vendor-markdown-0tekx3KX.js} +1 -1
- package/dist/src/app/index.html +4 -34
- package/dist/src/{audio-DUH4q0Xq.js → audio-BRODU0UK.js} +7 -9
- package/dist/src/{audio-BWjyvHn9.cjs → audio-BWeaWovU.cjs} +6 -7
- package/dist/src/{audio-U580w8jM.js → audio-CHQ4r-RV.js} +6 -5
- package/dist/src/{audio-BrJBFN2b.js → audio-tf_NBjlC.js} +6 -8
- package/dist/src/base-B0tcrnq_.js +193 -0
- package/dist/src/base-B4QJRyFS.js +194 -0
- package/dist/src/base-DBtwl2FR.cjs +222 -0
- package/dist/src/base-fEDN28WM.js +193 -0
- package/dist/src/{blobs-kt8v3UyH.js → blobs-BAU-dXan.js} +9 -12
- package/dist/src/{blobs-C9J2mVgo.js → blobs-Bpg5rH6i.js} +9 -12
- package/dist/src/{blobs-673H0jCl.cjs → blobs-DvS-O6be.cjs} +34 -37
- package/dist/src/blobs-qTYm-1PY.js +236 -0
- package/dist/src/{cache-BLLayYEN.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-mIszOnuz.js → cache-CG0SlR1d.js} +64 -66
- package/dist/src/{cache-7xULbvt3.cjs → cache-COish3-W.cjs} +114 -117
- package/dist/src/cache-D3eqDYGU.js +739 -0
- package/dist/src/{chat-Fl6TZJRS.cjs → chat-2K608PeQ.cjs} +20 -21
- package/dist/src/chat-BKm79wib.js +764 -0
- package/dist/src/{chat-XPN9YHhr.js → chat-CM_kyI8B.js} +20 -9
- package/dist/src/{chat-DIywASPG.js → chat-CRWNNq73.js} +49 -49
- package/dist/src/{chat-C8Ei4f87.js → chat-CznLWr_D.js} +49 -49
- package/dist/src/{chat-CgyGj2hC.js → chat-DHMH-N64.js} +20 -22
- package/dist/src/{chat-C4zqjObh.cjs → chat-DaqekjFr.cjs} +69 -69
- package/dist/src/{chat-Cpz3O-Xl.js → chat-DxysjBvt.js} +21 -23
- package/dist/src/{chatkit-Dpxrq4eD.js → chatkit-65VXf5SR.js} +58 -58
- package/dist/src/{chatkit-DIrJX8xk.js → chatkit-Be-Q-a9F.js} +58 -60
- package/dist/src/{chatkit-DEls11hE.js → chatkit-BxFvW8KY.js} +58 -60
- package/dist/src/{chatkit-e25Ziu17.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-6-xTaLwM.js → claude-agent-sdk-BLTu0WBO.js} +45 -31
- package/dist/src/{claude-agent-sdk-BzxF6NIJ.cjs → claude-agent-sdk-CJH22shf.cjs} +44 -29
- package/dist/src/{claude-agent-sdk-CmkTnKGH.js → claude-agent-sdk-D6_k9FKA.js} +45 -33
- package/dist/src/{claude-agent-sdk-rXCBLK_o.js → claude-agent-sdk-Dy5lT-Tx.js} +46 -21
- package/dist/src/{cloud-BMbRVJFw.js → cloud-Bc9526yV.js} +32 -12
- package/dist/src/cloud-DmE0EwsY.js +4 -0
- package/dist/src/{cloudflare-ai-CUg4BTcj.js → cloudflare-ai-C9r2sRhw.js} +16 -18
- package/dist/src/{cloudflare-ai-Z9X219gp.js → cloudflare-ai-CWWJCRim.js} +16 -4
- package/dist/src/{cloudflare-ai-BAQ0u_dg.cjs → cloudflare-ai-ClWSdor4.cjs} +16 -17
- package/dist/src/{cloudflare-ai-CobxMTR4.js → cloudflare-ai-ICsOuD-z.js} +17 -19
- package/dist/src/{cloudflare-gateway-C0sgfr_z.cjs → cloudflare-gateway-C2_-KG5o.cjs} +21 -22
- package/dist/src/{cloudflare-gateway-_itGuXry.js → cloudflare-gateway-D6O7AlYb.js} +23 -23
- package/dist/src/{cloudflare-gateway-D2_yi-Fh.js → cloudflare-gateway-D6xFc5pa.js} +21 -25
- package/dist/src/{cloudflare-gateway-Djf3F3_H.js → cloudflare-gateway-pXGHxJ47.js} +26 -14
- package/dist/src/{codex-sdk-ibXwdglL.js → codex-sdk-C6UMlxwV.js} +49 -32
- package/dist/src/{codex-sdk-BASDNkIl.js → codex-sdk-DUwKWezN.js} +49 -30
- package/dist/src/{codex-sdk-dSnGdgIp.js → codex-sdk-GGAw0qbD.js} +49 -32
- package/dist/src/{codex-sdk-wTEpMM_X.cjs → codex-sdk-fAO0c3yA.cjs} +49 -32
- package/dist/src/{cometapi-B01btbfb.js → cometapi-BasUi7-_.js} +17 -19
- package/dist/src/{cometapi-DHUAH6nK.js → cometapi-Bbjp5V4x.js} +16 -4
- package/dist/src/{cometapi-ChAaRjg5.js → cometapi-DkXrKi5z.js} +21 -24
- package/dist/src/{cometapi-JbvOJSCO.cjs → cometapi-vY6aDZgo.cjs} +21 -22
- package/dist/src/{completion-D9_MDlnd.js → completion-6Mx_iXxK.js} +11 -13
- package/dist/src/{completion-BBJ6zmG3.js → completion-C5rtR_9P.js} +11 -13
- package/dist/src/{completion-DDyL3Cb2.cjs → completion-CDOouNzq.cjs} +21 -23
- package/dist/src/completion-C_P3ypkJ.js +120 -0
- package/dist/src/createHash-CTQmL3G2.js +15 -0
- package/dist/src/createHash-CfZSc0b4.cjs +27 -0
- package/dist/src/createHash-Da8fMwqB.js +16 -0
- package/dist/src/createHash-DmPQkvBh.js +15 -0
- package/dist/src/{docker-JAAubMw3.js → docker-5KcG-_86.js} +18 -20
- package/dist/src/{docker-Ckw-j7Rr.cjs → docker-BwsKwxFs.cjs} +18 -19
- package/dist/src/{docker-vnOg96gi.js → docker-CZnqU1XV.js} +18 -7
- package/dist/src/{docker-BuButc4D.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-CYhseqj4.js → esm-C03C-mv3.js} +17 -20
- package/dist/src/{esm-rDtG_2rg.js → esm-CaIwzWR5.js} +18 -21
- package/dist/src/esm-Cd1AjG1D.js +379 -0
- package/dist/src/{esm-BQkx5roy.cjs → esm-CnNt7sI4.cjs} +47 -49
- package/dist/src/eval-17JizQIv.js +15 -0
- package/dist/src/{eval-CYrbG57o.js → eval-DmFyWU7i.js} +49 -55
- package/dist/src/{evalResult-COsVttMA.js → evalResult-CDQiuUuf.js} +16 -12
- package/dist/src/{evalResult-6JaUIStC.js → evalResult-CTG2AHOS.js} +10 -11
- package/dist/src/evalResult-Cqj8pldJ.js +12 -0
- package/dist/src/{evalResult-DlRfu_Rq.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-3EJCMTs0.js → evaluator-DPFRbFIL.js} +210 -232
- package/dist/src/{extractor-LSYjrhK0.js → extractor-CFG6bcWJ.js} +23 -38
- package/dist/src/{extractor-DbhlYEeo.cjs → extractor-DX36oYEv.cjs} +37 -64
- package/dist/src/{extractor-Hs7la_19.js → extractor-M67RUtg6.js} +23 -38
- package/dist/src/extractor-YMU_Gvt8.js +374 -0
- package/dist/src/fetch-4M3YRaqL.js +780 -0
- package/dist/src/{fetch-18MuNu9i.js → fetch-60Gzydls.js} +60 -46
- package/dist/src/{fetch-SRsE6Ctl.js → fetch-BMv0O527.js} +41 -35
- package/dist/src/{fetch-ZMn_oemb.cjs → fetch-BxUk8odA.cjs} +268 -279
- 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-Doo0xq-z.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-CQlpZkrp.cjs → genaiTracer-DN4dQywX.cjs} +13 -14
- package/dist/src/graders-Bu0H9nXi.js +32 -0
- package/dist/src/{graders-BaMCwIKp.js → graders-CHO8EPM4.js} +385 -417
- package/dist/src/graders-Cfhkvx-e.js +34 -0
- package/dist/src/{graders-QsALpIdy.js → graders-CpdqD9PI.js} +385 -417
- package/dist/src/graders-DClJVpGP.cjs +32 -0
- package/dist/src/{graders-DzUUnUjC.cjs → graders-DOXycdlG.cjs} +721 -753
- package/dist/src/graders-DcnJsrMO.js +32 -0
- package/dist/src/graders-R9rYUM0d.js +13466 -0
- package/dist/src/{image-BiEVdpdP.js → image-BmEZqVmk.js} +57 -18
- package/dist/src/{image-mhAGP07h.js → image-CBBVXWuT.js} +57 -18
- package/dist/src/{image-D10zEe1f.cjs → image-CDLQOcqT.cjs} +6 -7
- package/dist/src/{image-COCWy5dX.js → image-DJEvKveK.js} +6 -5
- package/dist/src/{image-C3BjJUAU.cjs → image-DTedmQPg.cjs} +77 -32
- package/dist/src/{image-DB4sHxdJ.js → image-gvmivTEe.js} +7 -9
- package/dist/src/image-pAX56tPG.js +257 -0
- package/dist/src/{image-BXt_7u0v.js → image-tL5hIOFh.js} +6 -8
- package/dist/src/index.cjs +696 -693
- package/dist/src/index.d.cts +113 -10
- package/dist/src/index.d.ts +113 -6
- package/dist/src/index.js +657 -658
- package/dist/src/{interactiveCheck-DU-MAhp5.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-DotRBzUE.js → knowledgeBase-CLJybhnF.js} +19 -34
- package/dist/src/{knowledgeBase-XJQ0Qyez.js → knowledgeBase-CoU-UQBg.js} +17 -41
- package/dist/src/{knowledgeBase-CMvMlLZR.js → knowledgeBase-DjWPVqSb.js} +17 -43
- package/dist/src/{knowledgeBase-Bnb00xKs.cjs → knowledgeBase-wkxuRFhA.cjs} +17 -40
- package/dist/src/{litellm-CHrRmPAe.js → litellm-B9Hysuri.js} +16 -18
- package/dist/src/{litellm-CrLJrPIm.js → litellm-CTfa0hqi.js} +15 -17
- package/dist/src/{litellm-BrnZhMcL.cjs → litellm-NYpQ8RQu.cjs} +15 -16
- package/dist/src/{litellm-BECdjOTx.js → litellm-ePxtr9F1.js} +15 -4
- package/dist/src/{logger-w8Ozp0Td.js → logger-CT3IKMKA.js} +24 -41
- package/dist/src/{logger-BdZ-IqBc.cjs → logger-Cp1GPUjj.cjs} +166 -192
- package/dist/src/logger-DLcq4dWf.js +713 -0
- package/dist/src/{logger-BotXmWKW.js → logger-KkObSCzq.js} +27 -43
- package/dist/src/{luma-ray-C0RkI3lt.cjs → luma-ray-B0GGNRc1.cjs} +20 -21
- package/dist/src/{luma-ray-C-w6EsJm.js → luma-ray-BE2mOt6N.js} +20 -13
- package/dist/src/{luma-ray-BOeX-h0M.js → luma-ray-BW9IRGIc.js} +22 -21
- package/dist/src/{luma-ray-DgKLS0BF.js → luma-ray-Cm1KZBhs.js} +20 -23
- package/dist/src/main.js +1985 -2055
- package/dist/src/{messages-DXV3Qh8_.cjs → messages-1JrJs91T.cjs} +35 -34
- package/dist/src/{messages-D61tPFQo.js → messages-1x9atZmP.js} +25 -24
- package/dist/src/{messages-CDZYGNlS.js → messages-BLbWdsyt.js} +25 -24
- package/dist/src/messages-D8EA0oDc.js +240 -0
- package/dist/src/{meteor-P2rUE-Uz.js → meteor-44VjEACX.js} +3 -4
- package/dist/src/{meteor-SLNTgmXm.js → meteor-D-SotUw9.js} +3 -4
- package/dist/src/{meteor-odmwVbyG.cjs → meteor-DLZZ3osF.cjs} +3 -4
- package/dist/src/{meteor-Dj8cTkU_.js → meteor-DUiCJRC-.js} +3 -4
- package/dist/src/modelslab-C1OLRmVX.js +166 -0
- package/dist/src/modelslab-CqXBy3U8.js +168 -0
- package/dist/src/modelslab-DcOSFwKh.cjs +166 -0
- package/dist/src/modelslab-X5-4LroM.js +166 -0
- package/dist/src/{nova-reel-C2LFfVTf.js → nova-reel-BgS1ZWuK.js} +20 -13
- package/dist/src/{nova-reel-DtCjbD5O.js → nova-reel-D2ZkOSyr.js} +22 -21
- package/dist/src/{nova-reel-D9FXq3Mt.cjs → nova-reel-D9xfaMBs.cjs} +20 -21
- package/dist/src/{nova-reel-Bk5npr2q.js → nova-reel-DihqLeol.js} +20 -23
- package/dist/src/{nova-sonic-BoRSY_U6.cjs → nova-sonic-DVu3mMIy.cjs} +30 -31
- package/dist/src/{nova-sonic-D_qERM-K.js → nova-sonic-DezhVUYT.js} +30 -26
- package/dist/src/{nova-sonic-CgaWLDM1.js → nova-sonic-P-CdUMlV.js} +30 -31
- package/dist/src/{nova-sonic-BXRfQyF-.js → nova-sonic-Q3BOJeig.js} +31 -32
- package/dist/src/{openai-Bigwjgo1.cjs → openai-Cuif0GEt.cjs} +8 -9
- package/dist/src/{openai-Dz3surb_.js → openai-DElQ-fPX.js} +3 -4
- package/dist/src/{openai-CT5fwbve.js → openai-DhbB7eWK.js} +3 -4
- package/dist/src/openai-j-sE2O7r.js +44 -0
- package/dist/src/{openclaw-dHLcXUWZ.js → openclaw-BiSZPL7J.js} +20 -14
- package/dist/src/{openclaw-CpPrXwf6.js → openclaw-Bv1DINsX.js} +20 -27
- package/dist/src/{openclaw-B6XY2kUf.js → openclaw-D1D_ej1z.js} +21 -28
- package/dist/src/{openclaw-DDSfq5fp.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-DmRb0NBj.js → otlpReceiver--AIRW_S4.js} +53 -51
- package/dist/src/{otlpReceiver-Dg817agV.js → otlpReceiver-Bn5wGB1v.js} +53 -55
- package/dist/src/{otlpReceiver-B6Xo4KZM.cjs → otlpReceiver-Diec4cln.cjs} +53 -55
- package/dist/src/{otlpReceiver-BO0rbDzh.js → otlpReceiver-g3ByGaXs.js} +53 -55
- package/dist/src/{providerRegistry-Xf0qdqGQ.js → providerRegistry-B0RUOLI_.js} +7 -8
- package/dist/src/{providerRegistry-wCWd7sKQ.js → providerRegistry-CD8MEar9.js} +7 -8
- package/dist/src/{providerRegistry-lc7a7utN.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-BiNq_Iyc.js → providers-BKRJTjBz.js} +1743 -1795
- package/dist/src/providers-C1rOSHiR.js +32 -0
- package/dist/src/{providers-BlEhY5mi.js → providers-CFLy1_ji.js} +1750 -1802
- package/dist/src/{providers-BNKVY53V.cjs → providers-CFu-TZl-.cjs} +2111 -2163
- 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-r1uBuA0n.js → pythonUtils-C3py6GC1.js} +18 -19
- package/dist/src/{pythonUtils-DZ6EbdY4.cjs → pythonUtils-CTU3Y3lw.cjs} +42 -43
- package/dist/src/{pythonUtils-vMlk9Qp5.js → pythonUtils-D5nxkQ0P.js} +18 -19
- package/dist/src/pythonUtils-D6fwaDSg.js +249 -0
- package/dist/src/quiverai-C2jVwbH1.js +213 -0
- package/dist/src/quiverai-CI6gYJVI.js +213 -0
- package/dist/src/quiverai-CLkWkyZc.cjs +213 -0
- package/dist/src/quiverai-MHSxbmmZ.js +215 -0
- package/dist/src/{render-CAZvKKkB.js → render-Drod8m7K.js} +4 -5
- package/dist/src/{responses-DLLjADw5.js → responses-BKqJmhhc.js} +34 -27
- package/dist/src/{responses-TsdODUpm.js → responses-CGw0DCzh.js} +34 -27
- package/dist/src/responses-jxdehPkC.js +660 -0
- package/dist/src/{responses-zOtKtnY_.cjs → responses-tD4Bd4dc.cjs} +49 -42
- package/dist/src/rubyUtils-BUHu6PhO.js +5 -0
- package/dist/src/{rubyUtils-Cs35SDYa.js → rubyUtils-BUVePouc.js} +27 -20
- package/dist/src/rubyUtils-BcuGX77l.js +222 -0
- package/dist/src/{rubyUtils-BtjlqyXt.js → rubyUtils-Boc4HZzX.js} +18 -19
- package/dist/src/rubyUtils-CP42kMvq.cjs +4 -0
- package/dist/src/{rubyUtils-DCVaJ3mc.cjs → rubyUtils-DhCAlxZr.cjs} +48 -50
- package/dist/src/{sagemaker-Du4LIR97.js → sagemaker-BK4Zb993.js} +75 -70
- package/dist/src/{sagemaker-CLdUAv5z.js → sagemaker-BfiWTmvn.js} +77 -77
- package/dist/src/{sagemaker-DwNnEVYt.cjs → sagemaker-CcQHM1jV.cjs} +75 -76
- package/dist/src/{sagemaker-BcgLu0U4.js → sagemaker-D2Q1c-sD.js} +75 -79
- package/dist/src/{scanner-Dyw21Wg_.js → scanner-J8CA3LsV.js} +149 -122
- package/dist/src/server/index.js +5620 -67302
- package/dist/src/{server-CgUQ25qW.cjs → server-B0PPuDw-.cjs} +57 -67
- package/dist/src/server-B1vi21hA.js +7 -0
- package/dist/src/{server-CbMTRQkg.js → server-BC7XJFgr.js} +19 -24
- package/dist/src/server-Cm9Kai_h.cjs +5 -0
- package/dist/src/{server-DWmZLfCy.js → server-DbFphssR.js} +26 -29
- package/dist/src/server-OAs3nBRT.js +229 -0
- package/dist/src/{signal-Bl32q42d.js → signal-BOTbd53Z.js} +9 -11
- package/dist/src/{slack-BtMkB6xP.cjs → slack-BmVAVGaK.cjs} +7 -8
- package/dist/src/{slack-OZYxoVON.js → slack-DCUPTzS2.js} +8 -8
- package/dist/src/{slack-DPqj42Ts.js → slack-DOdy_kyv.js} +7 -8
- package/dist/src/{slack-BfdBx2tO.js → slack-DXMKtA-f.js} +7 -9
- package/dist/src/store-BNmZ1KAz.cjs +5 -0
- package/dist/src/{store-BqwfFEyF.cjs → store-BSc-TF2w.cjs} +44 -45
- package/dist/src/store-BltJg2cd.js +6 -0
- package/dist/src/{store-D4gdn9ih.js → store-D1tv90v3.js} +34 -35
- package/dist/src/{store-2ocbYY9D.js → store-DQLEjuEO.js} +40 -36
- package/dist/src/store-Ub2vaGJ1.js +228 -0
- package/dist/src/{tables-D-NSwNIb.js → tables-5EvT_Bwn.js} +23 -23
- package/dist/src/{tables-B9E1kRp-.cjs → tables-C7K-XKWp.cjs} +93 -93
- package/dist/src/{tables-C7TT2XVn.js → tables-D36WTqKX.js} +25 -25
- package/dist/src/tables-xKANLRBD.js +288 -0
- package/dist/src/telemetry-5BCRNBbe.cjs +5 -0
- package/dist/src/{telemetry-DZ_7PaVq.js → telemetry-C15ziL8u.js} +17 -14
- package/dist/src/{telemetry-BXyVqyAg.js → telemetry-C2YDkUQH.js} +11 -13
- package/dist/src/{telemetry-D0_yFdtU.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-Dm78AVGG.js → text-B_UCRPp2.js} +2 -2
- package/dist/src/{text-DF2hMKdg.cjs → text-CW1cyrwj.cjs} +12 -13
- package/dist/src/{text-DgMr_tiM.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-FNIz3YOe.cjs → transcription-CL78qbOU.cjs} +14 -15
- package/dist/src/{transcription-C-M81iDA.js → transcription-DAtxHhAM.js} +14 -7
- package/dist/src/{transcription-CYuY5sFO.js → transcription-LNZTNUUL.js} +14 -16
- package/dist/src/{transcription-Ch7S-LWw.js → transcription-QHh3AH6Z.js} +15 -17
- package/dist/src/{transform-CoP2bJ7P.js → transform-Cgi24fJ7.js} +94 -66
- package/dist/src/{transform-Kd6u-oNm.cjs → transform-CzK1Q0zl.cjs} +24 -26
- package/dist/src/{transform-D8dILpfZ.js → transform-DECvGmzp.js} +15 -13
- package/dist/src/{transform-DMaxQwDx.js → transform-DGLazrMm.js} +94 -66
- package/dist/src/transform-DGxXocjk.js +1506 -0
- package/dist/src/{transform-ivxEY4f7.cjs → transform-DOcQeLld.cjs} +234 -206
- package/dist/src/transform-DTGDnAzW.js +6 -0
- package/dist/src/{transform-CqTFr7KR.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-DEU2naS1.js → transformersAvailability-CEVM2GNQ.js} +2 -2
- package/dist/src/{transformersAvailability-Bkep3ka7.cjs → transformersAvailability-CwayUSlh.cjs} +2 -3
- package/dist/src/{transformersAvailability-DwmezkVe.js → transformersAvailability-D6c6ROpT.js} +2 -2
- package/dist/src/{types-t52w-XsS.js → types-CH3Ge2sE.js} +103 -92
- package/dist/src/{types-DMVjYLpx.js → types-CLKiCBW3.js} +98 -91
- package/dist/src/types-CN_TZ2GJ.js +3260 -0
- package/dist/src/{types-BIfttHrT.cjs → types-LJ0r3wbR.cjs} +573 -566
- package/dist/src/util-5cB-L7U3.js +1430 -0
- package/dist/src/util-6-GqIvzS.js +599 -0
- package/dist/src/{util-vjscpUzy.js → util-B7T3SiBS.js} +5 -6
- package/dist/src/{util-Cl0zfT3V.js → util-Betm42rL.js} +44 -17
- package/dist/src/{util-CUEt0Vum.js → util-C-PPYSMq.js} +44 -17
- package/dist/src/{util-DkFTvieG.cjs → util-CchiqXh_.cjs} +35 -36
- package/dist/src/{util-mJ58qbbw.js → util-DaWTWKBK.js} +5 -6
- package/dist/src/{util-C08Kns6-.cjs → util-Db0a0AFH.cjs} +89 -62
- package/dist/src/{util-DiCePfDu.js → util-Dlz_Wvgm.js} +102 -53
- package/dist/src/{util-BSh4a_Q8.js → util-YT5HPZaS.js} +102 -53
- package/dist/src/{util-DUYOvxAy.cjs → util-Yz-1aEhW.cjs} +274 -219
- package/dist/src/util-ZZH-3QZz.js +293 -0
- package/dist/src/{utils-DFaZa6Rf.cjs → utils-Cz9qXqII.cjs} +32 -35
- package/dist/src/{utils-CVzb4YiI.js → utils-XiOAgly5.js} +4 -7
- package/dist/src/utils-dLokC-eR.js +94 -0
- package/dist/src/{utils-JaY9veb5.js → utils-f2-Moju7.js} +4 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +59 -53
- package/dist/src/app/assets/index-BOgkICuY.css +0 -1
- package/dist/src/app/assets/index-CSgqn_Vd.js +0 -428
- package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
- package/dist/src/base-BaXmtXYp.js +0 -107
- package/dist/src/base-Dtp8b4_N.js +0 -106
- package/dist/src/base-f71xxWai.cjs +0 -111
- package/dist/src/cache-BUPcq0Ad.js +0 -6
- package/dist/src/cache-CVfRb-HD.cjs +0 -6
- package/dist/src/cache-O4EuX2JV.js +0 -8
- package/dist/src/chunk-DHDDz29n.js +0 -22
- package/dist/src/chunk-FhC4c-0y.js +0 -21
- package/dist/src/cloud-CZ4hytdm.js +0 -5
- package/dist/src/eval-CKHWqG9f.js +0 -16
- package/dist/src/evalResult-CxTP-LMm.cjs +0 -11
- package/dist/src/evalResult-CzLURDcP.js +0 -13
- package/dist/src/evalResult-DyttNQ_G.js +0 -11
- package/dist/src/evaluator-0PvfeBYh.js +0 -38
- package/dist/src/fetch-Bi0o-fdp.js +0 -4
- package/dist/src/fetch-CMptBDVg.cjs +0 -4
- package/dist/src/fetch-DAZkv3gV.js +0 -6
- package/dist/src/graders-BCytzXrb.js +0 -34
- package/dist/src/graders-CGZQShfJ.cjs +0 -33
- package/dist/src/graders-spkuVC-E.js +0 -36
- package/dist/src/opencode-sdk-CImWVqy9.js +0 -382
- package/dist/src/opencode-sdk-CuCztr4P.js +0 -380
- package/dist/src/opencode-sdk-DhcfRbBH.js +0 -376
- package/dist/src/opencode-sdk-mqF-Oj3f.cjs +0 -383
- package/dist/src/providers-BMZZmPBJ.cjs +0 -32
- package/dist/src/providers-CQQrNaJk.js +0 -32
- package/dist/src/providers-Ck8HyrC-.js +0 -34
- package/dist/src/quiverai-BNfIwKCO.cjs +0 -54
- package/dist/src/quiverai-BQigKdIH.js +0 -57
- package/dist/src/quiverai-Bfy2WnE2.js +0 -55
- package/dist/src/quiverai-CedIP0PJ.js +0 -43
- package/dist/src/rubyUtils-D7--T12C.js +0 -6
- package/dist/src/rubyUtils-DRRiMFV2.js +0 -5
- package/dist/src/rubyUtils-vb8OYFC-.cjs +0 -5
- package/dist/src/server-BUbS0Qfh.js +0 -6
- package/dist/src/server-XpGXFHkS.cjs +0 -6
- package/dist/src/server-gfOx5Zrk.js +0 -8
- package/dist/src/store-5u2yriTV.js +0 -7
- package/dist/src/store-D_lq_8oQ.js +0 -6
- package/dist/src/store-m5KT6Ly7.cjs +0 -6
- package/dist/src/telemetry-5RHFoCJh.js +0 -6
- package/dist/src/telemetry-Do8wMnA-.js +0 -8
- package/dist/src/telemetry-LojxPoFq.cjs +0 -6
- package/dist/src/transform-8eGmaH-7.js +0 -7
- package/dist/src/transform-BRVvWaG4.cjs +0 -6
- package/dist/src/transform-GybT0X0u.js +0 -8
- package/dist/src/transformersAvailability-DkAWaK5B.js +0 -35
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { b as getEnvString, i as logger, v as getEnvFloat, y as getEnvInt } from "./logger-DLcq4dWf.js";
|
|
2
|
+
import { C as transformTools, S as transformToolChoice } from "./fetch-4M3YRaqL.js";
|
|
3
|
+
import { a as isCacheEnabled, i as getCache } from "./cache-D3eqDYGU.js";
|
|
4
|
+
import { a as createEmptyTokenUsage } from "./tokenUsageUtils-BDGe-iyI.js";
|
|
5
|
+
import { n as withGenAISpan } from "./genaiTracer-70Z8BIuV.js";
|
|
6
|
+
import { D as maybeLoadResponseFormatFromExternalFile, O as maybeLoadToolsFromExternalFile } from "./util-5cB-L7U3.js";
|
|
7
|
+
import { i as normalizeFinishReason, n as MCPClient } from "./chat-BKm79wib.js";
|
|
8
|
+
import { n as transformMCPToolsToAnthropic } from "./transform-DGxXocjk.js";
|
|
9
|
+
import { a as parseMessages, i as outputFromMessage, n as calculateAnthropicCost, o as processAnthropicTools, r as getTokenUsage, t as ANTHROPIC_MODELS } from "./util-ZZH-3QZz.js";
|
|
10
|
+
import Anthropic, { APIError } from "@anthropic-ai/sdk";
|
|
11
|
+
//#region src/providers/anthropic/generic.ts
|
|
12
|
+
/**
|
|
13
|
+
* Generic provider class for Anthropic APIs
|
|
14
|
+
* Serves as a base class with shared functionality for all Anthropic providers
|
|
15
|
+
*/
|
|
16
|
+
var AnthropicGenericProvider = class {
|
|
17
|
+
modelName;
|
|
18
|
+
config;
|
|
19
|
+
env;
|
|
20
|
+
apiKey;
|
|
21
|
+
anthropic;
|
|
22
|
+
constructor(modelName, options = {}) {
|
|
23
|
+
const { config, id, env } = options;
|
|
24
|
+
this.env = env;
|
|
25
|
+
this.modelName = modelName;
|
|
26
|
+
this.config = config || {};
|
|
27
|
+
this.apiKey = this.getApiKey();
|
|
28
|
+
this.anthropic = new Anthropic({
|
|
29
|
+
apiKey: this.apiKey,
|
|
30
|
+
baseURL: this.getApiBaseUrl()
|
|
31
|
+
});
|
|
32
|
+
this.id = id ? () => id : this.id;
|
|
33
|
+
}
|
|
34
|
+
id() {
|
|
35
|
+
return `anthropic:${this.modelName}`;
|
|
36
|
+
}
|
|
37
|
+
toString() {
|
|
38
|
+
return `[Anthropic Provider ${this.modelName}]`;
|
|
39
|
+
}
|
|
40
|
+
requiresApiKey() {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
getApiKey() {
|
|
44
|
+
return this.config?.apiKey || this.env?.ANTHROPIC_API_KEY || getEnvString("ANTHROPIC_API_KEY");
|
|
45
|
+
}
|
|
46
|
+
getApiBaseUrl() {
|
|
47
|
+
return this.config?.apiBaseUrl || this.env?.ANTHROPIC_BASE_URL || getEnvString("ANTHROPIC_BASE_URL");
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Base implementation - should be overridden by specific provider implementations
|
|
51
|
+
*/
|
|
52
|
+
async callApi(_prompt, _context) {
|
|
53
|
+
throw new Error("Not implemented: callApi must be implemented by subclasses");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/providers/anthropic/messages.ts
|
|
58
|
+
var AnthropicMessagesProvider = class AnthropicMessagesProvider extends AnthropicGenericProvider {
|
|
59
|
+
mcpClient = null;
|
|
60
|
+
initializationPromise = null;
|
|
61
|
+
static ANTHROPIC_MODELS = ANTHROPIC_MODELS;
|
|
62
|
+
static ANTHROPIC_MODELS_NAMES = ANTHROPIC_MODELS.map((model) => model.id);
|
|
63
|
+
constructor(modelName, options = {}) {
|
|
64
|
+
if (!AnthropicMessagesProvider.ANTHROPIC_MODELS_NAMES.includes(modelName)) logger.warn(`Using unknown Anthropic model: ${modelName}`);
|
|
65
|
+
super(modelName, options);
|
|
66
|
+
const { id } = options;
|
|
67
|
+
this.id = id ? () => id : this.id;
|
|
68
|
+
if (this.config.mcp?.enabled) this.initializationPromise = this.initializeMCP();
|
|
69
|
+
}
|
|
70
|
+
async initializeMCP() {
|
|
71
|
+
this.mcpClient = new MCPClient(this.config.mcp);
|
|
72
|
+
await this.mcpClient.initialize();
|
|
73
|
+
}
|
|
74
|
+
async cleanup() {
|
|
75
|
+
if (this.mcpClient) {
|
|
76
|
+
await this.initializationPromise;
|
|
77
|
+
await this.mcpClient.cleanup();
|
|
78
|
+
this.mcpClient = null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
toString() {
|
|
82
|
+
if (!this.modelName) throw new Error("Anthropic model name is not set. Please provide a valid model name.");
|
|
83
|
+
return `[Anthropic Messages Provider ${this.modelName}]`;
|
|
84
|
+
}
|
|
85
|
+
async callApi(prompt, context) {
|
|
86
|
+
if (this.initializationPromise != null) await this.initializationPromise;
|
|
87
|
+
if (!this.apiKey) throw new Error("Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add `apiKey` to the provider config.");
|
|
88
|
+
if (!this.modelName) throw new Error("Anthropic model name is not set. Please provide a valid model name.");
|
|
89
|
+
const spanContext = {
|
|
90
|
+
system: "anthropic",
|
|
91
|
+
operationName: "chat",
|
|
92
|
+
model: this.modelName,
|
|
93
|
+
providerId: this.id(),
|
|
94
|
+
maxTokens: this.config.max_tokens,
|
|
95
|
+
temperature: this.config.temperature,
|
|
96
|
+
testIndex: context?.test?.vars?.__testIdx,
|
|
97
|
+
promptLabel: context?.prompt?.label,
|
|
98
|
+
traceparent: context?.traceparent,
|
|
99
|
+
requestBody: prompt
|
|
100
|
+
};
|
|
101
|
+
const resultExtractor = (response) => {
|
|
102
|
+
const result = {};
|
|
103
|
+
if (response.tokenUsage) result.tokenUsage = {
|
|
104
|
+
prompt: response.tokenUsage.prompt,
|
|
105
|
+
completion: response.tokenUsage.completion,
|
|
106
|
+
total: response.tokenUsage.total,
|
|
107
|
+
cached: response.tokenUsage.cached
|
|
108
|
+
};
|
|
109
|
+
if (response.finishReason) result.finishReasons = [response.finishReason];
|
|
110
|
+
if (response.cached !== void 0) result.cacheHit = response.cached;
|
|
111
|
+
if (response.output !== void 0) result.responseBody = typeof response.output === "string" ? response.output : JSON.stringify(response.output);
|
|
112
|
+
return result;
|
|
113
|
+
};
|
|
114
|
+
return withGenAISpan(spanContext, () => this.callApiInternal(prompt, context), resultExtractor);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Internal implementation of callApi without tracing wrapper.
|
|
118
|
+
*/
|
|
119
|
+
async callApiInternal(prompt, context) {
|
|
120
|
+
const config = {
|
|
121
|
+
...this.config,
|
|
122
|
+
...context?.prompt?.config
|
|
123
|
+
};
|
|
124
|
+
const { system, extractedMessages, thinking } = parseMessages(prompt);
|
|
125
|
+
let mcpTools = [];
|
|
126
|
+
if (this.mcpClient) mcpTools = transformMCPToolsToAnthropic(this.mcpClient.getAllTools());
|
|
127
|
+
const { processedTools: processedConfigTools, requiredBetaFeatures } = processAnthropicTools(transformTools(await maybeLoadToolsFromExternalFile(config.tools, context?.vars) || [], "anthropic"));
|
|
128
|
+
const allTools = [...mcpTools, ...processedConfigTools];
|
|
129
|
+
const processedOutputFormat = maybeLoadResponseFormatFromExternalFile(config.output_format, context?.vars);
|
|
130
|
+
const shouldStream = config.stream ?? false;
|
|
131
|
+
const params = {
|
|
132
|
+
model: this.modelName,
|
|
133
|
+
...system ? { system } : {},
|
|
134
|
+
max_tokens: config?.max_tokens || getEnvInt("ANTHROPIC_MAX_TOKENS", config.thinking || thinking ? 2048 : 1024),
|
|
135
|
+
messages: extractedMessages,
|
|
136
|
+
stream: shouldStream,
|
|
137
|
+
temperature: config.thinking || thinking ? config.temperature : config.temperature || getEnvFloat("ANTHROPIC_TEMPERATURE", 0),
|
|
138
|
+
...allTools.length > 0 ? { tools: allTools } : {},
|
|
139
|
+
...config.tool_choice ? { tool_choice: transformToolChoice(config.tool_choice, "anthropic") } : {},
|
|
140
|
+
...config.thinking || thinking ? { thinking: config.thinking || thinking } : {},
|
|
141
|
+
...processedOutputFormat || config.effort ? { output_config: {
|
|
142
|
+
...processedOutputFormat ? { format: processedOutputFormat } : {},
|
|
143
|
+
...config.effort ? { effort: config.effort } : {}
|
|
144
|
+
} } : {},
|
|
145
|
+
...typeof config?.extra_body === "object" && config.extra_body ? config.extra_body : {}
|
|
146
|
+
};
|
|
147
|
+
logger.debug("Calling Anthropic Messages API", { params });
|
|
148
|
+
const headers = { ...config.headers || {} };
|
|
149
|
+
let allBetaFeatures = [...config.beta || [], ...requiredBetaFeatures];
|
|
150
|
+
if (processedOutputFormat && !allBetaFeatures.includes("structured-outputs-2025-11-13")) allBetaFeatures.push("structured-outputs-2025-11-13");
|
|
151
|
+
allBetaFeatures = [...new Set(allBetaFeatures)];
|
|
152
|
+
if (allBetaFeatures.length > 0) headers["anthropic-beta"] = allBetaFeatures.join(",");
|
|
153
|
+
const cache = await getCache();
|
|
154
|
+
const cacheKey = `anthropic:${JSON.stringify(params)}`;
|
|
155
|
+
if (isCacheEnabled()) {
|
|
156
|
+
const cachedResponse = await cache.get(cacheKey);
|
|
157
|
+
if (cachedResponse) {
|
|
158
|
+
logger.debug(`Returning cached response for ${prompt}: ${cachedResponse}`);
|
|
159
|
+
try {
|
|
160
|
+
const parsedCachedResponse = JSON.parse(cachedResponse);
|
|
161
|
+
const finishReason = normalizeFinishReason(parsedCachedResponse.stop_reason);
|
|
162
|
+
let output = outputFromMessage(parsedCachedResponse, config.showThinking ?? true);
|
|
163
|
+
if (processedOutputFormat?.type === "json_schema" && typeof output === "string") try {
|
|
164
|
+
output = JSON.parse(output);
|
|
165
|
+
} catch (error) {
|
|
166
|
+
logger.error(`Failed to parse JSON output from structured outputs: ${error}`);
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
output,
|
|
170
|
+
tokenUsage: getTokenUsage(parsedCachedResponse, true),
|
|
171
|
+
...finishReason && { finishReason },
|
|
172
|
+
cost: calculateAnthropicCost(this.modelName, config, parsedCachedResponse.usage?.input_tokens, parsedCachedResponse.usage?.output_tokens),
|
|
173
|
+
cached: true
|
|
174
|
+
};
|
|
175
|
+
} catch {
|
|
176
|
+
return {
|
|
177
|
+
output: cachedResponse,
|
|
178
|
+
tokenUsage: createEmptyTokenUsage()
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
if (shouldStream) {
|
|
185
|
+
const finalMessage = await (await this.anthropic.messages.stream(params, { ...typeof headers === "object" && Object.keys(headers).length > 0 ? { headers } : {} })).finalMessage();
|
|
186
|
+
logger.debug(`Anthropic Messages API streaming complete`, { finalMessage });
|
|
187
|
+
if (isCacheEnabled()) try {
|
|
188
|
+
await cache.set(cacheKey, JSON.stringify(finalMessage));
|
|
189
|
+
} catch (err) {
|
|
190
|
+
logger.error(`Failed to cache response: ${String(err)}`);
|
|
191
|
+
}
|
|
192
|
+
const finishReason = normalizeFinishReason(finalMessage.stop_reason);
|
|
193
|
+
let output = outputFromMessage(finalMessage, config.showThinking ?? true);
|
|
194
|
+
if (processedOutputFormat?.type === "json_schema" && typeof output === "string") try {
|
|
195
|
+
output = JSON.parse(output);
|
|
196
|
+
} catch (error) {
|
|
197
|
+
logger.error(`Failed to parse JSON output from structured outputs: ${error}`);
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
output,
|
|
201
|
+
tokenUsage: getTokenUsage(finalMessage, false),
|
|
202
|
+
...finishReason && { finishReason },
|
|
203
|
+
cost: calculateAnthropicCost(this.modelName, config, finalMessage.usage?.input_tokens, finalMessage.usage?.output_tokens)
|
|
204
|
+
};
|
|
205
|
+
} else {
|
|
206
|
+
const response = await this.anthropic.messages.create(params, { ...typeof headers === "object" && Object.keys(headers).length > 0 ? { headers } : {} });
|
|
207
|
+
logger.debug(`Anthropic Messages API response`, { response });
|
|
208
|
+
if (isCacheEnabled()) try {
|
|
209
|
+
await cache.set(cacheKey, JSON.stringify(response));
|
|
210
|
+
} catch (err) {
|
|
211
|
+
logger.error(`Failed to cache response: ${String(err)}`);
|
|
212
|
+
}
|
|
213
|
+
const finishReason = normalizeFinishReason(response.stop_reason);
|
|
214
|
+
let output = outputFromMessage(response, config.showThinking ?? true);
|
|
215
|
+
if (processedOutputFormat?.type === "json_schema" && typeof output === "string") try {
|
|
216
|
+
output = JSON.parse(output);
|
|
217
|
+
} catch (error) {
|
|
218
|
+
logger.error(`Failed to parse JSON output from structured outputs: ${error}`);
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
output,
|
|
222
|
+
tokenUsage: getTokenUsage(response, false),
|
|
223
|
+
...finishReason && { finishReason },
|
|
224
|
+
cost: calculateAnthropicCost(this.modelName, config, response.usage?.input_tokens, response.usage?.output_tokens)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
} catch (err) {
|
|
228
|
+
logger.error(`Anthropic Messages API call error: ${err instanceof Error ? err.message : String(err)}`);
|
|
229
|
+
if (err instanceof APIError && err.error) {
|
|
230
|
+
const errorDetails = err.error;
|
|
231
|
+
return { error: `API call error: ${errorDetails.error.message}, status ${err.status}, type ${errorDetails.error.type}` };
|
|
232
|
+
}
|
|
233
|
+
return { error: `API call error: ${err instanceof Error ? err.message : String(err)}` };
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
//#endregion
|
|
238
|
+
export { AnthropicGenericProvider as n, AnthropicMessagesProvider as t };
|
|
239
|
+
|
|
240
|
+
//# sourceMappingURL=messages-D8EA0oDc.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as invariant } from "./invariant-
|
|
3
|
-
|
|
2
|
+
import { t as invariant } from "./invariant-BtWWVVhl.js";
|
|
4
3
|
//#region src/assertions/meteor.ts
|
|
5
4
|
let PorterStemmer;
|
|
6
5
|
let WordNet;
|
|
@@ -130,7 +129,7 @@ async function handleMeteorAssertion({ assertion, inverse, outputString, rendere
|
|
|
130
129
|
assertion
|
|
131
130
|
};
|
|
132
131
|
}
|
|
133
|
-
|
|
134
132
|
//#endregion
|
|
135
133
|
export { handleMeteorAssertion };
|
|
136
|
-
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=meteor-44VjEACX.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as invariant } from "./invariant-vgHWClmd.js";
|
|
3
2
|
//#region src/assertions/meteor.ts
|
|
4
3
|
let PorterStemmer;
|
|
5
4
|
let WordNet;
|
|
@@ -129,7 +128,7 @@ async function handleMeteorAssertion({ assertion, inverse, outputString, rendere
|
|
|
129
128
|
assertion
|
|
130
129
|
};
|
|
131
130
|
}
|
|
132
|
-
|
|
133
131
|
//#endregion
|
|
134
132
|
export { handleMeteorAssertion };
|
|
135
|
-
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=meteor-D-SotUw9.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const require_invariant = require(
|
|
2
|
-
|
|
1
|
+
const require_invariant = require("./invariant-kfQ8Bu82.cjs");
|
|
3
2
|
//#region src/assertions/meteor.ts
|
|
4
3
|
let PorterStemmer;
|
|
5
4
|
let WordNet;
|
|
@@ -129,7 +128,7 @@ async function handleMeteorAssertion({ assertion, inverse, outputString, rendere
|
|
|
129
128
|
assertion
|
|
130
129
|
};
|
|
131
130
|
}
|
|
132
|
-
|
|
133
131
|
//#endregion
|
|
134
132
|
exports.handleMeteorAssertion = handleMeteorAssertion;
|
|
135
|
-
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=meteor-DLZZ3osF.cjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as invariant } from "./invariant-
|
|
2
|
-
|
|
1
|
+
import { t as invariant } from "./invariant-Ddh24eXh.js";
|
|
3
2
|
//#region src/assertions/meteor.ts
|
|
4
3
|
let PorterStemmer;
|
|
5
4
|
let WordNet;
|
|
@@ -129,7 +128,7 @@ async function handleMeteorAssertion({ assertion, inverse, outputString, rendere
|
|
|
129
128
|
assertion
|
|
130
129
|
};
|
|
131
130
|
}
|
|
132
|
-
|
|
133
131
|
//#endregion
|
|
134
132
|
export { handleMeteorAssertion };
|
|
135
|
-
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=meteor-DUiCJRC-.js.map
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { b as getEnvString, i as logger } from "./logger-CT3IKMKA.js";
|
|
2
|
+
import "./types-CLKiCBW3.js";
|
|
3
|
+
import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-60Gzydls.js";
|
|
4
|
+
import { r as fetchWithCache } from "./cache-8XhNqPKW.js";
|
|
5
|
+
import "./accounts-xrUGFA6n.js";
|
|
6
|
+
import { r as storeBlob } from "./blobs-Bpg5rH6i.js";
|
|
7
|
+
import "./tables-5EvT_Bwn.js";
|
|
8
|
+
import { n as isBlobStorageEnabled } from "./extractor-M67RUtg6.js";
|
|
9
|
+
import { t as ellipsize } from "./text-B_UCRPp2.js";
|
|
10
|
+
//#region src/providers/modelslab.ts
|
|
11
|
+
/**
|
|
12
|
+
* ModelsLab provider for text-to-image generation.
|
|
13
|
+
*
|
|
14
|
+
* Handles async polling: initial response may return {status: "processing"},
|
|
15
|
+
* in which case we poll the fetch endpoint until completion.
|
|
16
|
+
*
|
|
17
|
+
* API docs: https://docs.modelslab.com
|
|
18
|
+
*
|
|
19
|
+
* NOTE: ModelsLab uses key-in-body authentication (not Bearer header).
|
|
20
|
+
* The API key is sent as the "key" field in the JSON request body.
|
|
21
|
+
*/
|
|
22
|
+
const MODELSLAB_BASE_URL = "https://modelslab.com/api/v6";
|
|
23
|
+
const POLL_INTERVAL_MS = 3e3;
|
|
24
|
+
const MAX_POLL_ATTEMPTS = 60;
|
|
25
|
+
var ModelsLabImageProvider = class {
|
|
26
|
+
modelName;
|
|
27
|
+
apiKey;
|
|
28
|
+
config;
|
|
29
|
+
constructor(modelName, options = {}) {
|
|
30
|
+
const { config, id, env } = options;
|
|
31
|
+
this.modelName = modelName;
|
|
32
|
+
this.apiKey = config?.apiKey || env?.MODELSLAB_API_KEY || getEnvString("MODELSLAB_API_KEY");
|
|
33
|
+
const { apiKey: _apiKey, ...restConfig } = config ?? {};
|
|
34
|
+
this.config = restConfig;
|
|
35
|
+
this.id = id ? () => id : this.id;
|
|
36
|
+
}
|
|
37
|
+
id() {
|
|
38
|
+
return `modelslab:image:${this.modelName}`;
|
|
39
|
+
}
|
|
40
|
+
toString() {
|
|
41
|
+
return `[ModelsLab Image Provider ${this.modelName}]`;
|
|
42
|
+
}
|
|
43
|
+
async callApi(prompt, context, _callApiOptions) {
|
|
44
|
+
if (!this.apiKey) return { error: "ModelsLab API key is not set. Set the MODELSLAB_API_KEY environment variable or add `apiKey` to the provider config." };
|
|
45
|
+
const config = {
|
|
46
|
+
...this.config,
|
|
47
|
+
...context?.prompt?.config
|
|
48
|
+
};
|
|
49
|
+
const requestBody = {
|
|
50
|
+
key: this.apiKey,
|
|
51
|
+
model_id: this.modelName,
|
|
52
|
+
prompt,
|
|
53
|
+
width: config.width ?? 512,
|
|
54
|
+
height: config.height ?? 512,
|
|
55
|
+
num_inference_steps: config.num_inference_steps ?? 30,
|
|
56
|
+
guidance_scale: config.guidance_scale ?? 7.5,
|
|
57
|
+
samples: config.samples ?? 1,
|
|
58
|
+
safety_checker: config.safety_checker ?? "no",
|
|
59
|
+
enhance_prompt: config.enhance_prompt ?? "no"
|
|
60
|
+
};
|
|
61
|
+
if (config.negative_prompt) requestBody.negative_prompt = config.negative_prompt;
|
|
62
|
+
if (config.seed !== void 0) requestBody.seed = config.seed;
|
|
63
|
+
try {
|
|
64
|
+
logger.debug("[ModelsLab] Image generation request", {
|
|
65
|
+
model: this.modelName,
|
|
66
|
+
prompt: ellipsize(prompt, 50)
|
|
67
|
+
});
|
|
68
|
+
const response = await fetchWithCache(`${MODELSLAB_BASE_URL}/images/text2img`, {
|
|
69
|
+
method: "POST",
|
|
70
|
+
headers: { "Content-Type": "application/json" },
|
|
71
|
+
body: JSON.stringify(requestBody)
|
|
72
|
+
}, REQUEST_TIMEOUT_MS, "json", true);
|
|
73
|
+
let data = response.data;
|
|
74
|
+
let cached = response.cached;
|
|
75
|
+
if (data.status === "processing") {
|
|
76
|
+
const requestId = data.request_id ?? String(data.id);
|
|
77
|
+
logger.debug("[ModelsLab] Image is processing, polling for result", {
|
|
78
|
+
model: this.modelName,
|
|
79
|
+
requestId
|
|
80
|
+
});
|
|
81
|
+
data = await this.pollForCompletion(requestId);
|
|
82
|
+
cached = false;
|
|
83
|
+
}
|
|
84
|
+
if (data.status === "error") return {
|
|
85
|
+
cached,
|
|
86
|
+
error: `ModelsLab API error: ${data.message || "Unknown error"}`
|
|
87
|
+
};
|
|
88
|
+
if (data.status === "success") {
|
|
89
|
+
if (!data.output || data.output.length === 0) return { error: "ModelsLab returned no image URLs" };
|
|
90
|
+
const imageUrl = data.output[0];
|
|
91
|
+
const { url: resolvedUrl, blobRef } = await this.maybeDownloadToBlob(imageUrl);
|
|
92
|
+
return {
|
|
93
|
+
output: `![${ellipsize(prompt.replace(/\r?\n|\r/g, " ").replace(/\[/g, "(").replace(/\]/g, ")"), 50)}](${resolvedUrl})`,
|
|
94
|
+
cached,
|
|
95
|
+
...blobRef && { metadata: {
|
|
96
|
+
blobRef,
|
|
97
|
+
blobHash: blobRef.hash
|
|
98
|
+
} }
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return { error: `Unexpected ModelsLab response status: ${data.status}` };
|
|
102
|
+
} catch (err) {
|
|
103
|
+
return { error: `ModelsLab API call error: ${String(err)}` };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async maybeDownloadToBlob(imageUrl) {
|
|
107
|
+
if (!isBlobStorageEnabled()) return { url: imageUrl };
|
|
108
|
+
try {
|
|
109
|
+
const response = await fetchWithProxy(imageUrl);
|
|
110
|
+
if (!response.ok) {
|
|
111
|
+
logger.warn("[ModelsLab] Failed to download image for blob storage", {
|
|
112
|
+
url: imageUrl,
|
|
113
|
+
status: response.status
|
|
114
|
+
});
|
|
115
|
+
return { url: imageUrl };
|
|
116
|
+
}
|
|
117
|
+
const { ref } = await storeBlob(Buffer.from(await response.arrayBuffer()), response.headers.get("content-type")?.split(";")[0] || "image/png", {
|
|
118
|
+
location: "response.output",
|
|
119
|
+
kind: "image"
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
url: ref.uri,
|
|
123
|
+
blobRef: ref
|
|
124
|
+
};
|
|
125
|
+
} catch (error) {
|
|
126
|
+
logger.warn("[ModelsLab] Failed to store image as blob, using URL", {
|
|
127
|
+
url: imageUrl,
|
|
128
|
+
error: String(error)
|
|
129
|
+
});
|
|
130
|
+
return { url: imageUrl };
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async pollForCompletion(requestId) {
|
|
134
|
+
const fetchUrl = `${MODELSLAB_BASE_URL}/images/fetch/${requestId}`;
|
|
135
|
+
for (let attempt = 0; attempt < MAX_POLL_ATTEMPTS; attempt++) {
|
|
136
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
137
|
+
try {
|
|
138
|
+
const data = (await fetchWithCache(fetchUrl, {
|
|
139
|
+
method: "POST",
|
|
140
|
+
headers: { "Content-Type": "application/json" },
|
|
141
|
+
body: JSON.stringify({ key: this.apiKey })
|
|
142
|
+
}, REQUEST_TIMEOUT_MS, "json", true)).data;
|
|
143
|
+
logger.debug("[ModelsLab] Poll attempt", {
|
|
144
|
+
attempt: attempt + 1,
|
|
145
|
+
requestId,
|
|
146
|
+
status: data.status
|
|
147
|
+
});
|
|
148
|
+
if (data.status === "success" || data.status === "error") return data;
|
|
149
|
+
} catch (error) {
|
|
150
|
+
logger.warn("[ModelsLab] Poll attempt failed", {
|
|
151
|
+
attempt: attempt + 1,
|
|
152
|
+
requestId,
|
|
153
|
+
error: String(error)
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
status: "error",
|
|
159
|
+
message: `ModelsLab image generation timed out after ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS / 1e3}s`
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { ModelsLabImageProvider };
|
|
165
|
+
|
|
166
|
+
//# sourceMappingURL=modelslab-C1OLRmVX.js.map
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { C as getEnvString, o as logger } from "./logger-KkObSCzq.js";
|
|
3
|
+
import { f as REQUEST_TIMEOUT_MS, n as fetchWithProxy } from "./fetch-BMv0O527.js";
|
|
4
|
+
import "./accounts-CMqkzrVf.js";
|
|
5
|
+
import "./cloud-Bc9526yV.js";
|
|
6
|
+
import "./types-CH3Ge2sE.js";
|
|
7
|
+
import { a as fetchWithCache } from "./cache-CG0SlR1d.js";
|
|
8
|
+
import { i as storeBlob } from "./blobs-BAU-dXan.js";
|
|
9
|
+
import "./tables-D36WTqKX.js";
|
|
10
|
+
import { n as isBlobStorageEnabled } from "./extractor-CFG6bcWJ.js";
|
|
11
|
+
import { t as ellipsize } from "./text-Db-Wt2u2.js";
|
|
12
|
+
//#region src/providers/modelslab.ts
|
|
13
|
+
/**
|
|
14
|
+
* ModelsLab provider for text-to-image generation.
|
|
15
|
+
*
|
|
16
|
+
* Handles async polling: initial response may return {status: "processing"},
|
|
17
|
+
* in which case we poll the fetch endpoint until completion.
|
|
18
|
+
*
|
|
19
|
+
* API docs: https://docs.modelslab.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: ModelsLab uses key-in-body authentication (not Bearer header).
|
|
22
|
+
* The API key is sent as the "key" field in the JSON request body.
|
|
23
|
+
*/
|
|
24
|
+
const MODELSLAB_BASE_URL = "https://modelslab.com/api/v6";
|
|
25
|
+
const POLL_INTERVAL_MS = 3e3;
|
|
26
|
+
const MAX_POLL_ATTEMPTS = 60;
|
|
27
|
+
var ModelsLabImageProvider = class {
|
|
28
|
+
modelName;
|
|
29
|
+
apiKey;
|
|
30
|
+
config;
|
|
31
|
+
constructor(modelName, options = {}) {
|
|
32
|
+
const { config, id, env } = options;
|
|
33
|
+
this.modelName = modelName;
|
|
34
|
+
this.apiKey = config?.apiKey || env?.MODELSLAB_API_KEY || getEnvString("MODELSLAB_API_KEY");
|
|
35
|
+
const { apiKey: _apiKey, ...restConfig } = config ?? {};
|
|
36
|
+
this.config = restConfig;
|
|
37
|
+
this.id = id ? () => id : this.id;
|
|
38
|
+
}
|
|
39
|
+
id() {
|
|
40
|
+
return `modelslab:image:${this.modelName}`;
|
|
41
|
+
}
|
|
42
|
+
toString() {
|
|
43
|
+
return `[ModelsLab Image Provider ${this.modelName}]`;
|
|
44
|
+
}
|
|
45
|
+
async callApi(prompt, context, _callApiOptions) {
|
|
46
|
+
if (!this.apiKey) return { error: "ModelsLab API key is not set. Set the MODELSLAB_API_KEY environment variable or add `apiKey` to the provider config." };
|
|
47
|
+
const config = {
|
|
48
|
+
...this.config,
|
|
49
|
+
...context?.prompt?.config
|
|
50
|
+
};
|
|
51
|
+
const requestBody = {
|
|
52
|
+
key: this.apiKey,
|
|
53
|
+
model_id: this.modelName,
|
|
54
|
+
prompt,
|
|
55
|
+
width: config.width ?? 512,
|
|
56
|
+
height: config.height ?? 512,
|
|
57
|
+
num_inference_steps: config.num_inference_steps ?? 30,
|
|
58
|
+
guidance_scale: config.guidance_scale ?? 7.5,
|
|
59
|
+
samples: config.samples ?? 1,
|
|
60
|
+
safety_checker: config.safety_checker ?? "no",
|
|
61
|
+
enhance_prompt: config.enhance_prompt ?? "no"
|
|
62
|
+
};
|
|
63
|
+
if (config.negative_prompt) requestBody.negative_prompt = config.negative_prompt;
|
|
64
|
+
if (config.seed !== void 0) requestBody.seed = config.seed;
|
|
65
|
+
try {
|
|
66
|
+
logger.debug("[ModelsLab] Image generation request", {
|
|
67
|
+
model: this.modelName,
|
|
68
|
+
prompt: ellipsize(prompt, 50)
|
|
69
|
+
});
|
|
70
|
+
const response = await fetchWithCache(`${MODELSLAB_BASE_URL}/images/text2img`, {
|
|
71
|
+
method: "POST",
|
|
72
|
+
headers: { "Content-Type": "application/json" },
|
|
73
|
+
body: JSON.stringify(requestBody)
|
|
74
|
+
}, REQUEST_TIMEOUT_MS, "json", true);
|
|
75
|
+
let data = response.data;
|
|
76
|
+
let cached = response.cached;
|
|
77
|
+
if (data.status === "processing") {
|
|
78
|
+
const requestId = data.request_id ?? String(data.id);
|
|
79
|
+
logger.debug("[ModelsLab] Image is processing, polling for result", {
|
|
80
|
+
model: this.modelName,
|
|
81
|
+
requestId
|
|
82
|
+
});
|
|
83
|
+
data = await this.pollForCompletion(requestId);
|
|
84
|
+
cached = false;
|
|
85
|
+
}
|
|
86
|
+
if (data.status === "error") return {
|
|
87
|
+
cached,
|
|
88
|
+
error: `ModelsLab API error: ${data.message || "Unknown error"}`
|
|
89
|
+
};
|
|
90
|
+
if (data.status === "success") {
|
|
91
|
+
if (!data.output || data.output.length === 0) return { error: "ModelsLab returned no image URLs" };
|
|
92
|
+
const imageUrl = data.output[0];
|
|
93
|
+
const { url: resolvedUrl, blobRef } = await this.maybeDownloadToBlob(imageUrl);
|
|
94
|
+
return {
|
|
95
|
+
output: `![${ellipsize(prompt.replace(/\r?\n|\r/g, " ").replace(/\[/g, "(").replace(/\]/g, ")"), 50)}](${resolvedUrl})`,
|
|
96
|
+
cached,
|
|
97
|
+
...blobRef && { metadata: {
|
|
98
|
+
blobRef,
|
|
99
|
+
blobHash: blobRef.hash
|
|
100
|
+
} }
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return { error: `Unexpected ModelsLab response status: ${data.status}` };
|
|
104
|
+
} catch (err) {
|
|
105
|
+
return { error: `ModelsLab API call error: ${String(err)}` };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async maybeDownloadToBlob(imageUrl) {
|
|
109
|
+
if (!isBlobStorageEnabled()) return { url: imageUrl };
|
|
110
|
+
try {
|
|
111
|
+
const response = await fetchWithProxy(imageUrl);
|
|
112
|
+
if (!response.ok) {
|
|
113
|
+
logger.warn("[ModelsLab] Failed to download image for blob storage", {
|
|
114
|
+
url: imageUrl,
|
|
115
|
+
status: response.status
|
|
116
|
+
});
|
|
117
|
+
return { url: imageUrl };
|
|
118
|
+
}
|
|
119
|
+
const { ref } = await storeBlob(Buffer.from(await response.arrayBuffer()), response.headers.get("content-type")?.split(";")[0] || "image/png", {
|
|
120
|
+
location: "response.output",
|
|
121
|
+
kind: "image"
|
|
122
|
+
});
|
|
123
|
+
return {
|
|
124
|
+
url: ref.uri,
|
|
125
|
+
blobRef: ref
|
|
126
|
+
};
|
|
127
|
+
} catch (error) {
|
|
128
|
+
logger.warn("[ModelsLab] Failed to store image as blob, using URL", {
|
|
129
|
+
url: imageUrl,
|
|
130
|
+
error: String(error)
|
|
131
|
+
});
|
|
132
|
+
return { url: imageUrl };
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async pollForCompletion(requestId) {
|
|
136
|
+
const fetchUrl = `${MODELSLAB_BASE_URL}/images/fetch/${requestId}`;
|
|
137
|
+
for (let attempt = 0; attempt < MAX_POLL_ATTEMPTS; attempt++) {
|
|
138
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
139
|
+
try {
|
|
140
|
+
const data = (await fetchWithCache(fetchUrl, {
|
|
141
|
+
method: "POST",
|
|
142
|
+
headers: { "Content-Type": "application/json" },
|
|
143
|
+
body: JSON.stringify({ key: this.apiKey })
|
|
144
|
+
}, REQUEST_TIMEOUT_MS, "json", true)).data;
|
|
145
|
+
logger.debug("[ModelsLab] Poll attempt", {
|
|
146
|
+
attempt: attempt + 1,
|
|
147
|
+
requestId,
|
|
148
|
+
status: data.status
|
|
149
|
+
});
|
|
150
|
+
if (data.status === "success" || data.status === "error") return data;
|
|
151
|
+
} catch (error) {
|
|
152
|
+
logger.warn("[ModelsLab] Poll attempt failed", {
|
|
153
|
+
attempt: attempt + 1,
|
|
154
|
+
requestId,
|
|
155
|
+
error: String(error)
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
status: "error",
|
|
161
|
+
message: `ModelsLab image generation timed out after ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS / 1e3}s`
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
//#endregion
|
|
166
|
+
export { ModelsLabImageProvider };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=modelslab-CqXBy3U8.js.map
|