cf 0.0.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/bin/cf +11 -0
- package/dist/_meta/agent-context.json +89 -89
- package/dist/_meta/commands.json +12866 -4982
- package/dist/_meta/schemas.json +33572 -1148
- package/dist/abuse-reports-KtfZhi6j.mjs +8 -0
- package/dist/accounts-BopMfODC.mjs +21 -0
- package/dist/acm-BT4vlnEJ.mjs +3 -0
- package/dist/addressing-B3uFxHst.mjs +13 -0
- package/dist/{agent-context-BBJnI_Q7.mjs → agent-context-D26woB9J.mjs} +1 -1
- package/dist/ai-DWHqwMap.mjs +2 -0
- package/dist/ai-gateway-CbKEO-3o.mjs +8 -0
- package/dist/ai-search-VnOQ5n--.mjs +7 -0
- package/dist/alerting-BmmgIlIO.mjs +6 -0
- package/dist/analytics-isY03taL.mjs +20 -0
- package/dist/api-gateway-DXurEbA-.mjs +33 -0
- package/dist/argo-B02BL_hp.mjs +2 -0
- package/dist/audit-logs-DcgR9xUc.mjs +2 -0
- package/dist/auth-CQcAgnOy.mjs +135 -0
- package/dist/auth-DenWm_X0.mjs +6 -0
- package/dist/autorag-CmrwnGVj.mjs +2 -0
- package/dist/billing-CaW1ZAB1.mjs +2 -0
- package/dist/body-parser-Br-BoYk-.mjs +2 -0
- package/dist/bot-management-CeBsFx68.mjs +5 -0
- package/dist/botnet-feed-B396vQeQ.mjs +3 -0
- package/dist/brand-protection-D4V1v5Kl.mjs +3 -0
- package/dist/browser-rendering-GF7rNtKI.mjs +4 -0
- package/dist/build-5jmmOZhm.mjs +1054 -0
- package/dist/{builds-B5sC8Gh_.mjs → builds-C_ySULja.mjs} +1 -1
- package/dist/cache-DmXizSMi.mjs +5 -0
- package/dist/calls-x4KQpTB4.mjs +4 -0
- package/dist/certificate-authorities-hC0SG-Ga.mjs +2 -0
- package/dist/chunk-DH-VkVmc.mjs +2 -0
- package/dist/client-certificates-BGVsDyeJ.mjs +3 -0
- package/dist/cloud-connector-BClQpEzI.mjs +2 -0
- package/dist/cloudforce-one-BfhFrO6M.mjs +21 -0
- package/dist/{completions-BSRqbcrz.mjs → completions-BKrxcfhN.mjs} +1 -1
- package/dist/config-DYzlVxcB.mjs +2 -0
- package/dist/connectivity-G0NP6LtW.mjs +3 -0
- package/dist/content-scanning-DEtPJ7aF.mjs +4 -0
- package/dist/context-CC0Rhkhy.mjs +2 -0
- package/dist/custom-certificates-rJXFpUWu.mjs +5 -0
- package/dist/custom-hostnames-Be5mgLeF.mjs +5 -0
- package/dist/custom-nameservers-CoFdy6hD.mjs +3 -0
- package/dist/custom-pages-D-oErw57.mjs +4 -0
- package/dist/d1-C95ckPKI.mjs +3 -0
- package/dist/dcv-delegation-CWSkbGuc.mjs +2 -0
- package/dist/delegate.mjs +2 -0
- package/dist/deploy-DbkiIzUr.mjs +2 -0
- package/dist/dev-C6iSuQZm.mjs +6 -0
- package/dist/diagnostics-DEEhPnXj.mjs +3 -0
- package/dist/dispatch-namespaces-BzXeV7PH.mjs +7 -0
- package/dist/dist-CnSubA1Z.mjs +82 -0
- package/dist/dist-DNBSHor6.mjs +301 -0
- package/dist/dns-firewall-BQXD_NxG.mjs +57 -0
- package/dist/dns-qW-3TZOT.mjs +29 -0
- package/dist/durable-objects-CgWFYEJJ.mjs +2 -0
- package/dist/email-routing-tdNJaCpJ.mjs +10 -0
- package/dist/email-security-DTVHNr2h.mjs +60 -0
- package/dist/email-sending-DsFTvE31.mjs +3 -0
- package/dist/filters-DO1Is_tI.mjs +4 -0
- package/dist/firewall-DbUhVTCg.mjs +11 -0
- package/dist/fraud-Bzr4njYb.mjs +8 -0
- package/dist/google-tag-gateway-BQxkA90M.mjs +2 -0
- package/dist/healthchecks-BBAs-lS_.mjs +4 -0
- package/dist/hostnames-Dz9PEUKS.mjs +3 -0
- package/dist/hyperdrive-B1iUJddG.mjs +18 -0
- package/dist/iam-CJM8gHpG.mjs +6 -0
- package/dist/images-DEoBmtFS.mjs +5 -0
- package/dist/index.mjs +1 -1
- package/dist/input-validation-zEO81MWN.mjs +2 -0
- package/dist/intel-BM6xkZ0C.mjs +3 -0
- package/dist/ips-B8fwxKZD.mjs +2 -0
- package/dist/keyless-certificates-DffYnd4b.mjs +3 -0
- package/dist/kv-BTceLtWZ.mjs +5 -0
- package/dist/leaked-credential-checks-CALfvoCo.mjs +3 -0
- package/dist/lib-Eu1wXxuh.mjs +68 -0
- package/dist/load-balancers-C1Ho1gCF.mjs +6 -0
- package/dist/local-VJaJ3BZ1.mjs +2 -0
- package/dist/logpush-CSYhgevA.mjs +4 -0
- package/dist/logs-DlIwmMpt.mjs +3 -0
- package/dist/magic-cloud-networking-Czu0pZ0a.mjs +5 -0
- package/dist/magic-network-monitoring-d7GJE5Yt.mjs +4 -0
- package/dist/magic-transit-qQmA-981.mjs +89 -0
- package/dist/managed-transforms-Dd6AnbWE.mjs +3 -0
- package/dist/mtls-certificates-C0rlCRGs.mjs +3 -0
- package/dist/network-interconnects-CxG2deY0.mjs +36 -0
- package/dist/organizations-DyEAiGiR.mjs +41 -0
- package/dist/origin-ca-certificates-S8RcoMF6.mjs +3 -0
- package/dist/origin-post-quantum-encryption-B8ZcpLu5.mjs +2 -0
- package/dist/origin-tls-client-auth-BlxMmQrE.mjs +5 -0
- package/dist/{output-CqGQp2r6.mjs → output-D7_yAFVR.mjs} +1 -1
- package/dist/page-rules-DP-w6TAm.mjs +18 -0
- package/dist/page-shield-Bf7kFp8c.mjs +37 -0
- package/dist/pages-D0Y_XRqW.mjs +10 -0
- package/dist/pipelines-C-SPESAk.mjs +6 -0
- package/dist/progress-CjcQ6ato.mjs +2 -0
- package/dist/queues-wv6CZsi8.mjs +6 -0
- package/dist/r2-DuXjp9n5.mjs +21 -0
- package/dist/r2-data-catalog-DQCMrmNO.mjs +14 -0
- package/dist/radar-BW_ZHP8X.mjs +2 -0
- package/dist/rate-limits-DLTkIvwr.mjs +5 -0
- package/dist/raw-fetch-hRv-6P3D.mjs +2 -0
- package/dist/realtime-kit-Ch7Vg3vj.mjs +6 -0
- package/dist/registrar-DIIv6fWd.mjs +46 -0
- package/dist/request-tracers-DMej0Drs.mjs +2 -0
- package/dist/resolve-BuJRWSk0.mjs +2 -0
- package/dist/resource-sharing-CYJ7cMWq.mjs +5 -0
- package/dist/resource-tagging-Dnz65MgH.mjs +16 -0
- package/dist/rules-DLJpOYbC.mjs +4 -0
- package/dist/rulesets-D9nqEJT5.mjs +8 -0
- package/dist/rum-DBVmdPkp.mjs +4 -0
- package/dist/{schema-qJlCfmo8.mjs → schema-CHBfkARI.mjs} +1 -1
- package/dist/schema-validation-MCd3xdtX.mjs +4 -0
- package/dist/scim-DZA3VXog.mjs +3 -0
- package/dist/{scm-C872x0C2.mjs → scm-CilfPOue.mjs} +1 -1
- package/dist/secrets-store-BrvcZSOM.mjs +21 -0
- package/dist/security-center-BU6f3Cm1.mjs +2 -0
- package/dist/security-txt-BPIbP3dG.mjs +3 -0
- package/dist/session-H7IV2BrM.mjs +2 -0
- package/dist/shared-DEzmTsEC.mjs +2 -0
- package/dist/smart-shield-e8XFBkiF.mjs +3 -0
- package/dist/snippets-B4M3MMb8.mjs +4 -0
- package/dist/spawn-13QQ0IwO.mjs +10 -0
- package/dist/spectrum-B0adfSRI.mjs +59 -0
- package/dist/speed-BVcUtkAz.mjs +4 -0
- package/dist/src-B9cKsgsg.mjs +108 -0
- package/dist/ssl-BAa91gsc.mjs +15 -0
- package/dist/stream-D53sxKb3.mjs +14 -0
- package/dist/tenants-bH5pt3dJ.mjs +2 -0
- package/dist/{theme-BKCxTQTe.mjs → theme-BklJDrb2.mjs} +2 -2
- package/dist/token-validation-M61Vx_Tw.mjs +4 -0
- package/dist/{tools-CawscCBu.mjs → tools-B7QiNu-d.mjs} +1 -1
- package/dist/turnstile-wAU0Gc2Z.mjs +23 -0
- package/dist/{ui-Dj3No2vN.mjs → ui-BXjU1dX1.mjs} +1 -1
- package/dist/url-normalization-DZrWDgB5.mjs +3 -0
- package/dist/url-scanner-Zo49edNp.mjs +2 -0
- package/dist/user-DbXlVReB.mjs +10 -0
- package/dist/vectorize-CUnTM0DT.mjs +4 -0
- package/dist/versions-DzyrlUAi.mjs +2 -0
- package/dist/{vuln-scanner-B1VwCIko.mjs → vuln-scanner-Br_2lQp1.mjs} +1 -1
- package/dist/waiting-rooms-BZW0X69-.mjs +11 -0
- package/dist/web3-DueyOQtx.mjs +4 -0
- package/dist/workers-builds-BM_aoeUR.mjs +7 -0
- package/dist/workers-nV_vBCfV.mjs +16 -0
- package/dist/workflows-CQITmo-s.mjs +4 -0
- package/dist/zaraz-DIbpF5Op.mjs +2 -0
- package/dist/zero-trust-CKp8j512.mjs +119 -0
- package/dist/zones-BZ5tZDbH.mjs +28 -0
- package/package.json +13 -3
- package/dist/abuse-reports-DR0yMg-Q.mjs +0 -2
- package/dist/accounts-BjGtCB8T.mjs +0 -6
- package/dist/acm-h4YPDN7k.mjs +0 -3
- package/dist/addressing-BiEnQ1o1.mjs +0 -11
- package/dist/ai-BPln2Yka.mjs +0 -2
- package/dist/ai-gateway-DgD9nKyd.mjs +0 -8
- package/dist/ai-search-EjrONI5a.mjs +0 -7
- package/dist/alerting-CPWMKr-m.mjs +0 -6
- package/dist/analytics-3dX9-scQ.mjs +0 -2
- package/dist/api-gateway-7FKFHdI-.mjs +0 -9
- package/dist/argo-Dxz9P37E.mjs +0 -2
- package/dist/audit-logs-D_Xw5x8Y.mjs +0 -2
- package/dist/auth-BHD_B2p9.mjs +0 -277
- package/dist/auth-caVo2j1K.mjs +0 -6
- package/dist/autorag-D7nMweNF.mjs +0 -2
- package/dist/billing-yaIBp1Xq.mjs +0 -2
- package/dist/body-parser-iA3vRFmh.mjs +0 -2
- package/dist/bot-management-C0H6U0t4.mjs +0 -2
- package/dist/botnet-feed-BXV9GVwF.mjs +0 -3
- package/dist/brand-protection-CI0NQa_l.mjs +0 -3
- package/dist/browser-rendering-DnKNRJJe.mjs +0 -4
- package/dist/cache-B6M_pm_D.mjs +0 -5
- package/dist/calls-C5XCC0i1.mjs +0 -4
- package/dist/certificate-authorities-BQuHL4dm.mjs +0 -2
- package/dist/client-certificates-CwpzEnCT.mjs +0 -3
- package/dist/cloud-connector-CU3PLNLe.mjs +0 -2
- package/dist/cloudforce-one-DzrArr1o.mjs +0 -21
- package/dist/config-BmTd_qeU.mjs +0 -2
- package/dist/connectivity-C4tXPkW_.mjs +0 -3
- package/dist/content-scanning-CH_YXdlZ.mjs +0 -4
- package/dist/context-6lBIck1r.mjs +0 -2
- package/dist/custom-certificates-pllRyU2y.mjs +0 -3
- package/dist/custom-hostnames-GmF0DfYA.mjs +0 -5
- package/dist/custom-nameservers-DPVHUlUQ.mjs +0 -3
- package/dist/custom-pages-XWwfn7hV.mjs +0 -4
- package/dist/d1-c_zhZGWf.mjs +0 -3
- package/dist/dcv-delegation-pXpU48A8.mjs +0 -2
- package/dist/dev-Bu26u5Jm.mjs +0 -14
- package/dist/diagnostics-BU07Jnku.mjs +0 -3
- package/dist/dispatch-namespaces-D_Kq_2gX.mjs +0 -7
- package/dist/dns-CrvIxztB.mjs +0 -11
- package/dist/dns-firewall-CLtGAQ9x.mjs +0 -3
- package/dist/dry-run-FV0pZwdg.mjs +0 -2
- package/dist/durable-objects-Y5rLFSQX.mjs +0 -2
- package/dist/email-routing-CxU5JlXT.mjs +0 -10
- package/dist/email-security-CnpAHWpj.mjs +0 -8
- package/dist/email-sending-MeCKsktR.mjs +0 -3
- package/dist/filters-Sx2Po1UP.mjs +0 -4
- package/dist/firewall-B0_012XO.mjs +0 -9
- package/dist/fraud-CG0G_VG-.mjs +0 -2
- package/dist/google-tag-gateway-BLbj1y3h.mjs +0 -2
- package/dist/healthchecks-C0LgExxa.mjs +0 -4
- package/dist/hostnames-D4K6s9EX.mjs +0 -3
- package/dist/hyperdrive-D7XvTRys.mjs +0 -3
- package/dist/iam-4LhJianW.mjs +0 -6
- package/dist/images-BqXyIycX.mjs +0 -5
- package/dist/input-validation-BpVQi9rR.mjs +0 -2
- package/dist/intel-CiO3Sy4x.mjs +0 -3
- package/dist/ips-DLuGN7Mr.mjs +0 -2
- package/dist/keyless-certificates-x-87T5SM.mjs +0 -3
- package/dist/kv-CVYCrk7L.mjs +0 -5
- package/dist/leaked-credential-checks-FvhVCL23.mjs +0 -3
- package/dist/load-balancers-cxodJuI2.mjs +0 -6
- package/dist/local-OqhVQbv0.mjs +0 -2
- package/dist/logpush-BX7z2xWz.mjs +0 -4
- package/dist/logs-C7vxr6Kp.mjs +0 -3
- package/dist/magic-cloud-networking-C3grROf-.mjs +0 -5
- package/dist/magic-network-monitoring-DiZ5ZXxh.mjs +0 -4
- package/dist/magic-transit-troGMFb9.mjs +0 -30
- package/dist/managed-transforms-B5w_LlVN.mjs +0 -3
- package/dist/mtls-certificates-C1S9MciH.mjs +0 -3
- package/dist/network-interconnects-CVSiv1fF.mjs +0 -4
- package/dist/organizations-BtlEchi-.mjs +0 -4
- package/dist/origin-ca-certificates-0XCi4dO6.mjs +0 -3
- package/dist/origin-post-quantum-encryption-CTvkdYDG.mjs +0 -2
- package/dist/origin-tls-client-auth-qAvRD1BQ.mjs +0 -5
- package/dist/page-rules-CcMmrvY4.mjs +0 -3
- package/dist/page-shield-Dxh4bJ-w.mjs +0 -3
- package/dist/pages-F1vdzqgC.mjs +0 -6
- package/dist/pipelines-DsF1HHMY.mjs +0 -6
- package/dist/progress-5sHFvwez.mjs +0 -2
- package/dist/queues-BuvkxFPX.mjs +0 -6
- package/dist/r2-Du-fgHiT.mjs +0 -9
- package/dist/r2-data-catalog-BUiMNSwc.mjs +0 -3
- package/dist/radar-C0eqNmWR.mjs +0 -2
- package/dist/rate-limits-CUv2cxXV.mjs +0 -3
- package/dist/raw-fetch-CxFs4i0R.mjs +0 -2
- package/dist/realtime-kit-C-jix3I_.mjs +0 -6
- package/dist/registrar-B7V7i89n.mjs +0 -2
- package/dist/request-tracers-D2V7QUrC.mjs +0 -2
- package/dist/resolve-GtphSYWh.mjs +0 -2
- package/dist/resource-sharing-BgH0w9wm.mjs +0 -5
- package/dist/resource-tagging-BOknFugv.mjs +0 -4
- package/dist/rolldown-runtime-CR7SCCRW.mjs +0 -2
- package/dist/rules-DzJFHGW1.mjs +0 -4
- package/dist/rulesets-BzI1dUiq.mjs +0 -8
- package/dist/rum-CQ_rJ96u.mjs +0 -4
- package/dist/schema-validation-TmikfxS9.mjs +0 -4
- package/dist/scim-ByZ5kqXS.mjs +0 -3
- package/dist/secrets-store-D7HL4VXw.mjs +0 -8
- package/dist/security-center-OUrILUnx.mjs +0 -2
- package/dist/security-txt-Ca13oCJ8.mjs +0 -3
- package/dist/session-Dxi_LbAk.mjs +0 -2
- package/dist/smart-shield-foPT0J9L.mjs +0 -3
- package/dist/snippets-FDPiBMWc.mjs +0 -4
- package/dist/spectrum-DPoh_BPx.mjs +0 -3
- package/dist/speed-BuEappVX.mjs +0 -4
- package/dist/src-D8_cWUwt.mjs +0 -104
- package/dist/ssl-bJbzEoRv.mjs +0 -3
- package/dist/stream-DuYGiGk6.mjs +0 -13
- package/dist/tenants-BYqEutrr.mjs +0 -2
- package/dist/token-validation-DwmtbWUB.mjs +0 -4
- package/dist/turnstile-Dy91RVTn.mjs +0 -3
- package/dist/url-normalization-DoD9iHWH.mjs +0 -3
- package/dist/url-scanner-qwL64FIo.mjs +0 -2
- package/dist/user-Cduf3VRi.mjs +0 -7
- package/dist/vectorize-CMLobU9V.mjs +0 -4
- package/dist/waiting-rooms-B4-IAJeT.mjs +0 -5
- package/dist/web3-Bcx68Kq3.mjs +0 -4
- package/dist/workers-D5fOQsUA.mjs +0 -16
- package/dist/workers-builds-2kdzxjlN.mjs +0 -7
- package/dist/workflows-qFD80noW.mjs +0 -4
- package/dist/zaraz-C0iJimA4.mjs +0 -2
- package/dist/zero-trust-Btix6zOy.mjs +0 -73
- package/dist/zones-Nu3wMtds.mjs +0 -5
- /package/dist/{metadata-DhSO1vle.mjs → metadata-DGdCpUxn.mjs} +0 -0
package/dist/ai-BPln2Yka.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{d as e,h as t,m as n,o as r,t as i,u as a}from"./auth-BHD_B2p9.mjs";import{n as o,r as s}from"./input-validation-BpVQi9rR.mjs";import{n as c,t as l}from"./body-parser-iA3vRFmh.mjs";import{t as u}from"./output-CqGQp2r6.mjs";import{t as d}from"./dry-run-FV0pZwdg.mjs";import{t as f}from"./local-OqhVQbv0.mjs";import{t as p}from"./progress-5sHFvwez.mjs";const m={command:`list`,describe:`Searches Workers AI models by author or organization name.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading authors`,async()=>t.ai.authors.list(n)),{successLabel:`Loaded authors`})}},h={command:`authors`,describe:`Search model authors and publishers in the Workers AI catalog`,builder:e=>e.command(m).demandCommand(1),handler:()=>{}},g={command:`create <finetuneId>`,describe:`Uploads training data assets for a Workers AI fine-tuning job.`,builder:e=>e.positional(`finetuneId`,{type:`string`,description:`Finetune ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Finetune asset file upload`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`file-name`,{type:`string`,description:`Name of the file (adapter_config.json or adapter_model.safetensors)`}),handler:async t=>{if(s(t.finetuneId,`finetuneId`),t.dryRun){let n=e();n&&s(n,`accountId`),d({command:`cf ai finetunes assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai/finetunes/${t.finetuneId??`<finetuneId>`}/finetune-assets`,pathParams:{finetuneId:String(t.finetuneId??``)},bodyKind:`multipart`,body:{body:t.body,file:t.file,fileName:t.fileName},validation:`passed`});return}let n=await i(t),a=t.local?f:await r(n);if(t.accountId=a,t.file!==void 0||t.body!==void 0||t.fileName!==void 0){let e=new FormData;if(t.file){let{readFileSync:n}=await import(`node:fs`),{resolve:r}=await import(`node:path`),i=n(r(t.file));e.append(`file`,new Blob([i]),t.file.split(`/`).pop())}else t.body!==void 0&&e.append(`file`,t.body);t.fileName!==void 0&&e.append(`file_name`,String(o(t.fileName,`fileName`,`text`)??``)),u(await p(`Creating asset`,async()=>n.post(`/accounts/${a}/ai/finetunes/${t.finetuneId}/finetune-assets`,{body:e})),{successLabel:`Created asset`});return}if(t.body){let e=o(t.body,`body`,`binary`);u(await p(`Creating asset`,async()=>n.post(`/accounts/${a}/ai/finetunes/${t.finetuneId}/finetune-assets`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created asset`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},_={command:`assets`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(g).demandCommand(1),handler:()=>{}},v={command:`create`,describe:`Creates a new fine-tuning job for a Workers AI model using custom training data.`,builder:e=>e.option(`description`,{type:`string`,description:`The description field`}).option(`model`,{type:`string`,description:`The model field`}).option(`name`,{type:`string`,description:`The name field`}).option(`public`,{type:`boolean`,description:`The public field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{if(n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai finetunes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/finetunes`,pathParams:{},bodyKind:`json`,body:{description:n.description,model:n.model,name:n.name,public:n.public,body:n.body},validation:`passed`});return}let a=await i(n),m=n.local?f:await r(a);if(n.accountId=m,n.body){let e=l(n.body);u(await p(`Creating finetune`,async()=>a.post(`/accounts/${m}/ai/finetunes`,{body:e})),{successLabel:`Created finetune`});return}n.model===void 0&&(n.model=await t(`model`,``)),n.name===void 0&&(n.name=await t(`name`,``));let h={};n.description!==void 0&&c(h,[`description`],o(n.description,`description`,`text`)),n.model!==void 0&&c(h,[`model`],o(n.model,`model`,`text`)),n.name!==void 0&&c(h,[`name`],o(n.name,`name`,`text`)),n.public!==void 0&&c(h,[`public`],n.public),u(await p(`Creating finetune`,async()=>a.post(`/accounts/${m}/ai/finetunes`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created finetune`})}},ee={command:`list`,describe:`Lists all fine-tuning jobs created by the account, including status and metrics.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading finetunes`,async()=>t.ai.finetunes.list(n)),{successLabel:`Loaded finetunes`})}},te={command:`list`,describe:`Lists publicly available fine-tuned models that can be used with Workers AI.`,builder:e=>e.option(`limit`,{type:`number`,description:`Pagination Limit`}).option(`offset`,{type:`number`,description:`Pagination Offset`}).option(`order-by`,{type:`string`,description:`Order By Column Name`}),handler:async e=>{let t={};e.limit!==void 0&&(t.limit=e.limit),e.offset!==void 0&&(t.offset=e.offset),e.orderBy!==void 0&&(t.orderBy=e.orderBy);let n=await i(e),a=e.local?f:await r(n);e.accountId=a,u(await p(`Loading public`,async()=>n.ai.finetunes.public.list(a,Object.keys(t).length>0?t:void 0)),{successLabel:`Loaded public`})}},y={command:`public`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(te).demandCommand(1),handler:()=>{}},b={command:`finetunes`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(v).command(ee).command(_).command(y).demandCommand(1),handler:()=>{}},x={command:`get`,describe:`Get the Firewall for AI custom topic categories for a zone.`,builder:e=>e,handler:async e=>{let t=await i(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,u(await p(`Loading firewall custom topic`,async()=>t.ai.firewallCustomTopics.get(n)),{successLabel:`Loaded firewall custom topic`})}},S={command:`update`,describe:`Set the Firewall for AI custom topic categories for a zone. A maximum of 20 custom topics can be configured per zone. Each topic label must be 2–20 characters using only lowercase letters (a–z), digits (0–9), and hyphens. Each topic description must be 2–50 printable ASCII characters. Changes can take up to a minute to propagate to the zone.`,builder:e=>e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async e=>{if(e.dryRun){d({command:`cf ai firewall-custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/firewall-for-ai/custom-topics`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{body:e.body},validation:`passed`});return}let t=await i(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let n=l(e.body);u(await p(`Updating firewall custom topic`,async()=>t.put(`/zones/${e.zoneId}/firewall-for-ai/custom-topics`,{body:n})),{successLabel:`Updated firewall custom topic`});return}u(await p(`Updating firewall custom topic`,async()=>t.ai.firewallCustomTopics.update(n)),{successLabel:`Updated firewall custom topic`})}},C={command:`firewall-custom-topics`,describe:`Firewall for AI custom topics management`,builder:e=>e.command(x).command(S).demandCommand(1),handler:()=>{}},w={command:`create`,describe:`Runs inference on the @cf/ai4bharat/indictrans2-en-indic-1B model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`target-language`,{type:`string`,description:`Target langauge to translate to`,choices:`asm_Beng.awa_Deva.ben_Beng.bho_Deva.brx_Deva.doi_Deva.eng_Latn.gom_Deva.gon_Deva.guj_Gujr.hin_Deva.hne_Deva.kan_Knda.kas_Arab.kas_Deva.kha_Latn.lus_Latn.mag_Deva.mai_Deva.mal_Mlym.mar_Deva.mni_Beng.mni_Mtei.npi_Deva.ory_Orya.pan_Guru.san_Deva.sat_Olck.snd_Arab.snd_Deva.tam_Taml.tel_Telu.urd_Arab.unr_Deva`.split(`.`),default:`hin_Deva`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let a={};if(t.queueRequest!==void 0&&(a.queueRequest=t.queueRequest),t.tags!==void 0&&(a.tags=t.tags),t.dryRun){let n=e();n&&s(n,`accountId`),d({command:`cf ai models ai4bharat indictrans2-en-indic-1B create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B`,pathParams:{},bodyKind:`json`,body:{...a,targetLanguage:t.targetLanguage,body:t.body},validation:`passed`});return}let m=await i(t),h=t.local?f:await r(m);if(t.accountId=h,t.body){let e=l(t.body),n=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating indictrans2 en indic 1B`,async()=>m.post(`/accounts/${h}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B${n?`?`+n:``}`,{body:e})),{successLabel:`Created indictrans2 en indic 1B`});return}t.targetLanguage===void 0&&(t.targetLanguage=await n(`target-language`,`Target langauge to translate to`,`asm_Beng.awa_Deva.ben_Beng.bho_Deva.brx_Deva.doi_Deva.eng_Latn.gom_Deva.gon_Deva.guj_Gujr.hin_Deva.hne_Deva.kan_Knda.kas_Arab.kas_Deva.kha_Latn.lus_Latn.mag_Deva.mai_Deva.mal_Mlym.mar_Deva.mni_Beng.mni_Mtei.npi_Deva.ory_Orya.pan_Guru.san_Deva.sat_Olck.snd_Arab.snd_Deva.tam_Taml.tel_Telu.urd_Arab.unr_Deva`.split(`.`)));let g={};t.targetLanguage!==void 0&&c(g,[`target_language`],o(t.targetLanguage,`targetLanguage`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating indictrans2 en indic 1B`,async()=>m.post(`/accounts/${h}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created indictrans2 en indic 1B`})}},T={command:`indictrans2-en-indic-1B`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(w).demandCommand(1),handler:()=>{}},E={command:`create`,describe:`Runs inference on the @cf/ai4bharat/nonomni-indictrans2-en-indic-1b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`target-language`,{type:`string`,description:`Target langauge to translate to`,choices:`asm_Beng.awa_Deva.ben_Beng.bho_Deva.brx_Deva.doi_Deva.eng_Latn.gom_Deva.gon_Deva.guj_Gujr.hin_Deva.hne_Deva.kan_Knda.kas_Arab.kas_Deva.kha_Latn.lus_Latn.mag_Deva.mai_Deva.mal_Mlym.mar_Deva.mni_Beng.mni_Mtei.npi_Deva.ory_Orya.pan_Guru.san_Deva.sat_Olck.snd_Arab.snd_Deva.tam_Taml.tel_Telu.urd_Arab.unr_Deva`.split(`.`),default:`hin_Deva`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let a={};if(t.queueRequest!==void 0&&(a.queueRequest=t.queueRequest),t.tags!==void 0&&(a.tags=t.tags),t.dryRun){let n=e();n&&s(n,`accountId`),d({command:`cf ai models ai4bharat nonomni-indictrans2-en-indic-1b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b`,pathParams:{},bodyKind:`json`,body:{...a,targetLanguage:t.targetLanguage,body:t.body},validation:`passed`});return}let m=await i(t),h=t.local?f:await r(m);if(t.accountId=h,t.body){let e=l(t.body),n=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni indictrans2 en indic 1b`,async()=>m.post(`/accounts/${h}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b${n?`?`+n:``}`,{body:e})),{successLabel:`Created nonomni indictrans2 en indic 1b`});return}t.targetLanguage===void 0&&(t.targetLanguage=await n(`target-language`,`Target langauge to translate to`,`asm_Beng.awa_Deva.ben_Beng.bho_Deva.brx_Deva.doi_Deva.eng_Latn.gom_Deva.gon_Deva.guj_Gujr.hin_Deva.hne_Deva.kan_Knda.kas_Arab.kas_Deva.kha_Latn.lus_Latn.mag_Deva.mai_Deva.mal_Mlym.mar_Deva.mni_Beng.mni_Mtei.npi_Deva.ory_Orya.pan_Guru.san_Deva.sat_Olck.snd_Arab.snd_Deva.tam_Taml.tel_Telu.urd_Arab.unr_Deva`.split(`.`)));let g={};t.targetLanguage!==void 0&&c(g,[`target_language`],o(t.targetLanguage,`targetLanguage`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni indictrans2 en indic 1b`,async()=>m.post(`/accounts/${h}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created nonomni indictrans2 en indic 1b`})}},D={command:`nonomni-indictrans2-en-indic-1b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(E).demandCommand(1),handler:()=>{}},O={command:`ai4bharat`,describe:`Operations for models.ai4bharat`,builder:e=>e.command(T).command(D).demandCommand(1),handler:()=>{}},k={command:`create`,describe:`Runs inference on the @cf/aisingapore/gemma-sea-lion-v4-27b-it model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:2e3}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models aisingapore gemma-sea-lion-v4-27b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma sea lion v4 27b it`,async()=>a.post(`/accounts/${m}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it${r?`?`+r:``}`,{body:e})),{successLabel:`Created gemma sea lion v4 27b it`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma sea lion v4 27b it`,async()=>a.post(`/accounts/${m}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gemma sea lion v4 27b it`})}},A={command:`gemma-sea-lion-v4-27b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(k).demandCommand(1),handler:()=>{}},j={command:`aisingapore`,describe:`Operations for models.aisingapore`,builder:e=>e.command(A).demandCommand(1),handler:()=>{}},M={command:`create`,describe:`Runs inference on the @cf/baai/bge-base-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai bge-base-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/bge-base-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge base en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-base-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created bge base en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge base en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-base-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created bge base en v1 5`})}},N={command:`bge-base-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(M).demandCommand(1),handler:()=>{}},P={command:`create`,describe:`Runs inference on the @cf/baai/bge-large-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai bge-large-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/bge-large-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge large en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-large-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created bge large en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge large en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-large-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created bge large en v1 5`})}},F={command:`bge-large-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(P).demandCommand(1),handler:()=>{}},I={command:`create`,describe:`Runs inference on the @cf/baai/bge-m3 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`query`,{type:`string`,description:`A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts`}).option(`truncate-inputs`,{type:`boolean`,description:`When provided with too long context should the model error out or truncate the context to fit?`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai bge-m3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/bge-m3`,pathParams:{},bodyKind:`json`,body:{...n,query:t.query,truncateInputs:t.truncateInputs,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge m3`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-m3${r?`?`+r:``}`,{body:e})),{successLabel:`Created bge m3`});return}let h={};t.query!==void 0&&c(h,[`query`],o(t.query,`query`,`text`)),t.truncateInputs!==void 0&&c(h,[`truncate_inputs`],t.truncateInputs);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge m3`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-m3${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created bge m3`})}},L={command:`bge-m3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(I).demandCommand(1),handler:()=>{}},R={command:`create`,describe:`Runs inference on the @cf/baai/bge-reranker-base model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`query`,{type:`string`,description:`A query you wish to perform against the provided contexts.`}).option(`top-k`,{type:`number`,description:`Number of returned results starting with the best score.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models baai bge-reranker-base create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/baai/bge-reranker-base`,pathParams:{},bodyKind:`json`,body:{...a,query:n.query,topK:n.topK,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge reranker base`,async()=>m.post(`/accounts/${h}/ai/run/@cf/baai/bge-reranker-base${t?`?`+t:``}`,{body:e})),{successLabel:`Created bge reranker base`});return}n.query===void 0&&(n.query=await t(`query`,`A query you wish to perform against the provided contexts.`));let g={};n.query!==void 0&&c(g,[`query`],o(n.query,`query`,`text`)),n.topK!==void 0&&c(g,[`top_k`],n.topK);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge reranker base`,async()=>m.post(`/accounts/${h}/ai/run/@cf/baai/bge-reranker-base${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created bge reranker base`})}},z={command:`bge-reranker-base`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(R).demandCommand(1),handler:()=>{}},B={command:`create`,describe:`Runs inference on the @cf/baai/bge-small-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai bge-small-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/bge-small-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge small en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-small-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created bge small en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bge small en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/bge-small-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created bge small en v1 5`})}},V={command:`bge-small-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(B).demandCommand(1),handler:()=>{}},H={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-base-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai nonomni-bge-base-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge base en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created nonomni bge base en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge base en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created nonomni bge base en v1 5`})}},U={command:`nonomni-bge-base-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(H).demandCommand(1),handler:()=>{}},W={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-large-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai nonomni-bge-large-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge large en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created nonomni bge large en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge large en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created nonomni bge large en v1 5`})}},G={command:`nonomni-bge-large-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(W).demandCommand(1),handler:()=>{}},K={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-m3 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`query`,{type:`string`,description:`A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts`}).option(`truncate-inputs`,{type:`boolean`,description:`When provided with too long context should the model error out or truncate the context to fit?`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai nonomni-bge-m3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-m3`,pathParams:{},bodyKind:`json`,body:{...n,query:t.query,truncateInputs:t.truncateInputs,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge m3`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-m3${r?`?`+r:``}`,{body:e})),{successLabel:`Created nonomni bge m3`});return}let h={};t.query!==void 0&&c(h,[`query`],o(t.query,`query`,`text`)),t.truncateInputs!==void 0&&c(h,[`truncate_inputs`],t.truncateInputs);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge m3`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-m3${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created nonomni bge m3`})}},q={command:`nonomni-bge-m3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(K).demandCommand(1),handler:()=>{}},J={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-small-en-v1.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`pooling`,{type:`string`,description:"The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.",choices:[`mean`,`cls`],default:`mean`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models baai nonomni-bge-small-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5`,pathParams:{},bodyKind:`json`,body:{...n,pooling:t.pooling,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge small en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created nonomni bge small en v1 5`});return}let h={};t.pooling!==void 0&&c(h,[`pooling`],o(t.pooling,`pooling`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bge small en v1 5`,async()=>a.post(`/accounts/${m}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created nonomni bge small en v1 5`})}},Y={command:`nonomni-bge-small-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(J).demandCommand(1),handler:()=>{}},X={command:`baai`,describe:`Operations for models.baai`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(U).command(G).command(q).command(Y).demandCommand(1),handler:()=>{}},Z={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-1-schnell model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate.`}).option(`steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer.`,default:4}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models black-forest-labs flux-1-schnell create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-1-schnell`,pathParams:{},bodyKind:`json`,body:{...a,prompt:n.prompt,steps:n.steps,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 1 schnell`,async()=>m.post(`/accounts/${h}/ai/run/@cf/black-forest-labs/flux-1-schnell${t?`?`+t:``}`,{body:e})),{successLabel:`Created flux 1 schnell`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let g={};n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.steps!==void 0&&c(g,[`steps`],n.steps);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 1 schnell`,async()=>m.post(`/accounts/${h}/ai/run/@cf/black-forest-labs/flux-1-schnell${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created flux 1 schnell`})}},Q={command:`flux-1-schnell`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Z).demandCommand(1),handler:()=>{}},ne={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-dev model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`multipart-content-type`,{type:`string`,description:`The multipart.contentType field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models black-forest-labs flux-2-dev create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-dev`,pathParams:{},bodyKind:`json`,body:{...n,multipartContentType:t.multipartContentType,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 dev`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-dev${r?`?`+r:``}`,{body:e})),{successLabel:`Created flux 2 dev`});return}let h={};t.multipartContentType!==void 0&&c(h,[`multipart`,`contentType`],o(t.multipartContentType,`multipartContentType`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 dev`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-dev${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created flux 2 dev`})}},re={command:`flux-2-dev`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ne).demandCommand(1),handler:()=>{}},ie={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-klein-4b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`multipart-content-type`,{type:`string`,description:`The multipart.contentType field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models black-forest-labs flux-2-klein-4b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-klein-4b`,pathParams:{},bodyKind:`json`,body:{...n,multipartContentType:t.multipartContentType,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 klein 4b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-klein-4b${r?`?`+r:``}`,{body:e})),{successLabel:`Created flux 2 klein 4b`});return}let h={};t.multipartContentType!==void 0&&c(h,[`multipart`,`contentType`],o(t.multipartContentType,`multipartContentType`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 klein 4b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-klein-4b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created flux 2 klein 4b`})}},ae={command:`flux-2-klein-4b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ie).demandCommand(1),handler:()=>{}},oe={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-klein-9b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`multipart-content-type`,{type:`string`,description:`The multipart.contentType field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models black-forest-labs flux-2-klein-9b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-klein-9b`,pathParams:{},bodyKind:`json`,body:{...n,multipartContentType:t.multipartContentType,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 klein 9b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-klein-9b${r?`?`+r:``}`,{body:e})),{successLabel:`Created flux 2 klein 9b`});return}let h={};t.multipartContentType!==void 0&&c(h,[`multipart`,`contentType`],o(t.multipartContentType,`multipartContentType`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux 2 klein 9b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/black-forest-labs/flux-2-klein-9b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created flux 2 klein 9b`})}},se={command:`flux-2-klein-9b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(oe).demandCommand(1),handler:()=>{}},ce={command:`black-forest-labs`,describe:`Operations for models.black-forest-labs`,builder:e=>e.command(Q).command(re).command(ae).command(se).demandCommand(1),handler:()=>{}},le={command:`create`,describe:`Runs inference on the @cf/bytedance/stable-diffusion-xl-lightning model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models bytedance stable-diffusion-xl-lightning create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,image:n.image,imageB64:n.imageB64,mask:n.mask,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,strength:n.strength,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion xl lightning`,async()=>m.post(`/accounts/${h}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning${t?`?`+t:``}`,{body:e})),{successLabel:`Created stable diffusion xl lightning`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.image!==void 0&&c(g,[`image`],n.image),n.imageB64!==void 0&&c(g,[`image_b64`],o(n.imageB64,`imageB64`,`text`)),n.mask!==void 0&&c(g,[`mask`],n.mask),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.strength!==void 0&&c(g,[`strength`],n.strength),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion xl lightning`,async()=>m.post(`/accounts/${h}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created stable diffusion xl lightning`})}},ue={command:`stable-diffusion-xl-lightning`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(le).demandCommand(1),handler:()=>{}},de={command:`bytedance`,describe:`Operations for models.bytedance`,builder:e=>e.command(ue).demandCommand(1),handler:()=>{}},fe={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-1-internal model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura 1 internal`,async()=>t.ai.models.deepgram.aura1Internal.get(n)),{successLabel:`Loaded aura 1 internal`})}},pe={command:`aura-1-internal`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(fe).demandCommand(1),handler:()=>{}},me={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-1 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`bit-rate`,{type:`number`,description:`The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.`}).option(`container`,{type:`string`,description:`Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..`,choices:[`none`,`wav`,`ogg`]}).option(`encoding`,{type:`string`,description:`Encoding of the output audio.`,choices:[`linear16`,`flac`,`mulaw`,`alaw`,`mp3`,`opus`,`aac`]}).option(`sample-rate`,{type:`number`,description:`Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable`}).option(`speaker`,{type:`string`,description:`Speaker used to produce the audio.`,choices:[`angus`,`asteria`,`arcas`,`orion`,`orpheus`,`athena`,`luna`,`zeus`,`perseus`,`helios`,`hera`,`stella`],default:`angus`}).option(`text`,{type:`string`,description:`The text content to be converted to speech`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models deepgram aura-1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/deepgram/aura-1`,pathParams:{},bodyKind:`json`,body:{...a,bitRate:n.bitRate,container:n.container,encoding:n.encoding,sampleRate:n.sampleRate,speaker:n.speaker,text:n.text,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 1`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-1${t?`?`+t:``}`,{body:e})),{successLabel:`Created aura 1`});return}n.text===void 0&&(n.text=await t(`text`,`The text content to be converted to speech`));let g={};n.bitRate!==void 0&&c(g,[`bit_rate`],n.bitRate),n.container!==void 0&&c(g,[`container`],o(n.container,`container`,`text`)),n.encoding!==void 0&&c(g,[`encoding`],o(n.encoding,`encoding`,`text`)),n.sampleRate!==void 0&&c(g,[`sample_rate`],n.sampleRate),n.speaker!==void 0&&c(g,[`speaker`],o(n.speaker,`speaker`,`text`)),n.text!==void 0&&c(g,[`text`],o(n.text,`text`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 1`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-1${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created aura 1`})}},he={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-1 model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura 1`,async()=>t.ai.models.deepgram.aura1.get(n)),{successLabel:`Loaded aura 1`})}},ge={command:`aura-1`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(me).command(he).demandCommand(1),handler:()=>{}},_e={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-2-en model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`bit-rate`,{type:`number`,description:`The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.`}).option(`container`,{type:`string`,description:`Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..`,choices:[`none`,`wav`,`ogg`]}).option(`encoding`,{type:`string`,description:`Encoding of the output audio.`,choices:[`linear16`,`flac`,`mulaw`,`alaw`,`mp3`,`opus`,`aac`]}).option(`sample-rate`,{type:`number`,description:`Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable`}).option(`speaker`,{type:`string`,description:`Speaker used to produce the audio.`,choices:`amalthea.andromeda.apollo.arcas.aries.asteria.athena.atlas.aurora.callista.cora.cordelia.delia.draco.electra.harmonia.helena.hera.hermes.hyperion.iris.janus.juno.jupiter.luna.mars.minerva.neptune.odysseus.ophelia.orion.orpheus.pandora.phoebe.pluto.saturn.thalia.theia.vesta.zeus`.split(`.`),default:`luna`}).option(`text`,{type:`string`,description:`The text content to be converted to speech`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models deepgram aura-2-en create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/deepgram/aura-2-en`,pathParams:{},bodyKind:`json`,body:{...a,bitRate:n.bitRate,container:n.container,encoding:n.encoding,sampleRate:n.sampleRate,speaker:n.speaker,text:n.text,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 2 en`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-2-en${t?`?`+t:``}`,{body:e})),{successLabel:`Created aura 2 en`});return}n.text===void 0&&(n.text=await t(`text`,`The text content to be converted to speech`));let g={};n.bitRate!==void 0&&c(g,[`bit_rate`],n.bitRate),n.container!==void 0&&c(g,[`container`],o(n.container,`container`,`text`)),n.encoding!==void 0&&c(g,[`encoding`],o(n.encoding,`encoding`,`text`)),n.sampleRate!==void 0&&c(g,[`sample_rate`],n.sampleRate),n.speaker!==void 0&&c(g,[`speaker`],o(n.speaker,`speaker`,`text`)),n.text!==void 0&&c(g,[`text`],o(n.text,`text`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 2 en`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-2-en${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created aura 2 en`})}},ve={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2-en model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura 2 en`,async()=>t.ai.models.deepgram.aura2En.get(n)),{successLabel:`Loaded aura 2 en`})}},ye={command:`aura-2-en`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_e).command(ve).demandCommand(1),handler:()=>{}},be={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-2-es model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`bit-rate`,{type:`number`,description:`The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.`}).option(`container`,{type:`string`,description:`Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..`,choices:[`none`,`wav`,`ogg`]}).option(`encoding`,{type:`string`,description:`Encoding of the output audio.`,choices:[`linear16`,`flac`,`mulaw`,`alaw`,`mp3`,`opus`,`aac`]}).option(`sample-rate`,{type:`number`,description:`Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable`}).option(`speaker`,{type:`string`,description:`Speaker used to produce the audio.`,choices:[`sirio`,`nestor`,`carina`,`celeste`,`alvaro`,`diana`,`aquila`,`selena`,`estrella`,`javier`],default:`aquila`}).option(`text`,{type:`string`,description:`The text content to be converted to speech`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models deepgram aura-2-es create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/deepgram/aura-2-es`,pathParams:{},bodyKind:`json`,body:{...a,bitRate:n.bitRate,container:n.container,encoding:n.encoding,sampleRate:n.sampleRate,speaker:n.speaker,text:n.text,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 2 e`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-2-es${t?`?`+t:``}`,{body:e})),{successLabel:`Created aura 2 e`});return}n.text===void 0&&(n.text=await t(`text`,`The text content to be converted to speech`));let g={};n.bitRate!==void 0&&c(g,[`bit_rate`],n.bitRate),n.container!==void 0&&c(g,[`container`],o(n.container,`container`,`text`)),n.encoding!==void 0&&c(g,[`encoding`],o(n.encoding,`encoding`,`text`)),n.sampleRate!==void 0&&c(g,[`sample_rate`],n.sampleRate),n.speaker!==void 0&&c(g,[`speaker`],o(n.speaker,`speaker`,`text`)),n.text!==void 0&&c(g,[`text`],o(n.text,`text`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating aura 2 e`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/aura-2-es${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created aura 2 e`})}},xe={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2-es model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura 2 e`,async()=>t.ai.models.deepgram.aura2Es.get(n)),{successLabel:`Loaded aura 2 e`})}},Se={command:`aura-2-es`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(be).command(xe).demandCommand(1),handler:()=>{}},Ce={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2 model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura 2`,async()=>t.ai.models.deepgram.aura2.get(n)),{successLabel:`Loaded aura 2`})}},we={command:`aura-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ce).demandCommand(1),handler:()=>{}},Te={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading aura`,async()=>t.ai.models.deepgram.aura.get(n)),{successLabel:`Loaded aura`})}},Ee={command:`aura`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Te).demandCommand(1),handler:()=>{}},De={command:`create`,describe:`Runs inference on the @cf/deepgram/flux model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`eager-eot-threshold`,{type:`string`,description:`End-of-turn confidence required to fire an eager end-of-turn event. When set, enables EagerEndOfTurn and TurnResumed events. Valid Values 0.3 - 0.9.`}).option(`encoding`,{type:`string`,description:`Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM.`,choices:[`linear16`]}).option(`eot-threshold`,{type:`string`,description:`End-of-turn confidence required to finish a turn. Valid Values 0.5 - 0.9.`,default:`0.7`}).option(`eot-timeout-ms`,{type:`string`,description:`A turn will be finished when this much time has passed after speech, regardless of EOT confidence.`,default:`5000`}).option(`keyterm`,{type:`string`,description:`Keyterm prompting can improve recognition of specialized terminology. Pass multiple keyterm query parameters to boost multiple keyterms.`}).option(`mip-opt-out`,{type:`string`,description:`Opts out requests from the Deepgram Model Improvement Program. Refer to Deepgram Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip`,choices:[`true`,`false`],default:`false`}).option(`sample-rate`,{type:`string`,description:`Sample rate of the audio stream in Hz.`}).option(`tag`,{type:`string`,description:`Label your requests for the purpose of identification during usage reporting`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async a=>{let m={};if(a.queueRequest!==void 0&&(m.queueRequest=a.queueRequest),a.tags!==void 0&&(m.tags=a.tags),a.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models deepgram flux create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/deepgram/flux`,pathParams:{},bodyKind:`json`,body:{...m,eagerEotThreshold:a.eagerEotThreshold,encoding:a.encoding,eotThreshold:a.eotThreshold,eotTimeoutMs:a.eotTimeoutMs,keyterm:a.keyterm,mipOptOut:a.mipOptOut,sampleRate:a.sampleRate,tag:a.tag,body:a.body},validation:`passed`});return}let h=await i(a),g=a.local?f:await r(h);if(a.accountId=g,a.body){let e=l(a.body),t=new URLSearchParams(Object.entries(m).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux`,async()=>h.post(`/accounts/${g}/ai/run/@cf/deepgram/flux${t?`?`+t:``}`,{body:e})),{successLabel:`Created flux`});return}a.encoding===void 0&&(a.encoding=await n(`encoding`,`Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM.`,[`linear16`])),a.sampleRate===void 0&&(a.sampleRate=await t(`sample-rate`,`Sample rate of the audio stream in Hz.`));let _={};a.eagerEotThreshold!==void 0&&c(_,[`eager_eot_threshold`],o(a.eagerEotThreshold,`eagerEotThreshold`,`text`)),a.encoding!==void 0&&c(_,[`encoding`],o(a.encoding,`encoding`,`text`)),a.eotThreshold!==void 0&&c(_,[`eot_threshold`],o(a.eotThreshold,`eotThreshold`,`text`)),a.eotTimeoutMs!==void 0&&c(_,[`eot_timeout_ms`],o(a.eotTimeoutMs,`eotTimeoutMs`,`text`)),a.keyterm!==void 0&&c(_,[`keyterm`],o(a.keyterm,`keyterm`,`text`)),a.mipOptOut!==void 0&&c(_,[`mip_opt_out`],o(a.mipOptOut,`mipOptOut`,`text`)),a.sampleRate!==void 0&&c(_,[`sample_rate`],o(a.sampleRate,`sampleRate`,`text`)),a.tag!==void 0&&c(_,[`tag`],o(a.tag,`tag`,`text`));let v=new URLSearchParams(Object.entries(m).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating flux`,async()=>h.post(`/accounts/${g}/ai/run/@cf/deepgram/flux${v?`?`+v:``}`,{body:Object.keys(_).length>0?_:void 0})),{successLabel:`Created flux`})}},Oe={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/flux model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading flux`,async()=>t.ai.models.deepgram.flux.get(n)),{successLabel:`Loaded flux`})}},ke={command:`flux`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(De).command(Oe).demandCommand(1),handler:()=>{}},Ae={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3-internal model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading nova 3 internal`,async()=>t.ai.models.deepgram.nova3Internal.get(n)),{successLabel:`Loaded nova 3 internal`})}},je={command:`nova-3-internal`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ae).demandCommand(1),handler:()=>{}},Me={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3-ws model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading nova 3 w`,async()=>t.ai.models.deepgram.nova3Ws.get(n)),{successLabel:`Loaded nova 3 w`})}},Ne={command:`nova-3-ws`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Me).demandCommand(1),handler:()=>{}},Pe={command:`create`,describe:`Runs inference on the @cf/deepgram/nova-3 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`audio-content-type`,{type:`string`,description:`The audio.contentType field`}).option(`channels`,{type:`number`,description:`The number of channels in the submitted audio`}).option(`custom-intent`,{type:`string`,description:`Custom intents you want the model to detect within your input audio if present`}).option(`custom-intent-mode`,{type:`string`,description:`Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param`,choices:[`extended`,`strict`]}).option(`custom-topic`,{type:`string`,description:`Custom topics you want the model to detect within your input audio or text if present Submit up to 100`}).option(`custom-topic-mode`,{type:`string`,description:`Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param.`,choices:[`extended`,`strict`]}).option(`detect-entities`,{type:`boolean`,description:`Identifies and extracts key entities from content in submitted audio`}).option(`detect-language`,{type:`boolean`,description:`Identifies the dominant language spoken in submitted audio`}).option(`diarize`,{type:`boolean`,description:`Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0`}).option(`dictation`,{type:`boolean`,description:`Identify and extract key entities from content in submitted audio`}).option(`encoding`,{type:`string`,description:`Specify the expected encoding of your submitted audio`,choices:[`linear16`,`flac`,`mulaw`,`amr-nb`,`amr-wb`,`opus`,`speex`,`g729`]}).option(`endpointing`,{type:`string`,description:`Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing`}).option(`extra`,{type:`string`,description:`Arbitrary key-value pairs that are attached to the API response for usage in downstream processing`}).option(`filler-words`,{type:`boolean`,description:`Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'`}).option(`interim-results`,{type:`boolean`,description:`Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.`}).option(`keyterm`,{type:`string`,description:`Key term prompting can boost or suppress specialized terminology and brands.`}).option(`keywords`,{type:`string`,description:`Keywords can boost or suppress specialized terminology and brands.`}).option(`language`,{type:`string`,description:`The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available.`}).option(`measurements`,{type:`boolean`,description:`Spoken measurements will be converted to their corresponding abbreviations.`}).option(`mip-opt-out`,{type:`boolean`,description:`Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip.`}).option(`mode`,{type:`string`,description:`Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio`,choices:[`general`,`medical`,`finance`]}).option(`multichannel`,{type:`boolean`,description:`Transcribe each audio channel independently.`}).option(`numerals`,{type:`boolean`,description:`Numerals converts numbers from written format to numerical format.`}).option(`paragraphs`,{type:`boolean`,description:`Splits audio into paragraphs to improve transcript readability.`}).option(`profanity-filter`,{type:`boolean`,description:`Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.`}).option(`punctuate`,{type:`boolean`,description:`Add punctuation and capitalization to the transcript.`}).option(`redact`,{type:`string`,description:`Redaction removes sensitive information from your transcripts.`}).option(`replace`,{type:`string`,description:`Search for terms or phrases in submitted audio and replaces them.`}).option(`search`,{type:`string`,description:`Search for terms or phrases in submitted audio.`}).option(`sentiment`,{type:`boolean`,description:`Recognizes the sentiment throughout a transcript or text.`}).option(`smart-format`,{type:`boolean`,description:`Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.`}).option(`topics`,{type:`boolean`,description:`Detect topics throughout a transcript or text.`}).option(`utt-split`,{type:`number`,description:`Seconds to wait before detecting a pause between words in submitted audio.`}).option(`utterance-end-ms`,{type:`boolean`,description:`Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.`}).option(`utterances`,{type:`boolean`,description:`Segments speech into meaningful semantic units.`}).option(`vad-events`,{type:`boolean`,description:`Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models deepgram nova-3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/deepgram/nova-3`,pathParams:{},bodyKind:`json`,body:{...a,audioContentType:n.audioContentType,channels:n.channels,customIntent:n.customIntent,customIntentMode:n.customIntentMode,customTopic:n.customTopic,customTopicMode:n.customTopicMode,detectEntities:n.detectEntities,detectLanguage:n.detectLanguage,diarize:n.diarize,dictation:n.dictation,encoding:n.encoding,endpointing:n.endpointing,extra:n.extra,fillerWords:n.fillerWords,interimResults:n.interimResults,keyterm:n.keyterm,keywords:n.keywords,language:n.language,measurements:n.measurements,mipOptOut:n.mipOptOut,mode:n.mode,multichannel:n.multichannel,numerals:n.numerals,paragraphs:n.paragraphs,profanityFilter:n.profanityFilter,punctuate:n.punctuate,redact:n.redact,replace:n.replace,search:n.search,sentiment:n.sentiment,smartFormat:n.smartFormat,topics:n.topics,uttSplit:n.uttSplit,utteranceEndMs:n.utteranceEndMs,utterances:n.utterances,vadEvents:n.vadEvents,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nova 3`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/nova-3${t?`?`+t:``}`,{body:e})),{successLabel:`Created nova 3`});return}n.audioContentType===void 0&&(n.audioContentType=await t(`audio-content-type`,``));let g={};n.audioContentType!==void 0&&c(g,[`audio`,`contentType`],o(n.audioContentType,`audioContentType`,`text`)),n.channels!==void 0&&c(g,[`channels`],n.channels),n.customIntent!==void 0&&c(g,[`custom_intent`],o(n.customIntent,`customIntent`,`text`)),n.customIntentMode!==void 0&&c(g,[`custom_intent_mode`],o(n.customIntentMode,`customIntentMode`,`text`)),n.customTopic!==void 0&&c(g,[`custom_topic`],o(n.customTopic,`customTopic`,`text`)),n.customTopicMode!==void 0&&c(g,[`custom_topic_mode`],o(n.customTopicMode,`customTopicMode`,`text`)),n.detectEntities!==void 0&&c(g,[`detect_entities`],n.detectEntities),n.detectLanguage!==void 0&&c(g,[`detect_language`],n.detectLanguage),n.diarize!==void 0&&c(g,[`diarize`],n.diarize),n.dictation!==void 0&&c(g,[`dictation`],n.dictation),n.encoding!==void 0&&c(g,[`encoding`],o(n.encoding,`encoding`,`text`)),n.endpointing!==void 0&&c(g,[`endpointing`],o(n.endpointing,`endpointing`,`text`)),n.extra!==void 0&&c(g,[`extra`],o(n.extra,`extra`,`text`)),n.fillerWords!==void 0&&c(g,[`filler_words`],n.fillerWords),n.interimResults!==void 0&&c(g,[`interim_results`],n.interimResults),n.keyterm!==void 0&&c(g,[`keyterm`],o(n.keyterm,`keyterm`,`text`)),n.keywords!==void 0&&c(g,[`keywords`],o(n.keywords,`keywords`,`text`)),n.language!==void 0&&c(g,[`language`],o(n.language,`language`,`text`)),n.measurements!==void 0&&c(g,[`measurements`],n.measurements),n.mipOptOut!==void 0&&c(g,[`mip_opt_out`],n.mipOptOut),n.mode!==void 0&&c(g,[`mode`],o(n.mode,`mode`,`text`)),n.multichannel!==void 0&&c(g,[`multichannel`],n.multichannel),n.numerals!==void 0&&c(g,[`numerals`],n.numerals),n.paragraphs!==void 0&&c(g,[`paragraphs`],n.paragraphs),n.profanityFilter!==void 0&&c(g,[`profanity_filter`],n.profanityFilter),n.punctuate!==void 0&&c(g,[`punctuate`],n.punctuate),n.redact!==void 0&&c(g,[`redact`],o(n.redact,`redact`,`text`)),n.replace!==void 0&&c(g,[`replace`],o(n.replace,`replace`,`text`)),n.search!==void 0&&c(g,[`search`],o(n.search,`search`,`text`)),n.sentiment!==void 0&&c(g,[`sentiment`],n.sentiment),n.smartFormat!==void 0&&c(g,[`smart_format`],n.smartFormat),n.topics!==void 0&&c(g,[`topics`],n.topics),n.uttSplit!==void 0&&c(g,[`utt_split`],n.uttSplit),n.utteranceEndMs!==void 0&&c(g,[`utterance_end_ms`],n.utteranceEndMs),n.utterances!==void 0&&c(g,[`utterances`],n.utterances),n.vadEvents!==void 0&&c(g,[`vad_events`],n.vadEvents);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nova 3`,async()=>m.post(`/accounts/${h}/ai/run/@cf/deepgram/nova-3${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created nova 3`})}},Fe={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3 model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading nova 3`,async()=>t.ai.models.deepgram.nova3.get(n)),{successLabel:`Loaded nova 3`})}},Ie={command:`nova-3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pe).command(Fe).demandCommand(1),handler:()=>{}},Le={command:`deepgram`,describe:`Operations for models.deepgram`,builder:e=>e.command(Ee).command(ge).command(pe).command(we).command(ye).command(Se).command(ke).command(Ie).command(je).command(Ne).demandCommand(1),handler:()=>{}},Re={command:`create`,describe:`Runs inference on the @cf/deepseek-ai/deepseek-math-7b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models deepseek-ai deepseek-math-7b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek math 7b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created deepseek math 7b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek math 7b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created deepseek math 7b instruct`})}},ze={command:`deepseek-math-7b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Re).demandCommand(1),handler:()=>{}},Be={command:`create`,describe:`Runs inference on the @cf/deepseek-ai/deepseek-r1-distill-qwen-32b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models deepseek-ai deepseek-r1-distill-qwen-32b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek r1 distill qwen 32b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b${r?`?`+r:``}`,{body:e})),{successLabel:`Created deepseek r1 distill qwen 32b`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek r1 distill qwen 32b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created deepseek r1 distill qwen 32b`})}},Ve={command:`deepseek-r1-distill-qwen-32b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Be).demandCommand(1),handler:()=>{}},He={command:`deepseek-ai`,describe:`Operations for models.deepseek-ai`,builder:e=>e.command(ze).command(Ve).demandCommand(1),handler:()=>{}},Ue={command:`create`,describe:`Runs inference on the @cf/defog/sqlcoder-7b-2 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models defog sqlcoder-7b-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/defog/sqlcoder-7b-2`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating sqlcoder 7b 2`,async()=>a.post(`/accounts/${m}/ai/run/@cf/defog/sqlcoder-7b-2${r?`?`+r:``}`,{body:e})),{successLabel:`Created sqlcoder 7b 2`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating sqlcoder 7b 2`,async()=>a.post(`/accounts/${m}/ai/run/@cf/defog/sqlcoder-7b-2${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created sqlcoder 7b 2`})}},We={command:`sqlcoder-7b-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ue).demandCommand(1),handler:()=>{}},Ge={command:`defog`,describe:`Operations for models.defog`,builder:e=>e.command(We).demandCommand(1),handler:()=>{}},Ke={command:`create`,describe:`Runs inference on the @cf/facebook/bart-large-cnn model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`input-text`,{type:`string`,description:`The text that you want the model to summarize`}).option(`max-length`,{type:`number`,description:`The maximum length of the generated summary in tokens`,default:1024}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models facebook bart-large-cnn create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/facebook/bart-large-cnn`,pathParams:{},bodyKind:`json`,body:{...a,inputText:n.inputText,maxLength:n.maxLength,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bart large cnn`,async()=>m.post(`/accounts/${h}/ai/run/@cf/facebook/bart-large-cnn${t?`?`+t:``}`,{body:e})),{successLabel:`Created bart large cnn`});return}n.inputText===void 0&&(n.inputText=await t(`input-text`,`The text that you want the model to summarize`));let g={};n.inputText!==void 0&&c(g,[`input_text`],o(n.inputText,`inputText`,`text`)),n.maxLength!==void 0&&c(g,[`max_length`],n.maxLength);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating bart large cnn`,async()=>m.post(`/accounts/${h}/ai/run/@cf/facebook/bart-large-cnn${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created bart large cnn`})}},qe={command:`bart-large-cnn`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ke).demandCommand(1),handler:()=>{}},Je={command:`create`,describe:`Runs inference on the @cf/facebook/nonomni-bart-large-cnn model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`input-text`,{type:`string`,description:`The text that you want the model to summarize`}).option(`max-length`,{type:`number`,description:`The maximum length of the generated summary in tokens`,default:1024}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models facebook nonomni-bart-large-cnn create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/facebook/nonomni-bart-large-cnn`,pathParams:{},bodyKind:`json`,body:{...a,inputText:n.inputText,maxLength:n.maxLength,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bart large cnn`,async()=>m.post(`/accounts/${h}/ai/run/@cf/facebook/nonomni-bart-large-cnn${t?`?`+t:``}`,{body:e})),{successLabel:`Created nonomni bart large cnn`});return}n.inputText===void 0&&(n.inputText=await t(`input-text`,`The text that you want the model to summarize`));let g={};n.inputText!==void 0&&c(g,[`input_text`],o(n.inputText,`inputText`,`text`)),n.maxLength!==void 0&&c(g,[`max_length`],n.maxLength);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni bart large cnn`,async()=>m.post(`/accounts/${h}/ai/run/@cf/facebook/nonomni-bart-large-cnn${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created nonomni bart large cnn`})}},Ye={command:`nonomni-bart-large-cnn`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Je).demandCommand(1),handler:()=>{}},Xe={command:`create`,describe:`Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models facebook nonomni-detr-resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/facebook/nonomni-detr-resnet-50`,pathParams:{},bodyKind:`octet-stream`,body:{...n,body:t.body,file:t.file},validation:`passed`});return}let a=await i(t),c=t.local?f:await r(a);if(t.accountId=c,t.file){let{readFileSync:e}=await import(`node:fs`),{resolve:n}=await import(`node:path`),r=e(n(t.file));u(await p(`Creating nonomni detr resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/facebook/nonomni-detr-resnet-50`,{body:r,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created nonomni detr resnet 50`});return}if(t.body){let e=o(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni detr resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/facebook/nonomni-detr-resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created nonomni detr resnet 50`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Ze={command:`nonomni-detr-resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Xe).demandCommand(1),handler:()=>{}},Qe={command:`facebook`,describe:`Operations for models.facebook`,builder:e=>e.command(qe).command(Ye).command(Ze).demandCommand(1),handler:()=>{}},$e={command:`create`,describe:`Runs inference on the @cf/fblgit/una-cybertron-7b-v2-bf16 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models fblgit una-cybertron-7b-v2-bf16 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating una cybertron 7b v2 bf16`,async()=>a.post(`/accounts/${m}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16${r?`?`+r:``}`,{body:e})),{successLabel:`Created una cybertron 7b v2 bf16`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating una cybertron 7b v2 bf16`,async()=>a.post(`/accounts/${m}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created una cybertron 7b v2 bf16`})}},et={command:`una-cybertron-7b-v2-bf16`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command($e).demandCommand(1),handler:()=>{}},tt={command:`fblgit`,describe:`Operations for models.fblgit`,builder:e=>e.command(et).demandCommand(1),handler:()=>{}},nt={command:`create`,describe:`Runs inference on the @cf/google/embeddinggemma-300m model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google embeddinggemma-300m create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/google/embeddinggemma-300m`,pathParams:{},bodyKind:`json`,body:{...n,body:t.body},validation:`passed`});return}let a=await i(t),o=t.local?f:await r(a);if(t.accountId=o,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating embeddinggemma 300m`,async()=>a.post(`/accounts/${o}/ai/run/@cf/google/embeddinggemma-300m${r?`?`+r:``}`,{body:e})),{successLabel:`Created embeddinggemma 300m`});return}u(await p(`Creating embeddinggemma 300m`,async()=>a.ai.models.google.embeddinggemma300m.create(o,Object.keys(n).length>0?n:void 0)),{successLabel:`Created embeddinggemma 300m`})}},rt={command:`embeddinggemma-300m`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(nt).demandCommand(1),handler:()=>{}},it={command:`create`,describe:`Runs inference on the @cf/google/gemma-2b-it-lora model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google gemma-2b-it-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/google/gemma-2b-it-lora`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 2b it lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-2b-it-lora${r?`?`+r:``}`,{body:e})),{successLabel:`Created gemma 2b it lora`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 2b it lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-2b-it-lora${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gemma 2b it lora`})}},at={command:`gemma-2b-it-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(it).demandCommand(1),handler:()=>{}},ot={command:`create`,describe:`Runs inference on the @cf/google/gemma-3-12b-it model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google gemma-3-12b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/google/gemma-3-12b-it`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 3 12b it`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-3-12b-it${r?`?`+r:``}`,{body:e})),{successLabel:`Created gemma 3 12b it`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 3 12b it`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-3-12b-it${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gemma 3 12b it`})}},st={command:`gemma-3-12b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ot).demandCommand(1),handler:()=>{}},ct={command:`create`,describe:`Runs inference on the @cf/google/gemma-7b-it-lora model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google gemma-7b-it-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/google/gemma-7b-it-lora`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 7b it lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-7b-it-lora${r?`?`+r:``}`,{body:e})),{successLabel:`Created gemma 7b it lora`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 7b it lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/google/gemma-7b-it-lora${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gemma 7b it lora`})}},lt={command:`gemma-7b-it-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ct).demandCommand(1),handler:()=>{}},ut={command:`create`,describe:`Runs inference on the @hf/google/gemma-7b-it model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google gemma-7b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/google/gemma-7b-it`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 7b it`,async()=>a.post(`/accounts/${m}/ai/run/@hf/google/gemma-7b-it${r?`?`+r:``}`,{body:e})),{successLabel:`Created gemma 7b it`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gemma 7b it`,async()=>a.post(`/accounts/${m}/ai/run/@hf/google/gemma-7b-it${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gemma 7b it`})}},dt={command:`gemma-7b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ut).demandCommand(1),handler:()=>{}},ft={command:`create`,describe:`Runs inference on the @cf/google/nonomni-embeddinggemma-300m model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models google nonomni-embeddinggemma-300m create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/google/nonomni-embeddinggemma-300m`,pathParams:{},bodyKind:`json`,body:{...n,body:t.body},validation:`passed`});return}let a=await i(t),o=t.local?f:await r(a);if(t.accountId=o,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni embeddinggemma 300m`,async()=>a.post(`/accounts/${o}/ai/run/@cf/google/nonomni-embeddinggemma-300m${r?`?`+r:``}`,{body:e})),{successLabel:`Created nonomni embeddinggemma 300m`});return}u(await p(`Creating nonomni embeddinggemma 300m`,async()=>a.ai.models.google.nonomniEmbeddinggemma300m.create(o,Object.keys(n).length>0?n:void 0)),{successLabel:`Created nonomni embeddinggemma 300m`})}},pt={command:`nonomni-embeddinggemma-300m`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ft).demandCommand(1),handler:()=>{}},mt={command:`google`,describe:`Operations for models.google`,builder:e=>e.command(rt).command(at).command(st).command(dt).command(lt).command(pt).demandCommand(1),handler:()=>{}},ht={command:`create`,describe:`Runs inference on the @cf/huggingface/distilbert-sst-2-int8 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`text`,{type:`string`,description:`The text that you want to classify`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models huggingface distilbert-sst-2-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/huggingface/distilbert-sst-2-int8`,pathParams:{},bodyKind:`json`,body:{...a,text:n.text,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating distilbert sst 2 int8`,async()=>m.post(`/accounts/${h}/ai/run/@cf/huggingface/distilbert-sst-2-int8${t?`?`+t:``}`,{body:e})),{successLabel:`Created distilbert sst 2 int8`});return}n.text===void 0&&(n.text=await t(`text`,`The text that you want to classify`));let g={};n.text!==void 0&&c(g,[`text`],o(n.text,`text`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating distilbert sst 2 int8`,async()=>m.post(`/accounts/${h}/ai/run/@cf/huggingface/distilbert-sst-2-int8${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created distilbert sst 2 int8`})}},gt={command:`distilbert-sst-2-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ht).demandCommand(1),handler:()=>{}},_t={command:`create`,describe:`Runs inference on the @cf/huggingface/nonomni-distilbert-sst-2-int8 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`text`,{type:`string`,description:`The text that you want to classify`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models huggingface nonomni-distilbert-sst-2-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8`,pathParams:{},bodyKind:`json`,body:{...a,text:n.text,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni distilbert sst 2 int8`,async()=>m.post(`/accounts/${h}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8${t?`?`+t:``}`,{body:e})),{successLabel:`Created nonomni distilbert sst 2 int8`});return}n.text===void 0&&(n.text=await t(`text`,`The text that you want to classify`));let g={};n.text!==void 0&&c(g,[`text`],o(n.text,`text`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni distilbert sst 2 int8`,async()=>m.post(`/accounts/${h}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created nonomni distilbert sst 2 int8`})}},vt={command:`nonomni-distilbert-sst-2-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_t).demandCommand(1),handler:()=>{}},yt={command:`huggingface`,describe:`Operations for models.huggingface`,builder:e=>e.command(gt).command(vt).demandCommand(1),handler:()=>{}},bt={command:`create`,describe:`Runs inference on the @cf/ibm-granite/granite-4.0-h-micro model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models ibm granite-granite-4-0-h-micro create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/ibm-granite/granite-4.0-h-micro`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating granite granite 4 0 h micro`,async()=>a.post(`/accounts/${m}/ai/run/@cf/ibm-granite/granite-4.0-h-micro${r?`?`+r:``}`,{body:e})),{successLabel:`Created granite granite 4 0 h micro`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating granite granite 4 0 h micro`,async()=>a.post(`/accounts/${m}/ai/run/@cf/ibm-granite/granite-4.0-h-micro${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created granite granite 4 0 h micro`})}},xt={command:`granite-granite-4-0-h-micro`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(bt).demandCommand(1),handler:()=>{}},St={command:`ibm`,describe:`Operations for models.ibm`,builder:e=>e.command(xt).demandCommand(1),handler:()=>{}},Ct={command:`create`,describe:`Runs inference on the @cf/leonardo/lucid-origin model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:4.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`,default:1120}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`,default:1120}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models leonardo lucid-origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/leonardo/lucid-origin`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,steps:n.steps,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating lucid origin`,async()=>m.post(`/accounts/${h}/ai/run/@cf/leonardo/lucid-origin${t?`?`+t:``}`,{body:e})),{successLabel:`Created lucid origin`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.steps!==void 0&&c(g,[`steps`],n.steps),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating lucid origin`,async()=>m.post(`/accounts/${h}/ai/run/@cf/leonardo/lucid-origin${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created lucid origin`})}},wt={command:`lucid-origin`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ct).demandCommand(1),handler:()=>{}},Tt={command:`create`,describe:`Runs inference on the @cf/leonardo/phoenix-1.0 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:2}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`,default:1024}).option(`negative-prompt`,{type:`string`,description:`Specify what to exclude from the generated images`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:25}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`,default:1024}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models leonardo phoenix-1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/leonardo/phoenix-1.0`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating phoenix 1 0`,async()=>m.post(`/accounts/${h}/ai/run/@cf/leonardo/phoenix-1.0${t?`?`+t:``}`,{body:e})),{successLabel:`Created phoenix 1 0`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating phoenix 1 0`,async()=>m.post(`/accounts/${h}/ai/run/@cf/leonardo/phoenix-1.0${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created phoenix 1 0`})}},Et={command:`phoenix-1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Tt).demandCommand(1),handler:()=>{}},Dt={command:`leonardo`,describe:`Operations for models.leonardo`,builder:e=>e.command(wt).command(Et).demandCommand(1),handler:()=>{}},Ot={command:`list`,describe:`Searches Workers AI models by name or description.`,builder:e=>e.option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`task`,{type:`string`,description:`Filter by Task Name`}).option(`author`,{type:`string`,description:`Filter by Author`}).option(`source`,{type:`number`,description:`Filter by Source Id`}).option(`hide-experimental`,{type:`boolean`,description:`Filter to hide experimental models`,default:!1}).option(`search`,{type:`string`,description:`Search`}),handler:async e=>{let t={};e.perPage!==void 0&&(t.per_page=e.perPage),e.page!==void 0&&(t.page=e.page),e.task!==void 0&&(t.task=e.task),e.author!==void 0&&(t.author=e.author),e.source!==void 0&&(t.source=e.source),e.hideExperimental!==void 0&&(t.hide_experimental=e.hideExperimental),e.search!==void 0&&(t.search=e.search);let n=await i(e),a=e.local?f:await r(n);e.accountId=a,u(await p(`Loading models`,async()=>n.ai.models.list(a,Object.keys(t).length>0?t:void 0)),{successLabel:`Loaded models`})}},kt={command:`create`,describe:`Runs inference on the @cf/lykon/dreamshaper-8-lcm model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models lykon dreamshaper-8-lcm create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/lykon/dreamshaper-8-lcm`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,image:n.image,imageB64:n.imageB64,mask:n.mask,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,strength:n.strength,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating dreamshaper 8 lcm`,async()=>m.post(`/accounts/${h}/ai/run/@cf/lykon/dreamshaper-8-lcm${t?`?`+t:``}`,{body:e})),{successLabel:`Created dreamshaper 8 lcm`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.image!==void 0&&c(g,[`image`],n.image),n.imageB64!==void 0&&c(g,[`image_b64`],o(n.imageB64,`imageB64`,`text`)),n.mask!==void 0&&c(g,[`mask`],n.mask),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.strength!==void 0&&c(g,[`strength`],n.strength),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating dreamshaper 8 lcm`,async()=>m.post(`/accounts/${h}/ai/run/@cf/lykon/dreamshaper-8-lcm${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created dreamshaper 8 lcm`})}},At={command:`dreamshaper-8-lcm`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(kt).demandCommand(1),handler:()=>{}},jt={command:`lykon`,describe:`Operations for models.lykon`,builder:e=>e.command(At).demandCommand(1),handler:()=>{}},Mt={command:`create`,describe:`Runs inference on the @cf/meta/llama-2-7b-chat-fp16 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-2-7b-chat-fp16 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-2-7b-chat-fp16`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 7b chat fp16`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-2-7b-chat-fp16${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 2 7b chat fp16`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 7b chat fp16`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-2-7b-chat-fp16${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 2 7b chat fp16`})}},Nt={command:`llama-2-7b-chat-fp16`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Mt).demandCommand(1),handler:()=>{}},Pt={command:`create`,describe:`Runs inference on the @cf/meta/llama-2-7b-chat-int8 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-2-7b-chat-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-2-7b-chat-int8`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 7b chat int8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-2-7b-chat-int8${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 2 7b chat int8`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 7b chat int8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-2-7b-chat-int8${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 2 7b chat int8`})}},Ft={command:`llama-2-7b-chat-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pt).demandCommand(1),handler:()=>{}},It={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-1-8b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 1 8b instruct awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 1 8b instruct awq`})}},Lt={command:`llama-3-1-8b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(It).demandCommand(1),handler:()=>{}},Rt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8-fast model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-1-8b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 1 8b instruct fp8 fast`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 1 8b instruct fp8 fast`})}},zt={command:`llama-3-1-8b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Rt).demandCommand(1),handler:()=>{}},Bt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-1-8b-instruct-fp8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct fp8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 1 8b instruct fp8`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 8b instruct fp8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 1 8b instruct fp8`})}},Vt={command:`llama-3-1-8b-instruct-fp8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Bt).demandCommand(1),handler:()=>{}},Ht={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-70b-instruct-fp8-fast model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-1-70b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 70b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 1 70b instruct fp8 fast`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 1 70b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 1 70b instruct fp8 fast`})}},Ut={command:`llama-3-1-70b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ht).demandCommand(1),handler:()=>{}},Wt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-1b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-2-1b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.2-1b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 1b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-1b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 2 1b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 1b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-1b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 2 1b instruct`})}},Gt={command:`llama-3-2-1b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Wt).demandCommand(1),handler:()=>{}},Kt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-3b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-2-3b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.2-3b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 3b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-3b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 2 3b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 3b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-3b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 2 3b instruct`})}},qt={command:`llama-3-2-3b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Kt).demandCommand(1),handler:()=>{}},Jt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-11b-vision-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-2-11b-vision-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 11b vision instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 2 11b vision instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 2 11b vision instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 2 11b vision instruct`})}},Yt={command:`llama-3-2-11b-vision-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Jt).demandCommand(1),handler:()=>{}},Xt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.3-70b-instruct-fp8-fast model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-3-70b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 3 70b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 3 70b instruct fp8 fast`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 3 70b instruct fp8 fast`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 3 70b instruct fp8 fast`})}},Zt={command:`llama-3-3-70b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Xt).demandCommand(1),handler:()=>{}},Qt={command:`create`,describe:`Runs inference on the @cf/meta/llama-3-8b-instruct-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-8b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3-8b-instruct-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 8b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3-8b-instruct-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 8b instruct awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 8b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3-8b-instruct-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 8b instruct awq`})}},$t={command:`llama-3-8b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Qt).demandCommand(1),handler:()=>{}},en={command:`create`,describe:`Runs inference on the @cf/meta/llama-3-8b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-3-8b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-3-8b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 8b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3-8b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 3 8b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 3 8b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-3-8b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 3 8b instruct`})}},tn={command:`llama-3-8b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(en).demandCommand(1),handler:()=>{}},nn={command:`create`,describe:`Runs inference on the @cf/meta/llama-4-scout-17b-16e-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.15}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-4-scout-17b-16e-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 4 scout 17b 16e instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 4 scout 17b 16e instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 4 scout 17b 16e instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 4 scout 17b 16e instruct`})}},rn={command:`llama-4-scout-17b-16e-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(nn).demandCommand(1),handler:()=>{}},an={command:`create`,describe:`Runs inference on the @cf/meta/llama-guard-3-8b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`response-format-type`,{type:`string`,description:`Set to json_object to process and output generated text as JSON.`}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-guard-3-8b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/llama-guard-3-8b`,pathParams:{},bodyKind:`json`,body:{...n,maxTokens:t.maxTokens,responseFormatType:t.responseFormatType,temperature:t.temperature,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama guard 3 8b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-guard-3-8b${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama guard 3 8b`});return}let h={};t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.temperature!==void 0&&c(h,[`temperature`],t.temperature);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama guard 3 8b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/llama-guard-3-8b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama guard 3 8b`})}},on={command:`llama-guard-3-8b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(an).demandCommand(1),handler:()=>{}},sn={command:`create`,describe:`Runs inference on the @cf/meta-llama/llama-2-7b-chat-hf-lora model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta llama-llama-2-7b-chat-hf-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama llama 2 7b chat hf lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama llama 2 7b chat hf lora`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama llama 2 7b chat hf lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama llama 2 7b chat hf lora`})}},cn={command:`llama-llama-2-7b-chat-hf-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(sn).demandCommand(1),handler:()=>{}},ln={command:`create`,describe:`Runs inference on the @cf/meta/m2m100-1.2b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`source-lang`,{type:`string`,description:`The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified`,default:`en`}).option(`target-lang`,{type:`string`,description:`The language code to translate the text into (e.g., 'es' for Spanish)`}).option(`text`,{type:`string`,description:`The text to be translated`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).implies(`target-lang`,[`text`]).implies(`text`,[`target-lang`]),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models meta m2m100-1-2b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/meta/m2m100-1.2b`,pathParams:{},bodyKind:`json`,body:{...n,sourceLang:t.sourceLang,targetLang:t.targetLang,text:t.text,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating m2m100 1 2b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/m2m100-1.2b${r?`?`+r:``}`,{body:e})),{successLabel:`Created m2m100 1 2b`});return}let h={};t.sourceLang!==void 0&&c(h,[`source_lang`],o(t.sourceLang,`sourceLang`,`text`)),t.targetLang!==void 0&&c(h,[`target_lang`],o(t.targetLang,`targetLang`,`text`)),t.text!==void 0&&c(h,[`text`],o(t.text,`text`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating m2m100 1 2b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/meta/m2m100-1.2b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created m2m100 1 2b`})}},un={command:`m2m100-1-2b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ln).demandCommand(1),handler:()=>{}},dn={command:`meta`,describe:`Operations for models.meta`,builder:e=>e.command(Nt).command(Ft).command(Ut).command(Lt).command(Vt).command(zt).command(Yt).command(Gt).command(qt).command(Zt).command(tn).command($t).command(rn).command(on).command(cn).command(un).demandCommand(1),handler:()=>{}},fn={command:`create`,describe:`Runs inference on the @cf/microsoft/nonomni-resnet-50 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models microsoft nonomni-resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/microsoft/nonomni-resnet-50`,pathParams:{},bodyKind:`octet-stream`,body:{...n,body:t.body,file:t.file},validation:`passed`});return}let a=await i(t),c=t.local?f:await r(a);if(t.accountId=c,t.file){let{readFileSync:e}=await import(`node:fs`),{resolve:n}=await import(`node:path`),r=e(n(t.file));u(await p(`Creating nonomni resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/microsoft/nonomni-resnet-50`,{body:r,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created nonomni resnet 50`});return}if(t.body){let e=o(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nonomni resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/microsoft/nonomni-resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created nonomni resnet 50`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},pn={command:`nonomni-resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(fn).demandCommand(1),handler:()=>{}},mn={command:`create`,describe:`Runs inference on the @cf/microsoft/phi-2 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models microsoft phi-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/microsoft/phi-2`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating phi 2`,async()=>a.post(`/accounts/${m}/ai/run/@cf/microsoft/phi-2${r?`?`+r:``}`,{body:e})),{successLabel:`Created phi 2`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating phi 2`,async()=>a.post(`/accounts/${m}/ai/run/@cf/microsoft/phi-2${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created phi 2`})}},hn={command:`phi-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mn).demandCommand(1),handler:()=>{}},gn={command:`create`,describe:`Runs inference on the @cf/microsoft/resnet-50 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models microsoft resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/microsoft/resnet-50`,pathParams:{},bodyKind:`octet-stream`,body:{...n,body:t.body,file:t.file},validation:`passed`});return}let a=await i(t),c=t.local?f:await r(a);if(t.accountId=c,t.file){let{readFileSync:e}=await import(`node:fs`),{resolve:n}=await import(`node:path`),r=e(n(t.file));u(await p(`Creating resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/microsoft/resnet-50`,{body:r,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created resnet 50`});return}if(t.body){let e=o(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating resnet 50`,async()=>a.post(`/accounts/${c}/ai/run/@cf/microsoft/resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created resnet 50`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},_n={command:`resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(gn).demandCommand(1),handler:()=>{}},vn={command:`microsoft`,describe:`Operations for models.microsoft`,builder:e=>e.command(pn).command(hn).command(_n).demandCommand(1),handler:()=>{}},yn={command:`create`,describe:`Runs inference on the @cf/mistral/mistral-7b-instruct-v0.1 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models mistral mistral-7b-instruct-v0-1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 1`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1${r?`?`+r:``}`,{body:e})),{successLabel:`Created mistral 7b instruct v0 1`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 1`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created mistral 7b instruct v0 1`})}},bn={command:`mistral-7b-instruct-v0-1`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(yn).demandCommand(1),handler:()=>{}},xn={command:`create`,describe:`Runs inference on the @cf/mistral/mistral-7b-instruct-v0.2-lora model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models mistral mistral-7b-instruct-v0-2-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 2 lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora${r?`?`+r:``}`,{body:e})),{successLabel:`Created mistral 7b instruct v0 2 lora`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 2 lora`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created mistral 7b instruct v0 2 lora`})}},Sn={command:`mistral-7b-instruct-v0-2-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(xn).demandCommand(1),handler:()=>{}},Cn={command:`create`,describe:`Runs inference on the @hf/mistral/mistral-7b-instruct-v0.2 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models mistral mistral-7b-instruct-v0-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 2`,async()=>a.post(`/accounts/${m}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2${r?`?`+r:``}`,{body:e})),{successLabel:`Created mistral 7b instruct v0 2`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 2`,async()=>a.post(`/accounts/${m}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created mistral 7b instruct v0 2`})}},wn={command:`mistral-7b-instruct-v0-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Cn).demandCommand(1),handler:()=>{}},Tn={command:`mistral`,describe:`Operations for models.mistral`,builder:e=>e.command(bn).command(wn).command(Sn).demandCommand(1),handler:()=>{}},En={command:`create`,describe:`Runs inference on the @cf/mistralai/mistral-small-3.1-24b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.15}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models mistralai mistral-small-3-1-24b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral small 3 1 24b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created mistral small 3 1 24b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral small 3 1 24b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created mistral small 3 1 24b instruct`})}},Dn={command:`mistral-small-3-1-24b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(En).demandCommand(1),handler:()=>{}},On={command:`mistralai`,describe:`Operations for models.mistralai`,builder:e=>e.command(Dn).demandCommand(1),handler:()=>{}},kn={command:`create`,describe:`Runs inference on the @cf/moonshotai/kimi-k2.5 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models moonshotai kimi-k2-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/moonshotai/kimi-k2.5`,pathParams:{},bodyKind:`json`,body:{...n,body:t.body},validation:`passed`});return}let a=await i(t),o=t.local?f:await r(a);if(t.accountId=o,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating kimi k2 5`,async()=>a.post(`/accounts/${o}/ai/run/@cf/moonshotai/kimi-k2.5${r?`?`+r:``}`,{body:e})),{successLabel:`Created kimi k2 5`});return}u(await p(`Creating kimi k2 5`,async()=>a.ai.models.moonshotai.kimiK25.create(o,Object.keys(n).length>0?n:void 0)),{successLabel:`Created kimi k2 5`})}},An={command:`kimi-k2-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(kn).demandCommand(1),handler:()=>{}},jn={command:`moonshotai`,describe:`Operations for models.moonshotai`,builder:e=>e.command(An).demandCommand(1),handler:()=>{}},Mn={command:`create`,describe:`Runs inference on the @cf/myshell-ai/melotts model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`lang`,{type:`string`,description:`The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified`,default:`en`}).option(`prompt`,{type:`string`,description:`A text description of the audio you want to generate`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models myshell-ai melotts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/myshell-ai/melotts`,pathParams:{},bodyKind:`json`,body:{...a,lang:n.lang,prompt:n.prompt,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating melott`,async()=>m.post(`/accounts/${h}/ai/run/@cf/myshell-ai/melotts${t?`?`+t:``}`,{body:e})),{successLabel:`Created melott`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the audio you want to generate`));let g={};n.lang!==void 0&&c(g,[`lang`],o(n.lang,`lang`,`text`)),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`));let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating melott`,async()=>m.post(`/accounts/${h}/ai/run/@cf/myshell-ai/melotts${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created melott`})}},Nn={command:`melotts`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Mn).demandCommand(1),handler:()=>{}},Pn={command:`myshell-ai`,describe:`Operations for models.myshell-ai`,builder:e=>e.command(Nn).demandCommand(1),handler:()=>{}},Fn={command:`create`,describe:`Runs inference on the @hf/nexusflow/starling-lm-7b-beta model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models nexusflow starling-lm-7b-beta create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/nexusflow/starling-lm-7b-beta`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating starling lm 7b beta`,async()=>a.post(`/accounts/${m}/ai/run/@hf/nexusflow/starling-lm-7b-beta${r?`?`+r:``}`,{body:e})),{successLabel:`Created starling lm 7b beta`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating starling lm 7b beta`,async()=>a.post(`/accounts/${m}/ai/run/@hf/nexusflow/starling-lm-7b-beta${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created starling lm 7b beta`})}},In={command:`starling-lm-7b-beta`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Fn).demandCommand(1),handler:()=>{}},Ln={command:`nexusflow`,describe:`Operations for models.nexusflow`,builder:e=>e.command(In).demandCommand(1),handler:()=>{}},Rn={command:`create`,describe:`Runs inference on the @hf/nousresearch/hermes-2-pro-mistral-7b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models nousresearch hermes-2-pro-mistral-7b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating hermes 2 pro mistral 7b`,async()=>a.post(`/accounts/${m}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b${r?`?`+r:``}`,{body:e})),{successLabel:`Created hermes 2 pro mistral 7b`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating hermes 2 pro mistral 7b`,async()=>a.post(`/accounts/${m}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created hermes 2 pro mistral 7b`})}},zn={command:`hermes-2-pro-mistral-7b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Rn).demandCommand(1),handler:()=>{}},Bn={command:`nousresearch`,describe:`Operations for models.nousresearch`,builder:e=>e.command(zn).demandCommand(1),handler:()=>{}},Vn={command:`create`,describe:`Runs inference on the @cf/nvidia/nemotron-3-120b-a12b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`chat-template-kwargs-clear-thinking`,{type:`boolean`,description:`If false, preserves reasoning context between turns.`,default:!1}).option(`chat-template-kwargs-enable-thinking`,{type:`boolean`,description:`Whether to enable reasoning, enabled by default.`,default:!0}).option(`frequency-penalty`,{type:`number`,description:`The frequency_penalty field`}).option(`logprobs`,{type:`boolean`,description:`The logprobs field`}).option(`max-completion-tokens`,{type:`number`,description:`The max_completion_tokens field`}).option(`max-tokens`,{type:`number`,description:`The max_tokens field`}).option(`modalities`,{type:`string`,array:!0,description:`The modalities field`}).option(`model`,{type:`string`,description:`ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc').`}).option(`n`,{type:`number`,description:`The n field`}).option(`parallel-tool-calls`,{type:`boolean`,description:`Whether to enable parallel function calling during tool use.`,default:!0}).option(`presence-penalty`,{type:`number`,description:`The presence_penalty field`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`reasoning-effort`,{type:`string`,description:`The reasoning_effort field`,choices:[`low`,`medium`,`high`]}).option(`seed`,{type:`number`,description:`The seed field`}).option(`service-tier`,{type:`string`,description:`The service_tier field`,choices:[`auto`,`default`,`flex`,`scale`,`priority`]}).option(`store`,{type:`boolean`,description:`The store field`}).option(`stream`,{type:`boolean`,description:`The stream field`}).option(`temperature`,{type:`number`,description:`The temperature field`}).option(`top-logprobs`,{type:`number`,description:`The top_logprobs field`}).option(`top-p`,{type:`number`,description:`The top_p field`}).option(`user`,{type:`string`,description:`A unique identifier representing your end-user, for abuse monitoring.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models nvidia nemotron-3-120b-a12b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/nvidia/nemotron-3-120b-a12b`,pathParams:{},bodyKind:`json`,body:{...n,chatTemplateKwargsClearThinking:t.chatTemplateKwargsClearThinking,chatTemplateKwargsEnableThinking:t.chatTemplateKwargsEnableThinking,frequencyPenalty:t.frequencyPenalty,logprobs:t.logprobs,maxCompletionTokens:t.maxCompletionTokens,maxTokens:t.maxTokens,modalities:t.modalities,model:t.model,n:t.n,parallelToolCalls:t.parallelToolCalls,presencePenalty:t.presencePenalty,prompt:t.prompt,reasoningEffort:t.reasoningEffort,seed:t.seed,serviceTier:t.serviceTier,store:t.store,stream:t.stream,temperature:t.temperature,topLogprobs:t.topLogprobs,topP:t.topP,user:t.user,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nemotron 3 120b a12b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/nvidia/nemotron-3-120b-a12b${r?`?`+r:``}`,{body:e})),{successLabel:`Created nemotron 3 120b a12b`});return}let h={};t.chatTemplateKwargsClearThinking!==void 0&&c(h,[`chat_template_kwargs`,`clear_thinking`],t.chatTemplateKwargsClearThinking),t.chatTemplateKwargsEnableThinking!==void 0&&c(h,[`chat_template_kwargs`,`enable_thinking`],t.chatTemplateKwargsEnableThinking),t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.logprobs!==void 0&&c(h,[`logprobs`],t.logprobs),t.maxCompletionTokens!==void 0&&c(h,[`max_completion_tokens`],t.maxCompletionTokens),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.modalities!==void 0&&c(h,[`modalities`],t.modalities),t.model!==void 0&&c(h,[`model`],o(t.model,`model`,`text`)),t.n!==void 0&&c(h,[`n`],t.n),t.parallelToolCalls!==void 0&&c(h,[`parallel_tool_calls`],t.parallelToolCalls),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.reasoningEffort!==void 0&&c(h,[`reasoning_effort`],o(t.reasoningEffort,`reasoningEffort`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.serviceTier!==void 0&&c(h,[`service_tier`],o(t.serviceTier,`serviceTier`,`text`)),t.store!==void 0&&c(h,[`store`],t.store),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topLogprobs!==void 0&&c(h,[`top_logprobs`],t.topLogprobs),t.topP!==void 0&&c(h,[`top_p`],t.topP),t.user!==void 0&&c(h,[`user`],o(t.user,`user`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating nemotron 3 120b a12b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/nvidia/nemotron-3-120b-a12b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created nemotron 3 120b a12b`})}},Hn={command:`nemotron-3-120b-a12b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Vn).demandCommand(1),handler:()=>{}},Un={command:`nvidia`,describe:`Operations for models.nvidia`,builder:e=>e.command(Hn).demandCommand(1),handler:()=>{}},Wn={command:`create`,describe:`Runs inference on the @cf/openai/gpt-oss-20b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`reasoning-effort`,{type:`string`,description:`Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.`,choices:[`low`,`medium`,`high`]}).option(`reasoning-summary`,{type:`string`,description:`A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.`,choices:[`auto`,`concise`,`detailed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openai gpt-oss-20b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openai/gpt-oss-20b`,pathParams:{},bodyKind:`json`,body:{...n,reasoningEffort:t.reasoningEffort,reasoningSummary:t.reasoningSummary,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gpt oss 20b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/gpt-oss-20b${r?`?`+r:``}`,{body:e})),{successLabel:`Created gpt oss 20b`});return}let h={};t.reasoningEffort!==void 0&&c(h,[`reasoning`,`effort`],o(t.reasoningEffort,`reasoningEffort`,`text`)),t.reasoningSummary!==void 0&&c(h,[`reasoning`,`summary`],o(t.reasoningSummary,`reasoningSummary`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gpt oss 20b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/gpt-oss-20b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gpt oss 20b`})}},Gn={command:`gpt-oss-20b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Wn).demandCommand(1),handler:()=>{}},Kn={command:`create`,describe:`Runs inference on the @cf/openai/gpt-oss-120b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`reasoning-effort`,{type:`string`,description:`Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.`,choices:[`low`,`medium`,`high`]}).option(`reasoning-summary`,{type:`string`,description:`A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.`,choices:[`auto`,`concise`,`detailed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openai gpt-oss-120b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openai/gpt-oss-120b`,pathParams:{},bodyKind:`json`,body:{...n,reasoningEffort:t.reasoningEffort,reasoningSummary:t.reasoningSummary,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gpt oss 120b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/gpt-oss-120b${r?`?`+r:``}`,{body:e})),{successLabel:`Created gpt oss 120b`});return}let h={};t.reasoningEffort!==void 0&&c(h,[`reasoning`,`effort`],o(t.reasoningEffort,`reasoningEffort`,`text`)),t.reasoningSummary!==void 0&&c(h,[`reasoning`,`summary`],o(t.reasoningSummary,`reasoningSummary`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating gpt oss 120b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/gpt-oss-120b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created gpt oss 120b`})}},qn={command:`gpt-oss-120b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Kn).demandCommand(1),handler:()=>{}},Jn={command:`create`,describe:`Runs inference on the @cf/openai/whisper-large-v3-turbo model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`beam-size`,{type:`number`,description:`The number of beams to use in beam search decoding. Higher values may improve accuracy at the cost of speed.`,default:5}).option(`compression-ratio-threshold`,{type:`number`,description:`Threshold for filtering out segments with high compression ratio, which often indicate repetitive or hallucinated text.`,default:2.4}).option(`condition-on-previous-text`,{type:`boolean`,description:`Whether to condition on previous text during transcription. Setting to false may help prevent hallucination loops.`,default:!0}).option(`hallucination-silence-threshold`,{type:`number`,description:`Optional threshold (in seconds) to skip silent periods that may cause hallucinations.`}).option(`initial-prompt`,{type:`string`,description:`A text prompt to help provide context to the model on the contents of the audio.`}).option(`language`,{type:`string`,description:`The language of the audio being transcribed or translated.`}).option(`log-prob-threshold`,{type:`number`,description:`Threshold for filtering out segments with low average log probability, indicating low confidence.`,default:-1}).option(`no-speech-threshold`,{type:`number`,description:`Threshold for detecting no-speech segments. Segments with no-speech probability above this value are skipped.`,default:.6}).option(`prefix`,{type:`string`,description:`The prefix appended to the beginning of the output of the transcription and can guide the transcription result.`}).option(`task`,{type:`string`,description:`Supported tasks are 'translate' or 'transcribe'.`,default:`transcribe`}).option(`vad-filter`,{type:`boolean`,description:`Preprocess the audio with a voice activity detection model.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openai whisper-large-v3-turbo create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openai/whisper-large-v3-turbo`,pathParams:{},bodyKind:`json`,body:{...n,beamSize:t.beamSize,compressionRatioThreshold:t.compressionRatioThreshold,conditionOnPreviousText:t.conditionOnPreviousText,hallucinationSilenceThreshold:t.hallucinationSilenceThreshold,initialPrompt:t.initialPrompt,language:t.language,logProbThreshold:t.logProbThreshold,noSpeechThreshold:t.noSpeechThreshold,prefix:t.prefix,task:t.task,vadFilter:t.vadFilter,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating whisper large v3 turbo`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/whisper-large-v3-turbo${r?`?`+r:``}`,{body:e})),{successLabel:`Created whisper large v3 turbo`});return}let h={};t.beamSize!==void 0&&c(h,[`beam_size`],t.beamSize),t.compressionRatioThreshold!==void 0&&c(h,[`compression_ratio_threshold`],t.compressionRatioThreshold),t.conditionOnPreviousText!==void 0&&c(h,[`condition_on_previous_text`],t.conditionOnPreviousText),t.hallucinationSilenceThreshold!==void 0&&c(h,[`hallucination_silence_threshold`],t.hallucinationSilenceThreshold),t.initialPrompt!==void 0&&c(h,[`initial_prompt`],o(t.initialPrompt,`initialPrompt`,`text`)),t.language!==void 0&&c(h,[`language`],o(t.language,`language`,`text`)),t.logProbThreshold!==void 0&&c(h,[`log_prob_threshold`],t.logProbThreshold),t.noSpeechThreshold!==void 0&&c(h,[`no_speech_threshold`],t.noSpeechThreshold),t.prefix!==void 0&&c(h,[`prefix`],o(t.prefix,`prefix`,`text`)),t.task!==void 0&&c(h,[`task`],o(t.task,`task`,`text`)),t.vadFilter!==void 0&&c(h,[`vad_filter`],t.vadFilter);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating whisper large v3 turbo`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openai/whisper-large-v3-turbo${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created whisper large v3 turbo`})}},Yn={command:`whisper-large-v3-turbo`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Jn).demandCommand(1),handler:()=>{}},Xn={command:`create`,describe:`Runs inference on the @cf/openai/whisper-tiny-en model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openai whisper-tiny-en create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openai/whisper-tiny-en`,pathParams:{},bodyKind:`octet-stream`,body:{...n,body:t.body,file:t.file},validation:`passed`});return}let a=await i(t),c=t.local?f:await r(a);if(t.accountId=c,t.file){let{readFileSync:e}=await import(`node:fs`),{resolve:n}=await import(`node:path`),r=e(n(t.file));u(await p(`Creating whisper tiny en`,async()=>a.post(`/accounts/${c}/ai/run/@cf/openai/whisper-tiny-en`,{body:r,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created whisper tiny en`});return}if(t.body){let e=o(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating whisper tiny en`,async()=>a.post(`/accounts/${c}/ai/run/@cf/openai/whisper-tiny-en${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created whisper tiny en`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Zn={command:`whisper-tiny-en`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Xn).demandCommand(1),handler:()=>{}},Qn={command:`create`,describe:`Runs inference on the @cf/openai/whisper model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openai whisper create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openai/whisper`,pathParams:{},bodyKind:`octet-stream`,body:{...n,body:t.body,file:t.file},validation:`passed`});return}let a=await i(t),c=t.local?f:await r(a);if(t.accountId=c,t.file){let{readFileSync:e}=await import(`node:fs`),{resolve:n}=await import(`node:path`),r=e(n(t.file));u(await p(`Creating whisper`,async()=>a.post(`/accounts/${c}/ai/run/@cf/openai/whisper`,{body:r,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created whisper`});return}if(t.body){let e=o(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating whisper`,async()=>a.post(`/accounts/${c}/ai/run/@cf/openai/whisper${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created whisper`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},$n={command:`whisper`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Qn).demandCommand(1),handler:()=>{}},er={command:`openai`,describe:`Operations for models.openai`,builder:e=>e.command(qn).command(Gn).command($n).command(Yn).command(Zn).demandCommand(1),handler:()=>{}},tr={command:`create`,describe:`Runs inference on the @cf/openchat/openchat-3.5-0106 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models openchat openchat-3-5-0106 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/openchat/openchat-3.5-0106`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating openchat 3 5 0106`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openchat/openchat-3.5-0106${r?`?`+r:``}`,{body:e})),{successLabel:`Created openchat 3 5 0106`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating openchat 3 5 0106`,async()=>a.post(`/accounts/${m}/ai/run/@cf/openchat/openchat-3.5-0106${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created openchat 3 5 0106`})}},nr={command:`openchat-3-5-0106`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(tr).demandCommand(1),handler:()=>{}},rr={command:`openchat`,describe:`Operations for models.openchat`,builder:e=>e.command(nr).demandCommand(1),handler:()=>{}},ir={command:`create`,describe:`Runs inference on the @cf/pfnet/plamo-embedding-1b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models pfnet plamo-embedding-1b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/pfnet/plamo-embedding-1b`,pathParams:{},bodyKind:`json`,body:{...n,body:t.body},validation:`passed`});return}let a=await i(t),o=t.local?f:await r(a);if(t.accountId=o,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating plamo embedding 1b`,async()=>a.post(`/accounts/${o}/ai/run/@cf/pfnet/plamo-embedding-1b${r?`?`+r:``}`,{body:e})),{successLabel:`Created plamo embedding 1b`});return}u(await p(`Creating plamo embedding 1b`,async()=>a.ai.models.pfnet.plamoEmbedding1b.create(o,Object.keys(n).length>0?n:void 0)),{successLabel:`Created plamo embedding 1b`})}},ar={command:`plamo-embedding-1b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ir).demandCommand(1),handler:()=>{}},or={command:`pfnet`,describe:`Operations for models.pfnet`,builder:e=>e.command(ar).demandCommand(1),handler:()=>{}},sr={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/pipecat-ai/smart-turn-v2 model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading smart turn v2`,async()=>t.ai.models.pipecatAI.smartTurnV2.get(n)),{successLabel:`Loaded smart turn v2`})}},cr={command:`smart-turn-v2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(sr).demandCommand(1),handler:()=>{}},lr={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/pipecat-ai/smart-turn-v3 model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading smart turn v3`,async()=>t.ai.models.pipecatAI.smartTurnV3.get(n)),{successLabel:`Loaded smart turn v3`})}},ur={command:`smart-turn-v3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(lr).demandCommand(1),handler:()=>{}},dr={command:`pipecat-ai`,describe:`Operations for models.pipecat-ai`,builder:e=>e.command(cr).command(ur).demandCommand(1),handler:()=>{}},fr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-0.5b-chat model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen1-5-0-5b-chat create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-0.5b-chat`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 0 5b chat`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-0.5b-chat${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen1 5 0 5b chat`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 0 5b chat`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-0.5b-chat${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen1 5 0 5b chat`})}},pr={command:`qwen1-5-0-5b-chat`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(fr).demandCommand(1),handler:()=>{}},mr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-1.8b-chat model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen1-5-1-8b-chat create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-1.8b-chat`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 1 8b chat`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-1.8b-chat${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen1 5 1 8b chat`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 1 8b chat`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-1.8b-chat${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen1 5 1 8b chat`})}},hr={command:`qwen1-5-1-8b-chat`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mr).demandCommand(1),handler:()=>{}},gr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-7b-chat-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen1-5-7b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 7b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen1 5 7b chat awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 7b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen1 5 7b chat awq`})}},_r={command:`qwen1-5-7b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(gr).demandCommand(1),handler:()=>{}},vr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-14b-chat-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen1-5-14b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 14b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen1 5 14b chat awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen1 5 14b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen1 5 14b chat awq`})}},yr={command:`qwen1-5-14b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(vr).demandCommand(1),handler:()=>{}},br={command:`create`,describe:`Runs inference on the @cf/qwen/qwen2.5-coder-32b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen2-5-coder-32b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen2 5 coder 32b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen2 5 coder 32b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen2 5 coder 32b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen2 5 coder 32b instruct`})}},xr={command:`qwen2-5-coder-32b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(br).demandCommand(1),handler:()=>{}},Sr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen3-30b-a3b-fp8 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:2e3}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen3-30b-a3b-fp8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen3 30b a3b fp8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen3 30b a3b fp8`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen3 30b a3b fp8`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen3 30b a3b fp8`})}},Cr={command:`qwen3-30b-a3b-fp8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Sr).demandCommand(1),handler:()=>{}},wr={command:`create`,describe:`Runs inference on the @cf/qwen/qwen3-embedding-0.6b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`instruction`,{type:`string`,description:`Optional instruction for the task`,default:`Given a web search query, retrieve relevant passages that answer the query`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwen3-embedding-0-6b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwen3-embedding-0.6b`,pathParams:{},bodyKind:`json`,body:{...n,instruction:t.instruction,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen3 embedding 0 6b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen3-embedding-0.6b${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwen3 embedding 0 6b`});return}let h={};t.instruction!==void 0&&c(h,[`instruction`],o(t.instruction,`instruction`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwen3 embedding 0 6b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwen3-embedding-0.6b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwen3 embedding 0 6b`})}},Tr={command:`qwen3-embedding-0-6b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(wr).demandCommand(1),handler:()=>{}},Er={command:`create`,describe:`Runs inference on the @cf/qwen/qwq-32b model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.15}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models qwen qwq-32b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/qwen/qwq-32b`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwq 32b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwq-32b${r?`?`+r:``}`,{body:e})),{successLabel:`Created qwq 32b`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating qwq 32b`,async()=>a.post(`/accounts/${m}/ai/run/@cf/qwen/qwq-32b${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created qwq 32b`})}},Dr={command:`qwq-32b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Er).demandCommand(1),handler:()=>{}},Or={command:`qwen`,describe:`Operations for models.qwen`,builder:e=>e.command(pr).command(hr).command(yr).command(_r).command(xr).command(Cr).command(Tr).command(Dr).demandCommand(1),handler:()=>{}},kr={command:`create`,describe:`Runs inference on the @cf/runwayml/stable-diffusion-v1-5-img2img model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models runwayml stable-diffusion-v1-5-img2img create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,image:n.image,imageB64:n.imageB64,mask:n.mask,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,strength:n.strength,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion v1 5 img2img`,async()=>m.post(`/accounts/${h}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img${t?`?`+t:``}`,{body:e})),{successLabel:`Created stable diffusion v1 5 img2img`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.image!==void 0&&c(g,[`image`],n.image),n.imageB64!==void 0&&c(g,[`image_b64`],o(n.imageB64,`imageB64`,`text`)),n.mask!==void 0&&c(g,[`mask`],n.mask),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.strength!==void 0&&c(g,[`strength`],n.strength),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion v1 5 img2img`,async()=>m.post(`/accounts/${h}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created stable diffusion v1 5 img2img`})}},Ar={command:`stable-diffusion-v1-5-img2img`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(kr).demandCommand(1),handler:()=>{}},jr={command:`create`,describe:`Runs inference on the @cf/runwayml/stable-diffusion-v1-5-inpainting model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models runwayml stable-diffusion-v1-5-inpainting create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,image:n.image,imageB64:n.imageB64,mask:n.mask,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,strength:n.strength,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion v1 5 inpainting`,async()=>m.post(`/accounts/${h}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting${t?`?`+t:``}`,{body:e})),{successLabel:`Created stable diffusion v1 5 inpainting`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.image!==void 0&&c(g,[`image`],n.image),n.imageB64!==void 0&&c(g,[`image_b64`],o(n.imageB64,`imageB64`,`text`)),n.mask!==void 0&&c(g,[`mask`],n.mask),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.strength!==void 0&&c(g,[`strength`],n.strength),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion v1 5 inpainting`,async()=>m.post(`/accounts/${h}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created stable diffusion v1 5 inpainting`})}},Mr={command:`stable-diffusion-v1-5-inpainting`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(jr).demandCommand(1),handler:()=>{}},Nr={command:`runwayml`,describe:`Operations for models.runwayml`,builder:e=>e.command(Ar).command(Mr).demandCommand(1),handler:()=>{}},Pr={command:`get`,describe:`Retrieves the input and output JSON schema definition for a Workers AI model.`,builder:e=>e.option(`model`,{type:`string`,description:`Model Name`,demandOption:!0}),handler:async e=>{let t={};e.model!==void 0&&(t.model=e.model);let n=await i(e),a=e.local?f:await r(n);e.accountId=a,u(await p(`Loading schema`,async()=>n.ai.models.schema.get(a,Object.keys(t).length>0?t:void 0)),{successLabel:`Loaded schema`})}},Fr={command:`schema`,describe:`Search the Workers AI model catalog and retrieve input/output schemas`,builder:e=>e.command(Pr).demandCommand(1),handler:()=>{}},Ir={command:`create`,describe:`Runs inference on the @cf/stabilityai/stable-diffusion-xl-base-1.0 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async n=>{let a={};if(n.queueRequest!==void 0&&(a.queueRequest=n.queueRequest),n.tags!==void 0&&(a.tags=n.tags),n.dryRun){let t=e();t&&s(t,`accountId`),d({command:`cf ai models stabilityai stable-diffusion-xl-base-1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0`,pathParams:{},bodyKind:`json`,body:{...a,guidance:n.guidance,height:n.height,image:n.image,imageB64:n.imageB64,mask:n.mask,negativePrompt:n.negativePrompt,numSteps:n.numSteps,prompt:n.prompt,seed:n.seed,strength:n.strength,width:n.width,body:n.body},validation:`passed`});return}let m=await i(n),h=n.local?f:await r(m);if(n.accountId=h,n.body){let e=l(n.body),t=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion xl base 1 0`,async()=>m.post(`/accounts/${h}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0${t?`?`+t:``}`,{body:e})),{successLabel:`Created stable diffusion xl base 1 0`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let g={};n.guidance!==void 0&&c(g,[`guidance`],n.guidance),n.height!==void 0&&c(g,[`height`],n.height),n.image!==void 0&&c(g,[`image`],n.image),n.imageB64!==void 0&&c(g,[`image_b64`],o(n.imageB64,`imageB64`,`text`)),n.mask!==void 0&&c(g,[`mask`],n.mask),n.negativePrompt!==void 0&&c(g,[`negative_prompt`],o(n.negativePrompt,`negativePrompt`,`text`)),n.numSteps!==void 0&&c(g,[`num_steps`],n.numSteps),n.prompt!==void 0&&c(g,[`prompt`],o(n.prompt,`prompt`,`text`)),n.seed!==void 0&&c(g,[`seed`],n.seed),n.strength!==void 0&&c(g,[`strength`],n.strength),n.width!==void 0&&c(g,[`width`],n.width);let _=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating stable diffusion xl base 1 0`,async()=>m.post(`/accounts/${h}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0${_?`?`+_:``}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Created stable diffusion xl base 1 0`})}},Lr={command:`stable-diffusion-xl-base-1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ir).demandCommand(1),handler:()=>{}},Rr={command:`stabilityai`,describe:`Operations for models.stabilityai`,builder:e=>e.command(Lr).demandCommand(1),handler:()=>{}},zr={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/sven/test-pipe-http model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading test pipe http`,async()=>t.ai.models.sven.testPipeHTTP.get(n)),{successLabel:`Loaded test pipe http`})}},Br={command:`test-pipe-http`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(zr).demandCommand(1),handler:()=>{}},Vr={command:`sven`,describe:`Operations for models.sven`,builder:e=>e.command(Br).demandCommand(1),handler:()=>{}},Hr={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/test/hello-world-cog model.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading hello world cog`,async()=>t.ai.models.test.helloWorldCog.get(n)),{successLabel:`Loaded hello world cog`})}},Ur={command:`hello-world-cog`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Hr).demandCommand(1),handler:()=>{}},Wr={command:`test`,describe:`Operations for models.test`,builder:e=>e.command(Ur).demandCommand(1),handler:()=>{}},Gr={command:`create`,describe:`Runs inference on the @hf/thebloke/deepseek-coder-6.7b-base-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke deepseek-coder-6-7b-base-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek coder 6 7b base awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created deepseek coder 6 7b base awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek coder 6 7b base awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created deepseek coder 6 7b base awq`})}},Kr={command:`deepseek-coder-6-7b-base-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Gr).demandCommand(1),handler:()=>{}},qr={command:`create`,describe:`Runs inference on the @hf/thebloke/deepseek-coder-6.7b-instruct-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke deepseek-coder-6-7b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek coder 6 7b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created deepseek coder 6 7b instruct awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating deepseek coder 6 7b instruct awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created deepseek coder 6 7b instruct awq`})}},Jr={command:`deepseek-coder-6-7b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(qr).demandCommand(1),handler:()=>{}},Yr={command:`create`,describe:`Runs inference on the @cf/thebloke/discolm-german-7b-v1-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke discolm-german-7b-v1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating discolm german 7b v1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created discolm german 7b v1 awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating discolm german 7b v1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created discolm german 7b v1 awq`})}},Xr={command:`discolm-german-7b-v1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Yr).demandCommand(1),handler:()=>{}},Zr={command:`create`,describe:`Runs inference on the @hf/thebloke/llama-2-13b-chat-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke llama-2-13b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/llama-2-13b-chat-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 13b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/llama-2-13b-chat-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created llama 2 13b chat awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating llama 2 13b chat awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/llama-2-13b-chat-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created llama 2 13b chat awq`})}},Qr={command:`llama-2-13b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Zr).demandCommand(1),handler:()=>{}},$r={command:`create`,describe:`Runs inference on the @hf/thebloke/mistral-7b-instruct-v0.1-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke mistral-7b-instruct-v0-1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created mistral 7b instruct v0 1 awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating mistral 7b instruct v0 1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created mistral 7b instruct v0 1 awq`})}},ei={command:`mistral-7b-instruct-v0-1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command($r).demandCommand(1),handler:()=>{}},ti={command:`create`,describe:`Runs inference on the @hf/thebloke/neural-chat-7b-v3-1-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke neural-chat-7b-v3-1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating neural chat 7b v3 1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created neural chat 7b v3 1 awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating neural chat 7b v3 1 awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created neural chat 7b v3 1 awq`})}},ni={command:`neural-chat-7b-v3-1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ti).demandCommand(1),handler:()=>{}},ri={command:`create`,describe:`Runs inference on the @hf/thebloke/openhermes-2.5-mistral-7b-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke openhermes-2-5-mistral-7b-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating openhermes 2 5 mistral 7b awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created openhermes 2 5 mistral 7b awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating openhermes 2 5 mistral 7b awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created openhermes 2 5 mistral 7b awq`})}},ii={command:`openhermes-2-5-mistral-7b-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ri).demandCommand(1),handler:()=>{}},ai={command:`create`,describe:`Runs inference on the @hf/thebloke/zephyr-7b-beta-awq model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models thebloke zephyr-7b-beta-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@hf/thebloke/zephyr-7b-beta-awq`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating zephyr 7b beta awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/zephyr-7b-beta-awq${r?`?`+r:``}`,{body:e})),{successLabel:`Created zephyr 7b beta awq`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating zephyr 7b beta awq`,async()=>a.post(`/accounts/${m}/ai/run/@hf/thebloke/zephyr-7b-beta-awq${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created zephyr 7b beta awq`})}},oi={command:`zephyr-7b-beta-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ai).demandCommand(1),handler:()=>{}},$={command:`thebloke`,describe:`Operations for models.thebloke`,builder:e=>e.command(Kr).command(Jr).command(Xr).command(Qr).command(ei).command(ni).command(ii).command(oi).demandCommand(1),handler:()=>{}},si={command:`create`,describe:`Runs inference on the @cf/tiiuae/falcon-7b-instruct model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models tiiuae falcon-7b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/tiiuae/falcon-7b-instruct`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating falcon 7b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/tiiuae/falcon-7b-instruct${r?`?`+r:``}`,{body:e})),{successLabel:`Created falcon 7b instruct`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating falcon 7b instruct`,async()=>a.post(`/accounts/${m}/ai/run/@cf/tiiuae/falcon-7b-instruct${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created falcon 7b instruct`})}},ci={command:`falcon-7b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(si).demandCommand(1),handler:()=>{}},li={command:`tiiuae`,describe:`Operations for models.tiiuae`,builder:e=>e.command(ci).demandCommand(1),handler:()=>{}},ui={command:`create`,describe:`Runs inference on the @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`frequency-penalty`,{type:`number`,description:`Decreases the likelihood of the model repeating the same lines verbatim.`}).option(`lora`,{type:`string`,description:`Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.`}).option(`max-tokens`,{type:`number`,description:`The maximum number of tokens to generate in the response.`,default:256}).option(`presence-penalty`,{type:`number`,description:`Increases the likelihood of the model introducing new topics.`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`raw`,{type:`boolean`,description:`If true, a chat template is not applied and you must adhere to the specific model's expected formatting.`,default:!1}).option(`repetition-penalty`,{type:`number`,description:`Penalty for repeated tokens; higher values discourage repetition.`}).option(`response-format-type`,{type:`string`,description:`The response_format.type field`,choices:[`json_object`,`json_schema`]}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the generation.`}).option(`stream`,{type:`boolean`,description:`If true, the response will be streamed back incrementally using SSE, Server Sent Events.`,default:!1}).option(`temperature`,{type:`number`,description:`Controls the randomness of the output; higher values produce more random results.`,default:.6}).option(`top-k`,{type:`number`,description:`Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.`}).option(`top-p`,{type:`number`,description:`Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models tinyllama tinyllama-1-1b-chat-v1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0`,pathParams:{},bodyKind:`json`,body:{...n,frequencyPenalty:t.frequencyPenalty,lora:t.lora,maxTokens:t.maxTokens,presencePenalty:t.presencePenalty,prompt:t.prompt,raw:t.raw,repetitionPenalty:t.repetitionPenalty,responseFormatType:t.responseFormatType,seed:t.seed,stream:t.stream,temperature:t.temperature,topK:t.topK,topP:t.topP,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating tinyllama 1 1b chat v1 0`,async()=>a.post(`/accounts/${m}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0${r?`?`+r:``}`,{body:e})),{successLabel:`Created tinyllama 1 1b chat v1 0`});return}let h={};t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.lora!==void 0&&c(h,[`lora`],o(t.lora,`lora`,`text`)),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.raw!==void 0&&c(h,[`raw`],t.raw),t.repetitionPenalty!==void 0&&c(h,[`repetition_penalty`],t.repetitionPenalty),t.responseFormatType!==void 0&&c(h,[`response_format`,`type`],o(t.responseFormatType,`responseFormatType`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topK!==void 0&&c(h,[`top_k`],t.topK),t.topP!==void 0&&c(h,[`top_p`],t.topP);let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating tinyllama 1 1b chat v1 0`,async()=>a.post(`/accounts/${m}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created tinyllama 1 1b chat v1 0`})}},di={command:`tinyllama-1-1b-chat-v1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ui).demandCommand(1),handler:()=>{}},fi={command:`tinyllama`,describe:`Operations for models.tinyllama`,builder:e=>e.command(di).demandCommand(1),handler:()=>{}},pi={command:`create`,describe:`Runs inference on the @cf/zai-org/glm-4.7-flash model.`,builder:e=>e.option(`queue-request`,{type:`string`,description:`QueueRequest`}).option(`tags`,{type:`string`,description:`Tags`}).option(`chat-template-kwargs-clear-thinking`,{type:`boolean`,description:`If false, preserves reasoning context between turns.`,default:!1}).option(`chat-template-kwargs-enable-thinking`,{type:`boolean`,description:`Whether to enable reasoning, enabled by default.`,default:!0}).option(`frequency-penalty`,{type:`number`,description:`The frequency_penalty field`}).option(`logprobs`,{type:`boolean`,description:`The logprobs field`}).option(`max-completion-tokens`,{type:`number`,description:`The max_completion_tokens field`}).option(`max-tokens`,{type:`number`,description:`The max_tokens field`}).option(`modalities`,{type:`string`,array:!0,description:`The modalities field`}).option(`model`,{type:`string`,description:`ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc').`}).option(`n`,{type:`number`,description:`The n field`}).option(`parallel-tool-calls`,{type:`boolean`,description:`Whether to enable parallel function calling during tool use.`,default:!0}).option(`presence-penalty`,{type:`number`,description:`The presence_penalty field`}).option(`prompt`,{type:`string`,description:`The input text prompt for the model to generate a response.`}).option(`reasoning-effort`,{type:`string`,description:`The reasoning_effort field`,choices:[`low`,`medium`,`high`]}).option(`seed`,{type:`number`,description:`The seed field`}).option(`service-tier`,{type:`string`,description:`The service_tier field`,choices:[`auto`,`default`,`flex`,`scale`,`priority`]}).option(`store`,{type:`boolean`,description:`The store field`}).option(`stream`,{type:`boolean`,description:`The stream field`}).option(`temperature`,{type:`number`,description:`The temperature field`}).option(`top-logprobs`,{type:`number`,description:`The top_logprobs field`}).option(`top-p`,{type:`number`,description:`The top_p field`}).option(`user`,{type:`string`,description:`A unique identifier representing your end-user, for abuse monitoring.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async t=>{let n={};if(t.queueRequest!==void 0&&(n.queueRequest=t.queueRequest),t.tags!==void 0&&(n.tags=t.tags),t.dryRun){let r=e();r&&s(r,`accountId`),d({command:`cf ai models zai-org glm-4-7-flash create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r??`<account-id>`}/ai/run/@cf/zai-org/glm-4.7-flash`,pathParams:{},bodyKind:`json`,body:{...n,chatTemplateKwargsClearThinking:t.chatTemplateKwargsClearThinking,chatTemplateKwargsEnableThinking:t.chatTemplateKwargsEnableThinking,frequencyPenalty:t.frequencyPenalty,logprobs:t.logprobs,maxCompletionTokens:t.maxCompletionTokens,maxTokens:t.maxTokens,modalities:t.modalities,model:t.model,n:t.n,parallelToolCalls:t.parallelToolCalls,presencePenalty:t.presencePenalty,prompt:t.prompt,reasoningEffort:t.reasoningEffort,seed:t.seed,serviceTier:t.serviceTier,store:t.store,stream:t.stream,temperature:t.temperature,topLogprobs:t.topLogprobs,topP:t.topP,user:t.user,body:t.body},validation:`passed`});return}let a=await i(t),m=t.local?f:await r(a);if(t.accountId=m,t.body){let e=l(t.body),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating glm 4 7 flash`,async()=>a.post(`/accounts/${m}/ai/run/@cf/zai-org/glm-4.7-flash${r?`?`+r:``}`,{body:e})),{successLabel:`Created glm 4 7 flash`});return}let h={};t.chatTemplateKwargsClearThinking!==void 0&&c(h,[`chat_template_kwargs`,`clear_thinking`],t.chatTemplateKwargsClearThinking),t.chatTemplateKwargsEnableThinking!==void 0&&c(h,[`chat_template_kwargs`,`enable_thinking`],t.chatTemplateKwargsEnableThinking),t.frequencyPenalty!==void 0&&c(h,[`frequency_penalty`],t.frequencyPenalty),t.logprobs!==void 0&&c(h,[`logprobs`],t.logprobs),t.maxCompletionTokens!==void 0&&c(h,[`max_completion_tokens`],t.maxCompletionTokens),t.maxTokens!==void 0&&c(h,[`max_tokens`],t.maxTokens),t.modalities!==void 0&&c(h,[`modalities`],t.modalities),t.model!==void 0&&c(h,[`model`],o(t.model,`model`,`text`)),t.n!==void 0&&c(h,[`n`],t.n),t.parallelToolCalls!==void 0&&c(h,[`parallel_tool_calls`],t.parallelToolCalls),t.presencePenalty!==void 0&&c(h,[`presence_penalty`],t.presencePenalty),t.prompt!==void 0&&c(h,[`prompt`],o(t.prompt,`prompt`,`text`)),t.reasoningEffort!==void 0&&c(h,[`reasoning_effort`],o(t.reasoningEffort,`reasoningEffort`,`text`)),t.seed!==void 0&&c(h,[`seed`],t.seed),t.serviceTier!==void 0&&c(h,[`service_tier`],o(t.serviceTier,`serviceTier`,`text`)),t.store!==void 0&&c(h,[`store`],t.store),t.stream!==void 0&&c(h,[`stream`],t.stream),t.temperature!==void 0&&c(h,[`temperature`],t.temperature),t.topLogprobs!==void 0&&c(h,[`top_logprobs`],t.topLogprobs),t.topP!==void 0&&c(h,[`top_p`],t.topP),t.user!==void 0&&c(h,[`user`],o(t.user,`user`,`text`));let g=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();u(await p(`Creating glm 4 7 flash`,async()=>a.post(`/accounts/${m}/ai/run/@cf/zai-org/glm-4.7-flash${g?`?`+g:``}`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created glm 4 7 flash`})}},mi={command:`glm-4-7-flash`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(pi).demandCommand(1),handler:()=>{}},hi={command:`zai-org`,describe:`Operations for models.zai-org`,builder:e=>e.command(mi).demandCommand(1),handler:()=>{}},gi={command:`models`,describe:`Search the Workers AI model catalog and retrieve input/output schemas`,builder:e=>e.command(Ot).command(O).command(j).command(X).command(ce).command(de).command(Le).command(He).command(Ge).command(Qe).command(tt).command(mt).command(yt).command(St).command(Dt).command(jt).command(dn).command(vn).command(Tn).command(On).command(jn).command(Pn).command(Ln).command(Bn).command(Un).command(er).command(rr).command(or).command(dr).command(Or).command(Nr).command(Fr).command(Rr).command(Vr).command(Wr).command($).command(li).command(fi).command(hi).demandCommand(1),handler:()=>{}},_i={command:`run <modelName>`,describe:`This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).`,builder:e=>e.positional(`modelName`,{type:`string`,description:`Model name`,demandOption:!0}).option(`text`,{type:`string`,description:`The text that you want to classify`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`,default:7.5}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`,default:20}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`,default:1}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`lang`,{type:`string`,description:`The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified`,default:`en`}).option(`source-lang`,{type:`string`,description:`The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified`,default:`en`}).option(`target-lang`,{type:`string`,description:`The language code to translate the text into (e.g., 'es' for Spanish)`}).option(`input-text`,{type:`string`,description:`The text that you want the model to summarize`}).option(`max-length`,{type:`number`,description:`The maximum length of the generated summary in tokens`,default:1024}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`text`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).conflicts(`guidance`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`height`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`image`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`,`prompt`]).conflicts(`image-b64`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`mask`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`negative-prompt`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`num-steps`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`prompt`,[`text`,`source-lang`,`target-lang`,`input-text`,`max-length`,`image`]).conflicts(`seed`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`strength`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`width`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`lang`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`seed`,`strength`,`width`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`source-lang`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).conflicts(`target-lang`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).implies(`target-lang`,[`text`]).conflicts(`input-text`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`source-lang`,`target-lang`]).conflicts(`max-length`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`source-lang`,`target-lang`]),handler:async t=>{if(s(t.modelName,`modelName`),t.dryRun){let n=e();n&&s(n,`accountId`),d({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai/run/${t.modelName??`<modelName>`}`,pathParams:{modelName:String(t.modelName??``)},bodyKind:`json`,body:{text:t.text,guidance:t.guidance,height:t.height,image:t.image,imageB64:t.imageB64,mask:t.mask,negativePrompt:t.negativePrompt,numSteps:t.numSteps,prompt:t.prompt,seed:t.seed,strength:t.strength,width:t.width,lang:t.lang,sourceLang:t.sourceLang,targetLang:t.targetLang,inputText:t.inputText,maxLength:t.maxLength,body:t.body},validation:`passed`});return}let n=await i(t),a=t.local?f:await r(n);if(t.accountId=a,t.body){let e=l(t.body);u(await p(`Creating ai`,async()=>n.post(`/accounts/${a}/ai/run/${t.modelName}`,{body:e})),{successLabel:`Created ai`});return}let m={};t.text!==void 0&&c(m,[`text`],o(t.text,`text`,`text`)),t.guidance!==void 0&&c(m,[`guidance`],t.guidance),t.height!==void 0&&c(m,[`height`],t.height),t.image!==void 0&&c(m,[`image`],t.image),t.imageB64!==void 0&&c(m,[`image_b64`],o(t.imageB64,`imageB64`,`text`)),t.mask!==void 0&&c(m,[`mask`],t.mask),t.negativePrompt!==void 0&&c(m,[`negative_prompt`],o(t.negativePrompt,`negativePrompt`,`text`)),t.numSteps!==void 0&&c(m,[`num_steps`],t.numSteps),t.prompt!==void 0&&c(m,[`prompt`],o(t.prompt,`prompt`,`text`)),t.seed!==void 0&&c(m,[`seed`],t.seed),t.strength!==void 0&&c(m,[`strength`],t.strength),t.width!==void 0&&c(m,[`width`],t.width),t.lang!==void 0&&c(m,[`lang`],o(t.lang,`lang`,`text`)),t.sourceLang!==void 0&&c(m,[`source_lang`],o(t.sourceLang,`sourceLang`,`text`)),t.targetLang!==void 0&&c(m,[`target_lang`],o(t.targetLang,`targetLang`,`text`)),t.inputText!==void 0&&c(m,[`input_text`],o(t.inputText,`inputText`,`text`)),t.maxLength!==void 0&&c(m,[`max_length`],t.maxLength),u(await p(`Creating ai`,async()=>n.post(`/accounts/${a}/ai/run/${t.modelName}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created ai`})}},vi={command:`get`,describe:`Get whether Firewall for AI is enabled or disabled for a zone.`,builder:e=>e,handler:async e=>{let t=await i(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,u(await p(`Loading setting`,async()=>t.ai.settings.get(n)),{successLabel:`Loaded setting`})}},yi={command:`update`,describe:`Enable or disable Firewall for AI for a zone. Changes can take up to a minute to propagate to the zone.`,builder:e=>e.option(`enabled`,{type:`boolean`,description:`Whether Firewall for AI is enabled on the zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Firewall for AI enablement status for a zone.`}),handler:async e=>{if(e.dryRun){d({command:`cf ai settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/firewall-for-ai/settings`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{enabled:e.enabled,body:e.body},validation:`passed`});return}let t=await i(e);if(e.zoneId=await a({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=l(e.body);u(await p(`Updating setting`,async()=>t.put(`/zones/${e.zoneId}/firewall-for-ai/settings`,{body:n})),{successLabel:`Updated setting`});return}let n={};e.enabled!==void 0&&c(n,[`enabled`],e.enabled),u(await p(`Updating setting`,async()=>t.put(`/zones/${e.zoneId}/firewall-for-ai/settings`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated setting`})}},bi={command:`settings`,describe:`Settings operations`,builder:e=>e.command(vi).command(yi).demandCommand(1),handler:()=>{}},xi={command:`list`,describe:`Searches Workers AI models by task type (e.g., text-generation, embeddings).`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading tasks`,async()=>t.ai.tasks.list(n)),{successLabel:`Loaded tasks`})}},Si={command:`tasks`,describe:`Browse supported inference task types (text-generation, image-classification, etc.)`,builder:e=>e.command(xi).demandCommand(1),handler:()=>{}},Ci={command:`supported`,describe:`Lists all file formats supported for conversion to Markdown.`,builder:e=>e,handler:async e=>{let t=await i(e),n=e.local?f:await r(t);e.accountId=n,u(await p(`Loading to markdown`,async()=>t.ai.toMarkdown.supported(n)),{successLabel:`Loaded to markdown`})}},wi={command:`transform`,describe:`Converts uploaded files into Markdown format using Workers AI.`,builder:e=>e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`files`,{type:`string`,description:`The files`}),handler:async t=>{if(t.dryRun){let n=e();n&&s(n,`accountId`),d({command:`cf ai to-markdown transform`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai/tomarkdown`,pathParams:{},bodyKind:`multipart`,body:{body:t.body,file:t.file,files:t.files},validation:`passed`});return}let n=await i(t),a=t.local?f:await r(n);if(t.accountId=a,t.file!==void 0||t.body!==void 0||t.files!==void 0){let e=new FormData;if(t.file){let{readFileSync:n}=await import(`node:fs`),{resolve:r}=await import(`node:path`),i=n(r(t.file));e.append(`file`,new Blob([i]),t.file.split(`/`).pop())}else t.body!==void 0&&e.append(`file`,t.body);if(t.files!==void 0){let n=typeof t.files==`string`?o(t.files,`files`,`text`):t.files;e.append(`files`,typeof n==`string`?n:JSON.stringify(n))}u(await p(`Creating to markdown`,async()=>n.post(`/accounts/${a}/ai/tomarkdown`,{body:e})),{successLabel:`Created to markdown`});return}if(t.body){let e=o(t.body,`body`,`binary`);u(await p(`Creating to markdown`,async()=>n.post(`/accounts/${a}/ai/tomarkdown`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created to markdown`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Ti={command:`to-markdown`,describe:`AI inference trends and model usage statistics across the Cloudflare network`,builder:e=>e.command(Ci).command(wi).demandCommand(1),handler:()=>{}},Ei={command:`ai`,describe:`Run inference on Workers AI models — text generation, image classification, embeddings, and more`,builder:e=>e.command(_i).command(h).command(b).command(C).command(gi).command(bi).command(Si).command(Ti).demandCommand(1),handler:()=>{}};export{Ei as default};
|