cf 0.3.0 → 0.5.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 +7 -1
- package/dist/_meta/agent-context.json +26 -21
- package/dist/_meta/commands.json +7696 -18100
- package/dist/_meta/schemas.json +6411 -13925
- package/dist/{abuse-reports-dMIfUJ8v.mjs → abuse-reports-Ina5TlsU.mjs} +2 -2
- package/dist/{accounts-Kx1epdA1.mjs → accounts-B_joQcMi.mjs} +9 -9
- package/dist/{acm-Utu252kC.mjs → acm-_kIHqYME.mjs} +2 -2
- package/dist/{addressing-CBq7Z7Vq.mjs → addressing-CaFlw8y1.mjs} +10 -10
- package/dist/{agent-context-BGTU299M.mjs → agent-context-DMPfi54f.mjs} +1 -1
- package/dist/ai-CqnhNb_c.mjs +2 -0
- package/dist/ai-gateway-pgYGI519.mjs +8 -0
- package/dist/ai-search-eqQMPQol.mjs +7 -0
- package/dist/ai_gateway--vuVLnOm.mjs +4 -0
- package/dist/{alerting-CqmEIaKn.mjs → alerting-CPxHiYHb.mjs} +5 -5
- package/dist/{analytics-Dv-X8x7D.mjs → analytics-DSSRDZz8.mjs} +1 -1
- package/dist/analytics_engine-gWyfnsCs.mjs +2 -0
- package/dist/{api-gateway-CNv0IHTU.mjs → api-gateway-BXXGFCVR.mjs} +10 -10
- package/dist/argo-aC6A3JyX.mjs +2 -0
- package/dist/artifacts-HD4V2xpK.mjs +4 -0
- package/dist/audit-logs-BuExU_nz.mjs +2 -0
- package/dist/auth-CSC4yhEJ.mjs +9 -0
- package/dist/auth-D5hNsOFq.mjs +5 -0
- package/dist/billing-COaghyxl.mjs +2 -0
- package/dist/bot-management-DmEzeV1Y.mjs +5 -0
- package/dist/botnet-feed-ByEAXAkw.mjs +3 -0
- package/dist/brand-protection-dPrGe8sL.mjs +3 -0
- package/dist/browser-rendering-BiSGnpBf.mjs +4 -0
- package/dist/{build-DYkGW4dh.mjs → build-HuS9-R0V.mjs} +131 -131
- package/dist/{cache-DsoW6Xwv.mjs → cache-CY-7Lt71.mjs} +4 -4
- package/dist/calls-wOQGDWPl.mjs +4 -0
- package/dist/certificate-authorities-CtqzAtxQ.mjs +2 -0
- package/dist/chunk-6IEM75FG-BEjRFMGh.mjs +2 -0
- package/dist/client-certificates-CRf41xLe.mjs +3 -0
- package/dist/cloud-connector-BA5IRZUP.mjs +2 -0
- package/dist/{cloudforce-one-2Bhz8YdW.mjs → cloudforce-one-Bq_qPAWs.mjs} +20 -20
- package/dist/{completions-BwRpZQVn.mjs → completions-DOeHPdCG.mjs} +2 -2
- package/dist/config-B5k-XbwS.mjs +2 -0
- package/dist/connectivity-Bx3MgTHX.mjs +3 -0
- package/dist/connector-interrupts-D7ylweJZ.mjs +2 -0
- package/dist/connector-telemetry-events-6izV1kbP.mjs +2 -0
- package/dist/connector-telemetry-snapshots-BnjKbyxX.mjs +2 -0
- package/dist/connectors-DRt4e6d_.mjs +3 -0
- package/dist/content-scanning-Cd2vy5Sz.mjs +4 -0
- package/dist/context-jpewmual.mjs +2 -0
- package/dist/{custom-certificates-aAiEguR7.mjs → custom-certificates-DYE-9epx.mjs} +3 -3
- package/dist/{custom-hostnames-AG5yBHIi.mjs → custom-hostnames-CtuTdFcX.mjs} +4 -4
- package/dist/custom-nameservers-CWqA51in.mjs +3 -0
- package/dist/custom-pages-DeUKEFGe.mjs +4 -0
- package/dist/d1-DvWY9Gp4.mjs +4 -0
- package/dist/data-security-BPo6dIWu.mjs +6 -0
- package/dist/dcv-delegation-Bgf86J-r.mjs +2 -0
- package/dist/{deploy-CQial3kN.mjs → deploy-dVrgDUOp.mjs} +1 -1
- package/dist/{dev-B38LfCTl.mjs → dev-C01_Lby6.mjs} +1 -1
- package/dist/diagnostics-6nKPmVgz.mjs +3 -0
- package/dist/{dispatch-namespaces-DmHvoBOg.mjs → dispatch-namespaces-64lXx2WJ.mjs} +6 -6
- package/dist/dist-C6zxsVdY.mjs +306 -0
- package/dist/{dist-AIcZFk0U.mjs → dist-t_YrL25p.mjs} +7 -7
- package/dist/{dns-VMhQSr5n.mjs → dns-ClciFGxx.mjs} +13 -13
- package/dist/dns-firewall-DfUmXDCe.mjs +57 -0
- package/dist/durable-objects-CMaYZ-YU.mjs +2 -0
- package/dist/{email-routing-tIR2SFu-.mjs → email-routing-CGXhFqF5.mjs} +9 -9
- package/dist/{email-security-Ca1id3rZ.mjs → email-security-D5viPq8S.mjs} +7 -7
- package/dist/email-sending-C2jpc3gh.mjs +3 -0
- package/dist/{filters-A4dg_a68.mjs → filters-bzsFcWt0.mjs} +3 -3
- package/dist/{firewall-DWPQgYd9.mjs → firewall-DYZcTtIC.mjs} +10 -10
- package/dist/{fraud-BMkSsJGU.mjs → fraud-C03MtdZb.mjs} +1 -1
- package/dist/google-tag-gateway-Dfy887yA.mjs +2 -0
- package/dist/{healthchecks-CtIfrFql.mjs → healthchecks-DRoAlWgr.mjs} +3 -3
- package/dist/hostnames-CFgIVI3s.mjs +3 -0
- package/dist/hyperdrive-C7-gwTSV.mjs +18 -0
- package/dist/iam-DqVPzGrb.mjs +6 -0
- package/dist/images-BYfl4YgR.mjs +7 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-duTEPIHc.mjs +3 -0
- package/dist/{ips-K4bzaGqd.mjs → ips-nv9INuWZ.mjs} +1 -1
- package/dist/keyless-certificates-CRCDVd3g.mjs +3 -0
- package/dist/{kv-8o27w_pY.mjs → kv-CZoV4tiv.mjs} +4 -4
- package/dist/leaked-credential-checks-DNIBg7Pe.mjs +3 -0
- package/dist/{load-balancers-DtG8nj25.mjs → load-balancers--OMg0HNt.mjs} +5 -5
- package/dist/{logpush-4L0njy1d.mjs → logpush-C0_lZTyY.mjs} +3 -3
- package/dist/{logs-B_Yp95hv.mjs → logs-BtpWZQfV.mjs} +2 -2
- package/dist/magic-cloud-networking-u6rwYbGg.mjs +5 -0
- package/dist/{magic-network-monitoring-BnwvM4-I.mjs → magic-network-monitoring-CKgQyRj4.mjs} +3 -3
- package/dist/{magic-transit-CXDyvhxq.mjs → magic-transit-CLhMcJ_-.mjs} +32 -33
- package/dist/managed-transforms-D0Z2mlth.mjs +3 -0
- package/dist/mtls-certificates-BL65NK5T.mjs +3 -0
- package/dist/{network-interconnects-rrr7red3.mjs → network-interconnects-Bgu9gmaG.mjs} +5 -5
- package/dist/oauth-Bk-F-tIO.mjs +52 -0
- package/dist/{observability-DWvpqnQJ.mjs → observability-BynRbTF4.mjs} +3 -3
- package/dist/open-YWOUIZ5Y-3jqSKAB1.mjs +4 -0
- package/dist/{organizations-T77D50Sq.mjs → organizations-BqJHyvMK.mjs} +3 -3
- package/dist/origin-ca-certificates-BGvYwm3C.mjs +3 -0
- package/dist/origin-post-quantum-encryption-9KOE8YPI.mjs +2 -0
- package/dist/{origin-tls-client-auth-CaVW1Ztp.mjs → origin-tls-client-auth-d3snC3vr.mjs} +3 -3
- package/dist/{output-BJFNwj7b.mjs → output-B6fBFRqe.mjs} +1 -1
- package/dist/{page-rules-CjZPTMQX.mjs → page-rules-EZHJePmn.mjs} +4 -4
- package/dist/{page-shield-D5RRNJCY.mjs → page-shield-CXJioWPs.mjs} +5 -5
- package/dist/{pages-CWJtJnL0.mjs → pages-D4aYteKk.mjs} +8 -8
- package/dist/{pipelines-B0L_7j9e.mjs → pipelines-G8Iusxq-.mjs} +5 -5
- package/dist/progress-DrDErV9w.mjs +2 -0
- package/dist/queues-DEkbKqZX.mjs +6 -0
- package/dist/{r2-DQIcyRtA.mjs → r2-CV0IkCAW.mjs} +9 -9
- package/dist/r2-data-catalog-NtqGC_a_.mjs +14 -0
- package/dist/radar-D986zPJr.mjs +2 -0
- package/dist/{rate-limits-DcrQV6Ar.mjs → rate-limits-B2wRsUX1.mjs} +3 -3
- package/dist/raw-fetch-_n0lMAnD.mjs +2 -0
- package/dist/{realtime-kit-CaquuVOE.mjs → realtime-kit-Ld3c5eU6.mjs} +9 -9
- package/dist/{registrar-Ko-xZemf.mjs → registrar-CDIwTz3G.mjs} +6 -6
- package/dist/request-tracers-D7SFMDik.mjs +2 -0
- package/dist/resource-sharing-YIQ04jXE.mjs +5 -0
- package/dist/{resource-tagging-C3qtLzCz.mjs → resource-tagging-Bd6Y03sg.mjs} +7 -7
- package/dist/rules-DHjLP5Kx.mjs +4 -0
- package/dist/{rulesets-CBgpeSvJ.mjs → rulesets-q4QABpKs.mjs} +7 -7
- package/dist/rum-SmT4HZmM.mjs +4 -0
- package/dist/{schema-D16TgWBg.mjs → schema-BR31o4P6.mjs} +1 -1
- package/dist/{schema-validation-Dgv_opM3.mjs → schema-validation-vVetgC_P.mjs} +5 -5
- package/dist/{scim-DdSEr4kZ.mjs → scim-ChOkZpNx.mjs} +2 -2
- package/dist/{session-COHHdS7A.mjs → sdk-DhIhH6GB.mjs} +4 -4
- package/dist/{secrets-store-7BfyvJLb.mjs → secrets-store-BAK9G12O.mjs} +12 -12
- package/dist/security-center-eScuYDKP.mjs +2 -0
- package/dist/security-txt-x7R4gmQu.mjs +3 -0
- package/dist/session-DHYCE-PM.mjs +93 -0
- package/dist/shared-BAjo72Lz.mjs +2 -0
- package/dist/{smart-shield-TeWZFnH2.mjs → smart-shield-CWlSsNi8.mjs} +2 -2
- package/dist/snippets-DrlgYJYp.mjs +4 -0
- package/dist/{spawn-DcppKGI5.mjs → spawn-CCGzKlC4.mjs} +1 -1
- package/dist/{spectrum-CTTZID8u.mjs → spectrum-pVGxb7u5.mjs} +6 -6
- package/dist/speed-ZFrMWDgd.mjs +4 -0
- package/dist/src-DU7FBCOX.mjs +108 -0
- package/dist/ssl-9JY05sYt.mjs +15 -0
- package/dist/stream-tRU39b8K.mjs +14 -0
- package/dist/{tenants-Bd7NGQ_m.mjs → tenants-HLGUazms.mjs} +1 -1
- package/dist/{token-validation-DAgtFOvs.mjs → token-validation-_VdamKpz.mjs} +4 -4
- package/dist/{tools-DXQmfFuE.mjs → tools-D_hfUU_Z.mjs} +1 -1
- package/dist/{turnstile-cfdaO4ca.mjs → turnstile-BRzXd28B.mjs} +4 -4
- package/dist/{ui-D4KtlMh9.mjs → ui-erjBdVKL.mjs} +1 -1
- package/dist/url-normalization-D-NxuLtN.mjs +3 -0
- package/dist/url-scanner-BzzR6iDx.mjs +2 -0
- package/dist/{user-CAo-yCJA.mjs → user-C4omq__w.mjs} +2 -2
- package/dist/vectorize-By6EqcNR.mjs +4 -0
- package/dist/{versions-CUwWJWmy.mjs → versions-CBHwWPAM.mjs} +1 -1
- package/dist/{waiting-rooms-Dln5ICg5.mjs → waiting-rooms-u6KwrzWd.mjs} +6 -6
- package/dist/{web3-HQJRm38W.mjs → web3-DQ5dmE9W.mjs} +3 -3
- package/dist/{workers-Dg7ddG2Q.mjs → workers-D8Be7_as.mjs} +14 -14
- package/dist/workers-builds-BE3W3qNk.mjs +7 -0
- package/dist/{workflows-VquuSh2J.mjs → workflows-BWWufqFA.mjs} +3 -3
- package/dist/zaraz-Bsa9AvVL.mjs +2 -0
- package/dist/{zero-trust-CP96wnSh.mjs → zero-trust-UNVZFnKu.mjs} +87 -87
- package/dist/zero_trust-B0_Rk4p2.mjs +3 -0
- package/dist/zones-BXtdwt6E.mjs +21 -0
- package/package.json +4 -4
- package/dist/ai-DOOKLPkG.mjs +0 -2
- package/dist/ai-gateway-Cj1T3avF.mjs +0 -8
- package/dist/ai-search-CQF_Sn7d.mjs +0 -7
- package/dist/ai_gateway-C3fH22C0.mjs +0 -4
- package/dist/analytics_engine-DdXVR8z2.mjs +0 -2
- package/dist/argo-CX_A4kcn.mjs +0 -2
- package/dist/audit-logs-BfBf3oo-.mjs +0 -2
- package/dist/auth-SyWhMmPu.mjs +0 -6
- package/dist/auth-ffdf9yR0.mjs +0 -135
- package/dist/autorag-BuGhGTeZ.mjs +0 -2
- package/dist/billing-PoG81XaQ.mjs +0 -2
- package/dist/bot-management-CFvtVx62.mjs +0 -5
- package/dist/botnet-feed-B-M4Yu0W.mjs +0 -3
- package/dist/brand-protection-D05Eg-_6.mjs +0 -3
- package/dist/browser-rendering-xu8F_Rrv.mjs +0 -4
- package/dist/calls-CZbO7TyR.mjs +0 -4
- package/dist/certificate-authorities-D2yr7_3t.mjs +0 -2
- package/dist/client-certificates-MJcDsTId.mjs +0 -3
- package/dist/cloud-connector-DWOrN2eM.mjs +0 -2
- package/dist/config-DYzlVxcB.mjs +0 -2
- package/dist/connectivity-BX8C7tvK.mjs +0 -3
- package/dist/content-scanning-r6uzMO1r.mjs +0 -4
- package/dist/context-DGlHRGWM.mjs +0 -2
- package/dist/custom-nameservers-D1DtlRue.mjs +0 -3
- package/dist/custom-pages-DQCi2plU.mjs +0 -4
- package/dist/d1-DbnYhw45.mjs +0 -4
- package/dist/data-security-D_EtYBfo.mjs +0 -6
- package/dist/dcv-delegation-CHspSzTI.mjs +0 -2
- package/dist/diagnostics-BJQGjVJn.mjs +0 -3
- package/dist/dist-DNBSHor6.mjs +0 -301
- package/dist/dns-firewall-B4DVXFBQ.mjs +0 -57
- package/dist/durable-objects-CTboySEo.mjs +0 -2
- package/dist/email-sending-DwWKc5jC.mjs +0 -3
- package/dist/google-tag-gateway-BGD49nRC.mjs +0 -2
- package/dist/hostnames-BiomxukN.mjs +0 -3
- package/dist/hyperdrive-Da104VaQ.mjs +0 -18
- package/dist/iam-BIGKo0WW.mjs +0 -6
- package/dist/images-BO8FbDAa.mjs +0 -5
- package/dist/intel-CY6_79v8.mjs +0 -3
- package/dist/keyless-certificates-CZC-L8gM.mjs +0 -3
- package/dist/leaked-credential-checks-qLzRyu85.mjs +0 -3
- package/dist/magic-cloud-networking-CSOM3EM-.mjs +0 -5
- package/dist/managed-transforms-D15yVbZx.mjs +0 -3
- package/dist/mtls-certificates-D8k0AXWK.mjs +0 -3
- package/dist/origin-ca-certificates-DXIvD8H5.mjs +0 -3
- package/dist/origin-post-quantum-encryption-C8oOczyV.mjs +0 -2
- package/dist/progress-CrCGTq7N.mjs +0 -2
- package/dist/queues-CN6DPhRR.mjs +0 -6
- package/dist/r2-data-catalog-Bbo93TJx.mjs +0 -14
- package/dist/radar-Bxb0WX8V.mjs +0 -2
- package/dist/raw-fetch-Dlccg0Tr.mjs +0 -2
- package/dist/request-tracers-DOW_reTJ.mjs +0 -2
- package/dist/resource-sharing-D7TX0JV0.mjs +0 -5
- package/dist/rules-BXRADHL5.mjs +0 -4
- package/dist/rum-BjPptTUP.mjs +0 -4
- package/dist/security-center-DAy6AKtT.mjs +0 -2
- package/dist/security-txt-xAMb7K6Y.mjs +0 -3
- package/dist/shared-AGtpXwwL.mjs +0 -2
- package/dist/snippets-CCSsCXVs.mjs +0 -4
- package/dist/speed-CuzTE0AL.mjs +0 -4
- package/dist/src-BW6vfAwE.mjs +0 -108
- package/dist/ssl-BWA2LdwC.mjs +0 -15
- package/dist/stream-GFsIZ-pP.mjs +0 -14
- package/dist/url-normalization-B5RN4nLD.mjs +0 -3
- package/dist/url-scanner-BrZ1L9OC.mjs +0 -2
- package/dist/vectorize-C7_oQlaI.mjs +0 -4
- package/dist/workers-builds-AVfx8IyL.mjs +0 -7
- package/dist/zaraz-xYSWIV4P.mjs +0 -2
- package/dist/zones-BSgmZ9WC.mjs +0 -21
- /package/dist/{body-parser-DKa8Ipg1.mjs → body-parser-DWSy7uZ8.mjs} +0 -0
- /package/dist/{cli-types-CRIDdDw3.mjs → cli-types-BeyOc81z.mjs} +0 -0
- /package/dist/{input-validation-zEO81MWN.mjs → input-validation-_fMCApaH.mjs} +0 -0
- /package/dist/{lib-Eu1wXxuh.mjs → lib-4PQI6yRW.mjs} +0 -0
- /package/dist/{local-VJaJ3BZ1.mjs → local-CYc9q7l2.mjs} +0 -0
- /package/dist/{metadata-5VwHPW6C.mjs → metadata-OOwvpR8m.mjs} +0 -0
- /package/dist/{resolve-4-OSeHlK.mjs → resolve-C3h-mwp7.mjs} +0 -0
- /package/dist/{theme-BklJDrb2.mjs → theme-DbNbIY4d.mjs} +0 -0
package/dist/ai-DOOKLPkG.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{C as e,D as t,E as n,_ as r,i,n as a}from"./auth-ffdf9yR0.mjs";import{n as o,r as s,t as c}from"./body-parser-DKa8Ipg1.mjs";import{t as l}from"./output-BJFNwj7b.mjs";import{n as u,t as d}from"./progress-CrCGTq7N.mjs";import{n as f,t as p}from"./input-validation-zEO81MWN.mjs";import{t as m}from"./local-VJaJ3BZ1.mjs";import{t as h}from"./cli-types-CRIDdDw3.mjs";import{n as g,t as _}from"./raw-fetch-Dlccg0Tr.mjs";function v(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`Searches Workers AI models by author or organization name.`,builder:v,handler:async t=>{if(t.dryRun){u({command:`cf ai authors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/authors/search`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.authors.list({account_id:i})),{successLabel:`Loaded`})}},ee={command:`authors`,describe:`Search model authors and publishers in the Workers AI catalog`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`finetune-id`,{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)`})}const b={command:`create <finetune-id>`,describe:`Uploads training data assets for a Workers AI fine-tuning job.`,builder:te,handler:async t=>{if(t.dryRun){u({command:`cf ai finetunes assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/finetunes/${t[`finetune-id`]==null?`<finetune-id>`:encodeURIComponent(String(t[`finetune-id`]))}/finetune-assets`,pathParams:{"finetune-id":String(t[`finetune-id`]??``)},bodyKind:`multipart`,body:{body:t.body,file:t.file,"file-name":t[`file-name`]}});return}let n=await a(t),o=t.local?m:await r(n);if(t.accountId=o,t.file!==void 0||t.body!==void 0||t[`file-name`]!==void 0){let e=new FormData;if(t.file){let n=p(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);t[`file-name`]!==void 0&&e.append(`file_name`,String(f(t[`file-name`],`file-name`,`text`)??``)),l(await d(`Creating`,async()=>i(n,`POST`,`/accounts/${o}/ai/finetunes/${encodeURIComponent(String(t[`finetune-id`]))}/finetune-assets`,{body:e})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`);l(await d(`Creating`,async()=>i(n,`POST`,`/accounts/${o}/ai/finetunes/${encodeURIComponent(String(t[`finetune-id`]))}/finetune-assets`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},x={command:`assets`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return 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)`})}const C={command:`create`,describe:`Creates a new fine-tuning job for a Workers AI model using custom training data.`,builder:S,handler:async n=>{if(n.dryRun){u({command:`cf ai finetunes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/finetunes`,pathParams:{},bodyKind:`json`,body:n.body===void 0?c({description:f(n.description,`description`,`text`),model:f(n.model,`model`,`text`),name:f(n.name,`name`,`text`),public:n.public}):o(n.body)});return}let i=await a(n),s=n.local?m:await r(i);if(n.accountId=s,n.body){let e=o(n.body);l(await d(`Creating`,async()=>i.ai.finetunes.create({...e,account_id:s})),{successLabel:`Created`});return}n.model===void 0&&(n.model=await t(`model`,`The model field`)),n.name===void 0&&(n.name=await t(`name`,`The name field`));let p=c({description:f(n.description,`description`,`text`),model:f(n.model,`model`,`text`),name:f(n.name,`name`,`text`),public:n.public});l(await d(`Creating`,async()=>i.ai.finetunes.create({...p,account_id:s})),{successLabel:`Created`})}};function w(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`Lists all fine-tuning jobs created by the account, including status and metrics.`,builder:w,handler:async t=>{if(t.dryRun){u({command:`cf ai finetunes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/finetunes`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.finetunes.list({account_id:i})),{successLabel:`Loaded`})}};function E(e){return 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`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Lists publicly available fine-tuned models that can be used with Workers AI.`,builder:E,handler:async t=>{let n={limit:t.limit,offset:t.offset,orderBy:t[`order-by`]};if(t.dryRun){u({command:`cf ai finetunes public list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/finetunes/public`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?m:await r(i);t.accountId=o,l(await d(`Loading`,async()=>i.ai.finetunes.public.list({account_id:o,...n})),{successLabel:`Loaded`})}},O={command:`public`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},k={command:`finetunes`,describe:`Create and manage fine-tuned model variants trained on your own data`,builder:e=>e.command(C).command(T).command(x).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return 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)`})}const j={command:`create`,describe:`Runs inference on the @cf/ai4bharat/indictrans2-en-indic-1B model.`,builder:A,handler:async t=>{let i={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models ai4bharat indictrans2-en-indic-1B create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B`,pathParams:{},query:i,bodyKind:`json`,body:t.body===void 0?c({target_language:f(t[`target-language`],`target-language`,`text`)}):o(t.body)});return}let s=await a(t),p=t.local?m:await r(s);if(t.accountId=p,t.body){let e=o(t.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.ai4Bharat.indictrans2EnIndic1B.create({...e,account_id:p,...i})),{successLabel:`Created`});return}t[`target-language`]===void 0&&(t[`target-language`]=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 h=c({target_language:f(t[`target-language`],`target-language`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.ai4Bharat.indictrans2EnIndic1B.create({...h,account_id:p,...i})),{successLabel:`Created`})}},M={command:`indictrans2-en-indic-1B`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return 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)`})}const P={command:`create`,describe:`Runs inference on the @cf/ai4bharat/nonomni-indictrans2-en-indic-1b model.`,builder:N,handler:async t=>{let i={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models ai4bharat nonomni-indictrans2-en-indic-1b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b`,pathParams:{},query:i,bodyKind:`json`,body:t.body===void 0?c({target_language:f(t[`target-language`],`target-language`,`text`)}):o(t.body)});return}let s=await a(t),p=t.local?m:await r(s);if(t.accountId=p,t.body){let e=o(t.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.ai4Bharat.nonomniIndictrans2EnIndic1B.create({...e,account_id:p,...i})),{successLabel:`Created`});return}t[`target-language`]===void 0&&(t[`target-language`]=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 h=c({target_language:f(t[`target-language`],`target-language`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.ai4Bharat.nonomniIndictrans2EnIndic1B.create({...h,account_id:p,...i})),{successLabel:`Created`})}},F={command:`nonomni-indictrans2-en-indic-1b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`ai4bharat`,describe:`Operations for models.ai4bharat`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return 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)`})}const R={command:`create`,describe:`Runs inference on the @cf/aisingapore/gemma-sea-lion-v4-27b-it model.`,builder:L,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models aisingapore gemma-sea-lion-v4-27b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.aisingapore.gemmaSeaLionV427BIt.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.aisingapore.gemmaSeaLionV427BIt.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},z={command:`gemma-sea-lion-v4-27b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},B={command:`aisingapore`,describe:`Operations for models.aisingapore`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return 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)`})}const H={command:`create`,describe:`Runs inference on the @cf/baai/bge-base-en-v1.5 model.`,builder:V,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai bge-base-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/bge-base-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeBaseEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeBaseEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},U={command:`bge-base-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return 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)`})}const G={command:`create`,describe:`Runs inference on the @cf/baai/bge-large-en-v1.5 model.`,builder:W,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai bge-large-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/bge-large-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeLargeEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeLargeEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},K={command:`bge-large-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return 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)`})}const J={command:`create`,describe:`Runs inference on the @cf/baai/bge-m3 model.`,builder:q,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai bge-m3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/bge-m3`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({query:f(t.query,`query`,`text`),truncate_inputs:t[`truncate-inputs`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeM3.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({query:f(t.query,`query`,`text`),truncate_inputs:t[`truncate-inputs`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeM3.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Y={command:`bge-m3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return 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)`})}const Z={command:`create`,describe:`Runs inference on the @cf/baai/bge-reranker-base model.`,builder:X,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models baai bge-reranker-base create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/bge-reranker-base`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({query:f(n.query,`query`,`text`),top_k:n[`top-k`]}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.baai.bgeRerankerBase.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.query===void 0&&(n.query=await t(`query`,`A query you wish to perform against the provided contexts.`));let h=c({query:f(n.query,`query`,`text`),top_k:n[`top-k`]});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.baai.bgeRerankerBase.create({...h,account_id:p,...i})),{successLabel:`Created`})}},Q={command:`bge-reranker-base`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return 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)`})}const re={command:`create`,describe:`Runs inference on the @cf/baai/bge-small-en-v1.5 model.`,builder:ne,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai bge-small-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/bge-small-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeSmallEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.bgeSmallEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ie={command:`bge-small-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return 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)`})}const oe={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-base-en-v1.5 model.`,builder:ae,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai nonomni-bge-base-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeBaseEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeBaseEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},se={command:`nonomni-bge-base-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return 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)`})}const le={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-large-en-v1.5 model.`,builder:ce,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai nonomni-bge-large-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeLargeEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeLargeEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ue={command:`nonomni-bge-large-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return 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)`})}const fe={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-m3 model.`,builder:de,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai nonomni-bge-m3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-m3`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({query:f(t.query,`query`,`text`),truncate_inputs:t[`truncate-inputs`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeM3.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({query:f(t.query,`query`,`text`),truncate_inputs:t[`truncate-inputs`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeM3.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},pe={command:`nonomni-bge-m3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return 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)`})}const he={command:`create`,describe:`Runs inference on the @cf/baai/nonomni-bge-small-en-v1.5 model.`,builder:me,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models baai nonomni-bge-small-en-v1-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({pooling:f(t.pooling,`pooling`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeSmallEnV15.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({pooling:f(t.pooling,`pooling`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.baai.nonomniBgeSmallEnV15.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ge={command:`nonomni-bge-small-en-v1-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`baai`,describe:`Operations for models.baai`,builder:e=>e.command(U).command(K).command(Y).command(Q).command(ie).command(se).command(ue).command(pe).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ve(e){return 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)`})}const ye={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-1-schnell model.`,builder:ve,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models black-forest-labs flux-1-schnell create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-1-schnell`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({prompt:f(n.prompt,`prompt`,`text`),steps:n.steps}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.blackForestLabs.flux1Schnell.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let h=c({prompt:f(n.prompt,`prompt`,`text`),steps:n.steps});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.blackForestLabs.flux1Schnell.create({...h,account_id:p,...i})),{successLabel:`Created`})}},be={command:`flux-1-schnell`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return 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)`})}const Se={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-dev model.`,builder:xe,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models black-forest-labs flux-2-dev create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-dev`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Dev.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Dev.create({...p,account_id:s,...n})),{successLabel:`Created`})}},Ce={command:`flux-2-dev`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return 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)`})}const Te={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-klein-4b model.`,builder:we,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models black-forest-labs flux-2-klein-4b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-klein-4b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Klein4B.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Klein4B.create({...p,account_id:s,...n})),{successLabel:`Created`})}},Ee={command:`flux-2-klein-4b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function De(e){return 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)`})}const Oe={command:`create`,describe:`Runs inference on the @cf/black-forest-labs/flux-2-klein-9b model.`,builder:De,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models black-forest-labs flux-2-klein-9b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/black-forest-labs/flux-2-klein-9b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Klein9B.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({multipart:{contentType:f(t[`multipart-content-type`],`multipart-content-type`,`text`)}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.blackForestLabs.flux2Klein9B.create({...p,account_id:s,...n})),{successLabel:`Created`})}},ke={command:`flux-2-klein-9b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ae={command:`black-forest-labs`,describe:`Operations for models.black-forest-labs`,builder:e=>e.command(be).command(Ce).command(Ee).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function je(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Me={command:`create`,describe:`Runs inference on the @cf/bytedance/stable-diffusion-xl-lightning model.`,builder:je,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models bytedance stable-diffusion-xl-lightning create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,image:n.image,image_b64:f(n[`image-b64`],`image-b64`,`text`),mask:n.mask,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,strength:n.strength,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n.image!==void 0&&s(h,[`image`],n.image),n[`image-b64`]!==void 0&&s(h,[`image_b64`],f(n[`image-b64`],`image-b64`,`text`)),n.mask!==void 0&&s(h,[`mask`],n.mask),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.strength!==void 0&&s(h,[`strength`],n.strength),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},Ne={command:`stable-diffusion-xl-lightning`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pe={command:`bytedance`,describe:`Operations for models.bytedance`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-1-internal model.`,builder:Fe,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura-1-internal get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-1-internal`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura1Internal.get({account_id:i})),{successLabel:`Loaded`})}},Le={command:`aura-1-internal`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return 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)`})}const ze={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-1 model.`,builder:Re,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models deepgram aura-1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-1`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({bit_rate:n[`bit-rate`],container:f(n.container,`container`,`text`),encoding:f(n.encoding,`encoding`,`text`),sample_rate:n[`sample-rate`],speaker:f(n.speaker,`speaker`,`text`),text:f(n.text,`text`,`text`)}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.deepgram.aura1.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.text===void 0&&(n.text=await t(`text`,`The text content to be converted to speech`));let h=c({bit_rate:n[`bit-rate`],container:f(n.container,`container`,`text`),encoding:f(n.encoding,`encoding`,`text`),sample_rate:n[`sample-rate`],speaker:f(n.speaker,`speaker`,`text`),text:f(n.text,`text`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.deepgram.aura1.create({...h,account_id:p,...i})),{successLabel:`Created`})}};function Be(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ve={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-1 model.`,builder:Be,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura-1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-1`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura1.get({account_id:i})),{successLabel:`Loaded`})}},He={command:`aura-1`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ze).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ue(e){return 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)`})}const We={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-2-en model.`,builder:Ue,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models deepgram aura-2-en create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-2-en`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({bit_rate:t[`bit-rate`],container:f(t.container,`container`,`text`),encoding:f(t.encoding,`encoding`,`text`),sample_rate:t[`sample-rate`],speaker:f(t.speaker,`speaker`,`text`),text:f(t.text,`text`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.aura2En.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({bit_rate:t[`bit-rate`],container:f(t.container,`container`,`text`),encoding:f(t.encoding,`encoding`,`text`),sample_rate:t[`sample-rate`],speaker:f(t.speaker,`speaker`,`text`),text:f(t.text,`text`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.aura2En.create({...p,account_id:s,...n})),{successLabel:`Created`})}};function Ge(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2-en model.`,builder:Ge,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura-2-en get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-2-en`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura2En.get({account_id:i})),{successLabel:`Loaded`})}},qe={command:`aura-2-en`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(We).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Je(e){return 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)`})}const Ye={command:`create`,describe:`Runs inference on the @cf/deepgram/aura-2-es model.`,builder:Je,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models deepgram aura-2-es create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-2-es`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({bit_rate:t[`bit-rate`],container:f(t.container,`container`,`text`),encoding:f(t.encoding,`encoding`,`text`),sample_rate:t[`sample-rate`],speaker:f(t.speaker,`speaker`,`text`),text:f(t.text,`text`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.aura2Es.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({bit_rate:t[`bit-rate`],container:f(t.container,`container`,`text`),encoding:f(t.encoding,`encoding`,`text`),sample_rate:t[`sample-rate`],speaker:f(t.speaker,`speaker`,`text`),text:f(t.text,`text`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.aura2Es.create({...p,account_id:s,...n})),{successLabel:`Created`})}};function Xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2-es model.`,builder:Xe,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura-2-es get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-2-es`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura2Es.get({account_id:i})),{successLabel:`Loaded`})}},Qe={command:`aura-2-es`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ye).command(Ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $e(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura-2 model.`,builder:$e,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura-2 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura-2`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura2.get({account_id:i})),{successLabel:`Loaded`})}},tt={command:`aura-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/aura model.`,builder:nt,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram aura get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/aura`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.aura.get({account_id:i})),{successLabel:`Loaded`})}},it={command:`aura`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return 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)`})}const ot={command:`create`,describe:`Runs inference on the @cf/deepgram/flux model.`,builder:at,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models deepgram flux create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/flux`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({eager_eot_threshold:f(t[`eager-eot-threshold`],`eager-eot-threshold`,`text`),encoding:f(t.encoding,`encoding`,`text`),eot_threshold:f(t[`eot-threshold`],`eot-threshold`,`text`),eot_timeout_ms:f(t[`eot-timeout-ms`],`eot-timeout-ms`,`text`),keyterm:f(t.keyterm,`keyterm`,`text`),mip_opt_out:f(t[`mip-opt-out`],`mip-opt-out`,`text`),sample_rate:f(t[`sample-rate`],`sample-rate`,`text`),tag:f(t.tag,`tag`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.flux.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({eager_eot_threshold:f(t[`eager-eot-threshold`],`eager-eot-threshold`,`text`),encoding:f(t.encoding,`encoding`,`text`),eot_threshold:f(t[`eot-threshold`],`eot-threshold`,`text`),eot_timeout_ms:f(t[`eot-timeout-ms`],`eot-timeout-ms`,`text`),keyterm:f(t.keyterm,`keyterm`,`text`),mip_opt_out:f(t[`mip-opt-out`],`mip-opt-out`,`text`),sample_rate:f(t[`sample-rate`],`sample-rate`,`text`),tag:f(t.tag,`tag`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepgram.flux.create({...p,account_id:s,...n})),{successLabel:`Created`})}};function st(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/flux model.`,builder:st,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram flux get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/flux`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.flux.get({account_id:i})),{successLabel:`Loaded`})}},lt={command:`flux`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ot).command(ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ut(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3-internal model.`,builder:ut,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram nova-3-internal get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/nova-3-internal`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.nova3Internal.get({account_id:i})),{successLabel:`Loaded`})}},ft={command:`nova-3-internal`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3-ws model.`,builder:pt,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram nova-3-ws get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/nova-3-ws`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.nova3Ws.get({account_id:i})),{successLabel:`Loaded`})}},ht={command:`nova-3-ws`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gt(e){return 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)`})}const _t={command:`create`,describe:`Runs inference on the @cf/deepgram/nova-3 model.`,builder:gt,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models deepgram nova-3 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/nova-3`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({audio:{contentType:f(n[`audio-content-type`],`audio-content-type`,`text`)},channels:n.channels,custom_intent:f(n[`custom-intent`],`custom-intent`,`text`),custom_intent_mode:f(n[`custom-intent-mode`],`custom-intent-mode`,`text`),custom_topic:f(n[`custom-topic`],`custom-topic`,`text`),custom_topic_mode:f(n[`custom-topic-mode`],`custom-topic-mode`,`text`),detect_entities:n[`detect-entities`],detect_language:n[`detect-language`],diarize:n.diarize,dictation:n.dictation,encoding:f(n.encoding,`encoding`,`text`),endpointing:f(n.endpointing,`endpointing`,`text`),extra:f(n.extra,`extra`,`text`),filler_words:n[`filler-words`],interim_results:n[`interim-results`],keyterm:f(n.keyterm,`keyterm`,`text`),keywords:f(n.keywords,`keywords`,`text`),language:f(n.language,`language`,`text`),measurements:n.measurements,mip_opt_out:n[`mip-opt-out`],mode:f(n.mode,`mode`,`text`),multichannel:n.multichannel,numerals:n.numerals,paragraphs:n.paragraphs,profanity_filter:n[`profanity-filter`],punctuate:n.punctuate,redact:f(n.redact,`redact`,`text`),replace:f(n.replace,`replace`,`text`),search:f(n.search,`search`,`text`),sentiment:n.sentiment,smart_format:n[`smart-format`],topics:n.topics,utt_split:n[`utt-split`],utterance_end_ms:n[`utterance-end-ms`],utterances:n.utterances,vad_events:n[`vad-events`]}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.deepgram.nova3.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n[`audio-content-type`]===void 0&&(n[`audio-content-type`]=await t(`audio-content-type`,`The audio.contentType field`));let h=c({audio:{contentType:f(n[`audio-content-type`],`audio-content-type`,`text`)},channels:n.channels,custom_intent:f(n[`custom-intent`],`custom-intent`,`text`),custom_intent_mode:f(n[`custom-intent-mode`],`custom-intent-mode`,`text`),custom_topic:f(n[`custom-topic`],`custom-topic`,`text`),custom_topic_mode:f(n[`custom-topic-mode`],`custom-topic-mode`,`text`),detect_entities:n[`detect-entities`],detect_language:n[`detect-language`],diarize:n.diarize,dictation:n.dictation,encoding:f(n.encoding,`encoding`,`text`),endpointing:f(n.endpointing,`endpointing`,`text`),extra:f(n.extra,`extra`,`text`),filler_words:n[`filler-words`],interim_results:n[`interim-results`],keyterm:f(n.keyterm,`keyterm`,`text`),keywords:f(n.keywords,`keywords`,`text`),language:f(n.language,`language`,`text`),measurements:n.measurements,mip_opt_out:n[`mip-opt-out`],mode:f(n.mode,`mode`,`text`),multichannel:n.multichannel,numerals:n.numerals,paragraphs:n.paragraphs,profanity_filter:n[`profanity-filter`],punctuate:n.punctuate,redact:f(n.redact,`redact`,`text`),replace:f(n.replace,`replace`,`text`),search:f(n.search,`search`,`text`),sentiment:n.sentiment,smart_format:n[`smart-format`],topics:n.topics,utt_split:n[`utt-split`],utterance_end_ms:n[`utterance-end-ms`],utterances:n.utterances,vad_events:n[`vad-events`]});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.deepgram.nova3.create({...h,account_id:p,...i})),{successLabel:`Created`})}};function vt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yt={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/deepgram/nova-3 model.`,builder:vt,handler:async t=>{if(t.dryRun){u({command:`cf ai models deepgram nova-3 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepgram/nova-3`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.deepgram.nova3.get({account_id:i})),{successLabel:`Loaded`})}},bt={command:`nova-3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_t).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`deepgram`,describe:`Operations for models.deepgram`,builder:e=>e.command(it).command(He).command(Le).command(tt).command(qe).command(Qe).command(lt).command(bt).command(ft).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return 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)`})}const Ct={command:`create`,describe:`Runs inference on the @cf/deepseek-ai/deepseek-math-7b-instruct model.`,builder:St,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models deepseek-ai deepseek-math-7b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepseekAi.deepseekMath7BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepseekAi.deepseekMath7BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},wt={command:`deepseek-math-7b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tt(e){return 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)`})}const Et={command:`create`,describe:`Runs inference on the @cf/deepseek-ai/deepseek-r1-distill-qwen-32b model.`,builder:Tt,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models deepseek-ai deepseek-r1-distill-qwen-32b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepseekAi.deepseekR1DistillQwen32B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.deepseekAi.deepseekR1DistillQwen32B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Dt={command:`deepseek-r1-distill-qwen-32b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`deepseek-ai`,describe:`Operations for models.deepseek-ai`,builder:e=>e.command(wt).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(e){return 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)`})}const At={command:`create`,describe:`Runs inference on the @cf/defog/sqlcoder-7b-2 model.`,builder:kt,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models defog sqlcoder-7b-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/defog/sqlcoder-7b-2`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.defog.sqlcoder7B2.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.defog.sqlcoder7B2.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},jt={command:`sqlcoder-7b-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mt={command:`defog`,describe:`Operations for models.defog`,builder:e=>e.command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nt(e){return 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)`})}const Pt={command:`create`,describe:`Runs inference on the @cf/facebook/bart-large-cnn model.`,builder:Nt,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models facebook bart-large-cnn create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/facebook/bart-large-cnn`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({input_text:f(n[`input-text`],`input-text`,`text`),max_length:n[`max-length`]}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.facebook.bartLargeCnn.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n[`input-text`]===void 0&&(n[`input-text`]=await t(`input-text`,`The text that you want the model to summarize`));let h=c({input_text:f(n[`input-text`],`input-text`,`text`),max_length:n[`max-length`]});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.facebook.bartLargeCnn.create({...h,account_id:p,...i})),{successLabel:`Created`})}},Ft={command:`bart-large-cnn`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function It(e){return 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)`})}const Lt={command:`create`,describe:`Runs inference on the @cf/facebook/nonomni-bart-large-cnn model.`,builder:It,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models facebook nonomni-bart-large-cnn create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/facebook/nonomni-bart-large-cnn`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({input_text:f(n[`input-text`],`input-text`,`text`),max_length:n[`max-length`]}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.facebook.nonomniBartLargeCnn.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n[`input-text`]===void 0&&(n[`input-text`]=await t(`input-text`,`The text that you want the model to summarize`));let h=c({input_text:f(n[`input-text`],`input-text`,`text`),max_length:n[`max-length`]});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.facebook.nonomniBartLargeCnn.create({...h,account_id:p,...i})),{successLabel:`Created`})}},Rt={command:`nonomni-bart-large-cnn`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zt(e){return 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`})}const Bt={command:`create`,describe:`Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model.`,builder:zt,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models facebook nonomni-detr-resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/facebook/nonomni-detr-resnet-50`,pathParams:{},query:n,bodyKind:`octet-stream`,body:t.body});return}let o=await a(t),s=t.local?m:await r(o);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/facebook/nonomni-detr-resnet-50`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/facebook/nonomni-detr-resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Vt={command:`nonomni-detr-resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`facebook`,describe:`Operations for models.facebook`,builder:e=>e.command(Ft).command(Rt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ut(e){return 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)`})}const Wt={command:`create`,describe:`Runs inference on the @cf/fblgit/una-cybertron-7b-v2-bf16 model.`,builder:Ut,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models fblgit una-cybertron-7b-v2-bf16 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.fblgit.unaCybertron7Bv2Bf16.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.fblgit.unaCybertron7Bv2Bf16.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Gt={command:`una-cybertron-7b-v2-bf16`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Kt={command:`fblgit`,describe:`Operations for models.fblgit`,builder:e=>e.command(Gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qt(e){return 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)`})}const Jt={command:`create`,describe:`Runs inference on the @cf/google/embeddinggemma-300m model.`,builder:qt,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google embeddinggemma-300m create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/google/embeddinggemma-300m`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?void 0:o(t.body)});return}let s=await a(t),c=t.local?m:await r(s);if(t.accountId=c,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.google.embeddinggemma300M.create({...e,account_id:c,...n})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>i(s,`POST`,`/accounts/${c}/ai/run/@cf/google/embeddinggemma-300m`,{query:n})),{successLabel:`Created`})}},Yt={command:`embeddinggemma-300m`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xt(e){return 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)`})}const Zt={command:`create`,describe:`Runs inference on the @cf/google/gemma-2b-it-lora model.`,builder:Xt,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google gemma-2b-it-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/google/gemma-2b-it-lora`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma2BItLora.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma2BItLora.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Qt={command:`gemma-2b-it-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $t(e){return 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)`})}const en={command:`create`,describe:`Runs inference on the @cf/google/gemma-3-12b-it model.`,builder:$t,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google gemma-3-12b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/google/gemma-3-12b-it`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma312BIt.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma312BIt.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},tn={command:`gemma-3-12b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(en).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nn(e){return 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)`})}const rn={command:`create`,describe:`Runs inference on the @cf/google/gemma-7b-it-lora model.`,builder:nn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google gemma-7b-it-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/google/gemma-7b-it-lora`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma7BItLora.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma7BItLora.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},an={command:`gemma-7b-it-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(rn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function on(e){return 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)`})}const sn={command:`create`,describe:`Runs inference on the @hf/google/gemma-7b-it model.`,builder:on,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google gemma-7b-it create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/google/gemma-7b-it`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma7BIt.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.google.gemma7BIt.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},cn={command:`gemma-7b-it`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ln(e){return 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)`})}const un={command:`create`,describe:`Runs inference on the @cf/google/nonomni-embeddinggemma-300m model.`,builder:ln,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models google nonomni-embeddinggemma-300m create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/google/nonomni-embeddinggemma-300m`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?void 0:o(t.body)});return}let s=await a(t),c=t.local?m:await r(s);if(t.accountId=c,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.google.nonomniEmbeddinggemma300M.create({...e,account_id:c,...n})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>i(s,`POST`,`/accounts/${c}/ai/run/@cf/google/nonomni-embeddinggemma-300m`,{query:n})),{successLabel:`Created`})}},dn={command:`nonomni-embeddinggemma-300m`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(un).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fn={command:`google`,describe:`Operations for models.google`,builder:e=>e.command(Yt).command(Qt).command(tn).command(cn).command(an).command(dn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pn(e){return 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)`})}const mn={command:`create`,describe:`Runs inference on the @cf/huggingface/distilbert-sst-2-int8 model.`,builder:pn,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models huggingface distilbert-sst-2-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/huggingface/distilbert-sst-2-int8`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({text:f(n.text,`text`,`text`)}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.huggingface.distilbertSst2Int8.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.text===void 0&&(n.text=await t(`text`,`The text that you want to classify`));let h=c({text:f(n.text,`text`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.huggingface.distilbertSst2Int8.create({...h,account_id:p,...i})),{successLabel:`Created`})}},hn={command:`distilbert-sst-2-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gn(e){return 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)`})}const _n={command:`create`,describe:`Runs inference on the @cf/huggingface/nonomni-distilbert-sst-2-int8 model.`,builder:gn,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models huggingface nonomni-distilbert-sst-2-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({text:f(n.text,`text`,`text`)}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.huggingface.nonomniDistilbertSst2Int8.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.text===void 0&&(n.text=await t(`text`,`The text that you want to classify`));let h=c({text:f(n.text,`text`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.huggingface.nonomniDistilbertSst2Int8.create({...h,account_id:p,...i})),{successLabel:`Created`})}},vn={command:`nonomni-distilbert-sst-2-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yn={command:`huggingface`,describe:`Operations for models.huggingface`,builder:e=>e.command(hn).command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bn(e){return 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)`})}const xn={command:`create`,describe:`Runs inference on the @cf/ibm-granite/granite-4.0-h-micro model.`,builder:bn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models ibm granite-granite-4-0-h-micro create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/ibm-granite/granite-4.0-h-micro`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.ibm.graniteGranite40HMicro.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.ibm.graniteGranite40HMicro.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Sn={command:`granite-granite-4-0-h-micro`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Cn={command:`ibm`,describe:`Operations for models.ibm`,builder:e=>e.command(Sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wn(e){return 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)`})}const Tn={command:`create`,describe:`Runs inference on the @cf/leonardo/lucid-origin model.`,builder:wn,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models leonardo lucid-origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/leonardo/lucid-origin`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,steps:n.steps,width:n.width}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.leonardo.lucidOrigin.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let h=c({guidance:n.guidance,height:n.height,num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,steps:n.steps,width:n.width});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.leonardo.lucidOrigin.create({...h,account_id:p,...i})),{successLabel:`Created`})}},En={command:`lucid-origin`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Dn(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const On={command:`create`,describe:`Runs inference on the @cf/leonardo/phoenix-1.0 model.`,builder:Dn,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models leonardo phoenix-1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/leonardo/phoenix-1.0`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/leonardo/phoenix-1.0${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate.`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/leonardo/phoenix-1.0${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},kn={command:`phoenix-1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(On).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},An={command:`leonardo`,describe:`Operations for models.leonardo`,builder:e=>e.command(En).command(kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jn(e){return 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`}).option(`search`,{type:`string`,description:`Search`}).option(`include-deprecated`,{type:`boolean`,description:`If true, include models whose planned_deprecation_date is in the past — but only within a three-month grace window after that date. Models whose planned_deprecation_date is more than three months in the past remain hidden regardless of this flag. Future planned-deprecation dates are always included regardless of this flag. Defaults to false, preserving the existing behavior of hiding all past-dated deprecations.`}).option(`format`,{type:`string`,description:`If set, return models in the requested marketplace format instead of the default response.`,choices:[`openrouter`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mn={command:`list`,describe:`Searches Workers AI models by name or description.`,builder:h(jn),handler:async t=>{let n={per_page:t[`per-page`],page:t.page,task:t.task,author:t.author,source:t.source,hide_experimental:t[`hide-experimental`],search:t.search,include_deprecated:t[`include-deprecated`],format:t.format};if(t.dryRun){u({command:`cf ai models list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/models/search`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?m:await r(i);t.accountId=o,l(await d(`Loading`,async()=>i.ai.models.list({account_id:o,...n})),{successLabel:`Loaded`})}};function Nn(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Pn={command:`create`,describe:`Runs inference on the @cf/lykon/dreamshaper-8-lcm model.`,builder:Nn,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models lykon dreamshaper-8-lcm create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/lykon/dreamshaper-8-lcm`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,image:n.image,image_b64:f(n[`image-b64`],`image-b64`,`text`),mask:n.mask,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,strength:n.strength,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/lykon/dreamshaper-8-lcm${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n.image!==void 0&&s(h,[`image`],n.image),n[`image-b64`]!==void 0&&s(h,[`image_b64`],f(n[`image-b64`],`image-b64`,`text`)),n.mask!==void 0&&s(h,[`mask`],n.mask),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.strength!==void 0&&s(h,[`strength`],n.strength),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/lykon/dreamshaper-8-lcm${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},Fn={command:`dreamshaper-8-lcm`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},In={command:`lykon`,describe:`Operations for models.lykon`,builder:e=>e.command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ln(e){return 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)`})}const Rn={command:`create`,describe:`Runs inference on the @cf/meta/llama-2-7b-chat-fp16 model.`,builder:Ln,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-2-7b-chat-fp16 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-2-7b-chat-fp16`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama27BChatFp16.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama27BChatFp16.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},zn={command:`llama-2-7b-chat-fp16`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Rn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bn(e){return 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)`})}const Vn={command:`create`,describe:`Runs inference on the @cf/meta/llama-2-7b-chat-int8 model.`,builder:Bn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-2-7b-chat-int8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-2-7b-chat-int8`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama27BChatInt8.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama27BChatInt8.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Hn={command:`llama-2-7b-chat-int8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Un(e){return 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)`})}const Wn={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-awq model.`,builder:Un,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-1-8b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Gn={command:`llama-3-1-8b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Kn(e){return 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)`})}const qn={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8-fast model.`,builder:Kn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-1-8b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructFp8Fast.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructFp8Fast.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Jn={command:`llama-3-1-8b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yn(e){return 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)`})}const Xn={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8 model.`,builder:Yn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-1-8b-instruct-fp8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructFp8.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama318BInstructFp8.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Zn={command:`llama-3-1-8b-instruct-fp8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qn(e){return 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)`})}const $n={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.1-70b-instruct-fp8-fast model.`,builder:Qn,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-1-70b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3170BInstructFp8Fast.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3170BInstructFp8Fast.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},er={command:`llama-3-1-70b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command($n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tr(e){return 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)`})}const nr={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-1b-instruct model.`,builder:tr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-2-1b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.2-1b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama321BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama321BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},rr={command:`llama-3-2-1b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(nr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ir(e){return 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)`})}const ar={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-3b-instruct model.`,builder:ir,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-2-3b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.2-3b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama323BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama323BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},or={command:`llama-3-2-3b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ar).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sr(e){return 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)`})}const cr={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.2-11b-vision-instruct model.`,builder:sr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-2-11b-vision-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3211BVisionInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3211BVisionInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},lr={command:`llama-3-2-11b-vision-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(cr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ur(e){return 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)`})}const dr={command:`create`,describe:`Runs inference on the @cf/meta/llama-3.3-70b-instruct-fp8-fast model.`,builder:ur,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-3-70b-instruct-fp8-fast create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3370BInstructFp8Fast.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama3370BInstructFp8Fast.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},fr={command:`llama-3-3-70b-instruct-fp8-fast`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pr(e){return 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)`})}const mr={command:`create`,describe:`Runs inference on the @cf/meta/llama-3-8b-instruct-awq model.`,builder:pr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-8b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3-8b-instruct-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama38BInstructAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama38BInstructAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},hr={command:`llama-3-8b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gr(e){return 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)`})}const _r={command:`create`,describe:`Runs inference on the @cf/meta/llama-3-8b-instruct model.`,builder:gr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-3-8b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-3-8b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama38BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama38BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},$={command:`llama-3-8b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vr(e){return 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)`})}const yr={command:`create`,describe:`Runs inference on the @cf/meta/llama-4-scout-17b-16e-instruct model.`,builder:vr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-4-scout-17b-16e-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama4Scout17B16EInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llama4Scout17B16EInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},br={command:`llama-4-scout-17b-16e-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(yr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xr(e){return 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)`})}const Sr={command:`create`,describe:`Runs inference on the @cf/meta/llama-guard-3-8b model.`,builder:xr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-guard-3-8b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/llama-guard-3-8b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({max_tokens:t[`max-tokens`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},temperature:t.temperature}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llamaGuard38B.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({max_tokens:t[`max-tokens`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},temperature:t.temperature});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llamaGuard38B.create({...p,account_id:s,...n})),{successLabel:`Created`})}},Cr={command:`llama-guard-3-8b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wr(e){return 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)`})}const Tr={command:`create`,describe:`Runs inference on the @cf/meta-llama/llama-2-7b-chat-hf-lora model.`,builder:wr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta llama-llama-2-7b-chat-hf-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llamaLlama27BChatHfLora.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.llamaLlama27BChatHfLora.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Er={command:`llama-llama-2-7b-chat-hf-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Dr(e){return 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`])}const Or={command:`create`,describe:`Runs inference on the @cf/meta/m2m100-1.2b model.`,builder:Dr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models meta m2m100-1-2b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/meta/m2m100-1.2b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({source_lang:f(t[`source-lang`],`source-lang`,`text`),target_lang:f(t[`target-lang`],`target-lang`,`text`),text:f(t.text,`text`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.m2M10012B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({source_lang:f(t[`source-lang`],`source-lang`,`text`),target_lang:f(t[`target-lang`],`target-lang`,`text`),text:f(t.text,`text`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.meta.m2M10012B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},kr={command:`m2m100-1-2b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ar={command:`meta`,describe:`Operations for models.meta`,builder:e=>e.command(zn).command(Hn).command(er).command(Gn).command(Zn).command(Jn).command(lr).command(rr).command(or).command(fr).command($).command(hr).command(br).command(Cr).command(Er).command(kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jr(e){return 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`})}const Mr={command:`create`,describe:`Runs inference on the @cf/microsoft/nonomni-resnet-50 model.`,builder:jr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models microsoft nonomni-resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/microsoft/nonomni-resnet-50`,pathParams:{},query:n,bodyKind:`octet-stream`,body:t.body});return}let o=await a(t),s=t.local?m:await r(o);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/microsoft/nonomni-resnet-50`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/microsoft/nonomni-resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Nr={command:`nonomni-resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pr(e){return 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)`})}const Fr={command:`create`,describe:`Runs inference on the @cf/microsoft/phi-2 model.`,builder:Pr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models microsoft phi-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/microsoft/phi-2`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.microsoft.phi2.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.microsoft.phi2.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Ir={command:`phi-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lr(e){return 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`})}const Rr={command:`create`,describe:`Runs inference on the @cf/microsoft/resnet-50 model.`,builder:Lr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models microsoft resnet-50 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/microsoft/resnet-50`,pathParams:{},query:n,bodyKind:`octet-stream`,body:t.body});return}let o=await a(t),s=t.local?m:await r(o);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/microsoft/resnet-50`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/microsoft/resnet-50${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},zr={command:`resnet-50`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Br={command:`microsoft`,describe:`Operations for models.microsoft`,builder:e=>e.command(Nr).command(Ir).command(zr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vr(e){return 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)`})}const Hr={command:`create`,describe:`Runs inference on the @cf/mistral/mistral-7b-instruct-v0.1 model.`,builder:Vr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models mistral mistral-7b-instruct-v0-1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV01.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV01.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Ur={command:`mistral-7b-instruct-v0-1`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Hr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wr(e){return 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)`})}const Gr={command:`create`,describe:`Runs inference on the @cf/mistral/mistral-7b-instruct-v0.2-lora model.`,builder:Wr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models mistral mistral-7b-instruct-v0-2-lora create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV02Lora.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV02Lora.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Kr={command:`mistral-7b-instruct-v0-2-lora`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qr(e){return 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)`})}const Jr={command:`create`,describe:`Runs inference on the @hf/mistral/mistral-7b-instruct-v0.2 model.`,builder:qr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models mistral mistral-7b-instruct-v0-2 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV02.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistral.mistral7BInstructV02.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Yr={command:`mistral-7b-instruct-v0-2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Xr={command:`mistral`,describe:`Operations for models.mistral`,builder:e=>e.command(Ur).command(Yr).command(Kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zr(e){return 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)`})}const Qr={command:`create`,describe:`Runs inference on the @cf/mistralai/mistral-small-3.1-24b-instruct model.`,builder:Zr,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models mistralai mistral-small-3-1-24b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistralai.mistralSmall3124BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.mistralai.mistralSmall3124BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},$r={command:`mistral-small-3-1-24b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ei={command:`mistralai`,describe:`Operations for models.mistralai`,builder:e=>e.command($r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ti(e){return 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)`})}const ni={command:`create`,describe:`Runs inference on the @cf/moonshotai/kimi-k2.5 model.`,builder:ti,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models moonshotai kimi-k2-5 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/moonshotai/kimi-k2.5`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?void 0:o(t.body)});return}let s=await a(t),c=t.local?m:await r(s);if(t.accountId=c,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.moonshotai.kimiK25.create({body:e,account_id:c,...n})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>i(s,`POST`,`/accounts/${c}/ai/run/@cf/moonshotai/kimi-k2.5`,{query:n})),{successLabel:`Created`})}},ri={command:`kimi-k2-5`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ii={command:`moonshotai`,describe:`Operations for models.moonshotai`,builder:e=>e.command(ri).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ai(e){return 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)`})}const oi={command:`create`,describe:`Runs inference on the @cf/myshell-ai/melotts model.`,builder:ai,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models myshell-ai melotts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/myshell-ai/melotts`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({lang:f(n.lang,`lang`,`text`),prompt:f(n.prompt,`prompt`,`text`)}):o(n.body)});return}let s=await a(n),p=n.local?m:await r(s);if(n.accountId=p,n.body){let e=o(n.body);new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.myshellAi.melotts.create({...e,account_id:p,...i})),{successLabel:`Created`});return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the audio you want to generate`));let h=c({lang:f(n.lang,`lang`,`text`),prompt:f(n.prompt,`prompt`,`text`)});new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.myshellAi.melotts.create({...h,account_id:p,...i})),{successLabel:`Created`})}},si={command:`melotts`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ci={command:`myshell-ai`,describe:`Operations for models.myshell-ai`,builder:e=>e.command(si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function li(e){return 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)`})}const ui={command:`create`,describe:`Runs inference on the @hf/nexusflow/starling-lm-7b-beta model.`,builder:li,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models nexusflow starling-lm-7b-beta create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/nexusflow/starling-lm-7b-beta`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nexusflow.starlingLm7BBeta.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nexusflow.starlingLm7BBeta.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},di={command:`starling-lm-7b-beta`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ui).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fi={command:`nexusflow`,describe:`Operations for models.nexusflow`,builder:e=>e.command(di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pi(e){return 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)`})}const mi={command:`create`,describe:`Runs inference on the @hf/nousresearch/hermes-2-pro-mistral-7b model.`,builder:pi,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models nousresearch hermes-2-pro-mistral-7b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nousresearch.hermes2ProMistral7B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nousresearch.hermes2ProMistral7B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},hi={command:`hermes-2-pro-mistral-7b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gi={command:`nousresearch`,describe:`Operations for models.nousresearch`,builder:e=>e.command(hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _i(e){return 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)`})}const vi={command:`create`,describe:`Runs inference on the @cf/nvidia/nemotron-3-120b-a12b model.`,builder:_i,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models nvidia nemotron-3-120b-a12b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/nvidia/nemotron-3-120b-a12b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({chat_template_kwargs:{clear_thinking:t[`chat-template-kwargs-clear-thinking`],enable_thinking:t[`chat-template-kwargs-enable-thinking`]},frequency_penalty:t[`frequency-penalty`],logprobs:t.logprobs,max_completion_tokens:t[`max-completion-tokens`],max_tokens:t[`max-tokens`],modalities:t.modalities,model:f(t.model,`model`,`text`),n:t.n,parallel_tool_calls:t[`parallel-tool-calls`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),reasoning_effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),seed:t.seed,service_tier:f(t[`service-tier`],`service-tier`,`text`),store:t.store,stream:t.stream,temperature:t.temperature,top_logprobs:t[`top-logprobs`],top_p:t[`top-p`],user:f(t.user,`user`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nvidia.nemotron3120Ba12B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({chat_template_kwargs:{clear_thinking:t[`chat-template-kwargs-clear-thinking`],enable_thinking:t[`chat-template-kwargs-enable-thinking`]},frequency_penalty:t[`frequency-penalty`],logprobs:t.logprobs,max_completion_tokens:t[`max-completion-tokens`],max_tokens:t[`max-tokens`],modalities:t.modalities,model:f(t.model,`model`,`text`),n:t.n,parallel_tool_calls:t[`parallel-tool-calls`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),reasoning_effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),seed:t.seed,service_tier:f(t[`service-tier`],`service-tier`,`text`),store:t.store,stream:t.stream,temperature:t.temperature,top_logprobs:t[`top-logprobs`],top_p:t[`top-p`],user:f(t.user,`user`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.nvidia.nemotron3120Ba12B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},yi={command:`nemotron-3-120b-a12b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bi={command:`nvidia`,describe:`Operations for models.nvidia`,builder:e=>e.command(yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xi(e){return 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)`})}const Si={command:`create`,describe:`Runs inference on the @cf/openai/gpt-oss-20b model.`,builder:xi,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openai gpt-oss-20b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openai/gpt-oss-20b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({reasoning:{effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),summary:f(t[`reasoning-summary`],`reasoning-summary`,`text`)}}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.gptOss20B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({reasoning:{effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),summary:f(t[`reasoning-summary`],`reasoning-summary`,`text`)}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.gptOss20B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Ci={command:`gpt-oss-20b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wi(e){return 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)`})}const Ti={command:`create`,describe:`Runs inference on the @cf/openai/gpt-oss-120b model.`,builder:wi,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openai gpt-oss-120b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openai/gpt-oss-120b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({reasoning:{effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),summary:f(t[`reasoning-summary`],`reasoning-summary`,`text`)}}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.gptOss120B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({reasoning:{effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),summary:f(t[`reasoning-summary`],`reasoning-summary`,`text`)}});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.gptOss120B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Ei={command:`gpt-oss-120b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Di(e){return 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)`})}const Oi={command:`create`,describe:`Runs inference on the @cf/openai/whisper-large-v3-turbo model.`,builder:Di,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openai whisper-large-v3-turbo create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openai/whisper-large-v3-turbo`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({beam_size:t[`beam-size`],compression_ratio_threshold:t[`compression-ratio-threshold`],condition_on_previous_text:t[`condition-on-previous-text`],hallucination_silence_threshold:t[`hallucination-silence-threshold`],initial_prompt:f(t[`initial-prompt`],`initial-prompt`,`text`),language:f(t.language,`language`,`text`),log_prob_threshold:t[`log-prob-threshold`],no_speech_threshold:t[`no-speech-threshold`],prefix:f(t.prefix,`prefix`,`text`),task:f(t.task,`task`,`text`),vad_filter:t[`vad-filter`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.whisperLargeV3Turbo.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({beam_size:t[`beam-size`],compression_ratio_threshold:t[`compression-ratio-threshold`],condition_on_previous_text:t[`condition-on-previous-text`],hallucination_silence_threshold:t[`hallucination-silence-threshold`],initial_prompt:f(t[`initial-prompt`],`initial-prompt`,`text`),language:f(t.language,`language`,`text`),log_prob_threshold:t[`log-prob-threshold`],no_speech_threshold:t[`no-speech-threshold`],prefix:f(t.prefix,`prefix`,`text`),task:f(t.task,`task`,`text`),vad_filter:t[`vad-filter`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openai.whisperLargeV3Turbo.create({...p,account_id:s,...n})),{successLabel:`Created`})}},ki={command:`whisper-large-v3-turbo`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ai(e){return 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`})}const ji={command:`create`,describe:`Runs inference on the @cf/openai/whisper-tiny-en model.`,builder:Ai,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openai whisper-tiny-en create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openai/whisper-tiny-en`,pathParams:{},query:n,bodyKind:`octet-stream`,body:t.body});return}let o=await a(t),s=t.local?m:await r(o);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/openai/whisper-tiny-en`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/openai/whisper-tiny-en${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Mi={command:`whisper-tiny-en`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ni(e){return 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`})}const Pi={command:`create`,describe:`Runs inference on the @cf/openai/whisper model.`,builder:Ni,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openai whisper create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openai/whisper`,pathParams:{},query:n,bodyKind:`octet-stream`,body:t.body});return}let o=await a(t),s=t.local?m:await r(o);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/openai/whisper`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),r=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>i(o,`POST`,`/accounts/${s}/ai/run/@cf/openai/whisper${r?`?`+r:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Fi={command:`whisper`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ii={command:`openai`,describe:`Operations for models.openai`,builder:e=>e.command(Ei).command(Ci).command(Fi).command(ki).command(Mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Li(e){return 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)`})}const Ri={command:`create`,describe:`Runs inference on the @cf/openchat/openchat-3.5-0106 model.`,builder:Li,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models openchat openchat-3-5-0106 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/openchat/openchat-3.5-0106`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openchat.openchat350106.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.openchat.openchat350106.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},zi={command:`openchat-3-5-0106`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ri).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bi={command:`openchat`,describe:`Operations for models.openchat`,builder:e=>e.command(zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vi(e){return 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)`})}const Hi={command:`create`,describe:`Runs inference on the @cf/pfnet/plamo-embedding-1b model.`,builder:Vi,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models pfnet plamo-embedding-1b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/pfnet/plamo-embedding-1b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?void 0:o(t.body)});return}let s=await a(t),c=t.local?m:await r(s);if(t.accountId=c,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>s.ai.models.pfnet.plamoEmbedding1B.create({...e,account_id:c,...n})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>i(s,`POST`,`/accounts/${c}/ai/run/@cf/pfnet/plamo-embedding-1b`,{query:n})),{successLabel:`Created`})}},Ui={command:`plamo-embedding-1b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wi={command:`pfnet`,describe:`Operations for models.pfnet`,builder:e=>e.command(Ui).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gi(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ki={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/pipecat-ai/smart-turn-v2 model.`,builder:Gi,handler:async t=>{if(t.dryRun){u({command:`cf ai models pipecat-ai smart-turn-v2 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/pipecat-ai/smart-turn-v2`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.pipecatAi.smartTurnV2.get({account_id:i})),{successLabel:`Loaded`})}},qi={command:`smart-turn-v2`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ki).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ji(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yi={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/pipecat-ai/smart-turn-v3 model.`,builder:Ji,handler:async t=>{if(t.dryRun){u({command:`cf ai models pipecat-ai smart-turn-v3 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/pipecat-ai/smart-turn-v3`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.pipecatAi.smartTurnV3.get({account_id:i})),{successLabel:`Loaded`})}},Xi={command:`smart-turn-v3`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zi={command:`pipecat-ai`,describe:`Operations for models.pipecat-ai`,builder:e=>e.command(qi).command(Xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qi(e){return 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)`})}const $i={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-0.5b-chat model.`,builder:Qi,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen1-5-0-5b-chat create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-0.5b-chat`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1505BChat.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1505BChat.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ea={command:`qwen1-5-0-5b-chat`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command($i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ta(e){return 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)`})}const na={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-1.8b-chat model.`,builder:ta,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen1-5-1-8b-chat create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-1.8b-chat`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1518BChat.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1518BChat.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ra={command:`qwen1-5-1-8b-chat`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ia(e){return 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)`})}const aa={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-7b-chat-awq model.`,builder:ia,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen1-5-7b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen157BChatAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen157BChatAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},oa={command:`qwen1-5-7b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(aa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function sa(e){return 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)`})}const ca={command:`create`,describe:`Runs inference on the @cf/qwen/qwen1.5-14b-chat-awq model.`,builder:sa,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen1-5-14b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1514BChatAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen1514BChatAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},la={command:`qwen1-5-14b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ua(e){return 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)`})}const da={command:`create`,describe:`Runs inference on the @cf/qwen/qwen2.5-coder-32b-instruct model.`,builder:ua,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen2-5-coder-32b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen25Coder32BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen25Coder32BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},fa={command:`qwen2-5-coder-32b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pa(e){return 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)`})}const ma={command:`create`,describe:`Runs inference on the @cf/qwen/qwen3-30b-a3b-fp8 model.`,builder:pa,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen3-30b-a3b-fp8 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen330Ba3BFp8.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen330Ba3BFp8.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ha={command:`qwen3-30b-a3b-fp8`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ga(e){return 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)`})}const _a={command:`create`,describe:`Runs inference on the @cf/qwen/qwen3-embedding-0.6b model.`,builder:ga,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwen3-embedding-0-6b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwen3-embedding-0.6b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({instruction:f(t.instruction,`instruction`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen3Embedding06B.create({...e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({instruction:f(t.instruction,`instruction`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwen3Embedding06B.create({...p,account_id:s,...n})),{successLabel:`Created`})}},va={command:`qwen3-embedding-0-6b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(_a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ya(e){return 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)`})}const ba={command:`create`,describe:`Runs inference on the @cf/qwen/qwq-32b model.`,builder:ya,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models qwen qwq-32b create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/qwen/qwq-32b`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwq32B.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.qwen.qwq32B.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},xa={command:`qwq-32b`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(ba).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Sa={command:`qwen`,describe:`Operations for models.qwen`,builder:e=>e.command(ea).command(ra).command(la).command(oa).command(fa).command(ha).command(va).command(xa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ca(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const wa={command:`create`,describe:`Runs inference on the @cf/runwayml/stable-diffusion-v1-5-img2img model.`,builder:Ca,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models runwayml stable-diffusion-v1-5-img2img create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,image:n.image,image_b64:f(n[`image-b64`],`image-b64`,`text`),mask:n.mask,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,strength:n.strength,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n.image!==void 0&&s(h,[`image`],n.image),n[`image-b64`]!==void 0&&s(h,[`image_b64`],f(n[`image-b64`],`image-b64`,`text`)),n.mask!==void 0&&s(h,[`mask`],n.mask),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.strength!==void 0&&s(h,[`strength`],n.strength),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},Ta={command:`stable-diffusion-v1-5-img2img`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ea(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Da={command:`create`,describe:`Runs inference on the @cf/runwayml/stable-diffusion-v1-5-inpainting model.`,builder:Ea,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models runwayml stable-diffusion-v1-5-inpainting create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,image:n.image,image_b64:f(n[`image-b64`],`image-b64`,`text`),mask:n.mask,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,strength:n.strength,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n.image!==void 0&&s(h,[`image`],n.image),n[`image-b64`]!==void 0&&s(h,[`image_b64`],f(n[`image-b64`],`image-b64`,`text`)),n.mask!==void 0&&s(h,[`mask`],n.mask),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.strength!==void 0&&s(h,[`strength`],n.strength),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},Oa={command:`stable-diffusion-v1-5-inpainting`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ka={command:`runwayml`,describe:`Operations for models.runwayml`,builder:e=>e.command(Ta).command(Oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Aa(e){return e.option(`model`,{type:`string`,description:`Model Name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ja={command:`get`,describe:`Retrieves the input and output JSON schema definition for a Workers AI model.`,builder:Aa,handler:async t=>{let n={model:t.model};if(t.dryRun){u({command:`cf ai models schema get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/models/schema`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?m:await r(i);t.accountId=o,l(await d(`Loading`,async()=>i.ai.models.schema.get({account_id:o,...n})),{successLabel:`Loaded`})}},Ma={command:`schema`,describe:`Search the Workers AI model catalog and retrieve input/output schemas`,builder:e=>e.command(ja).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Na(e){return 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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Pa={command:`create`,describe:`Runs inference on the @cf/stabilityai/stable-diffusion-xl-base-1.0 model.`,builder:Na,handler:async n=>{let i={queueRequest:n[`queue-request`],tags:n.tags};if(n.dryRun){u({command:`cf ai models stabilityai stable-diffusion-xl-base-1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0`,pathParams:{},query:i,bodyKind:`json`,body:n.body===void 0?c({guidance:n.guidance,height:n.height,image:n.image,image_b64:f(n[`image-b64`],`image-b64`,`text`),mask:n.mask,negative_prompt:f(n[`negative-prompt`],`negative-prompt`,`text`),num_steps:n[`num-steps`],prompt:f(n.prompt,`prompt`,`text`),seed:n.seed,strength:n.strength,width:n.width}):o(n.body)});return}let l=await a(n),p=n.local?m:await r(l);if(n.accountId=p,n.body){let e=o(n.body),t=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0${t?`?`+t:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:JSON.stringify(e),contentType:`application/json`}));g(n.text===!0?r.toString(`utf-8`):r);return}n.prompt===void 0&&(n.prompt=await t(`prompt`,`A text description of the image you want to generate`));let h={};n.guidance!==void 0&&s(h,[`guidance`],n.guidance),n.height!==void 0&&s(h,[`height`],n.height),n.image!==void 0&&s(h,[`image`],n.image),n[`image-b64`]!==void 0&&s(h,[`image_b64`],f(n[`image-b64`],`image-b64`,`text`)),n.mask!==void 0&&s(h,[`mask`],n.mask),n[`negative-prompt`]!==void 0&&s(h,[`negative_prompt`],f(n[`negative-prompt`],`negative-prompt`,`text`)),n[`num-steps`]!==void 0&&s(h,[`num_steps`],n[`num-steps`]),n.prompt!==void 0&&s(h,[`prompt`],f(n.prompt,`prompt`,`text`)),n.seed!==void 0&&s(h,[`seed`],n.seed),n.strength!==void 0&&s(h,[`strength`],n.strength),n.width!==void 0&&s(h,[`width`],n.width);let v=new URLSearchParams(Object.entries(i).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),y=await d(`Creating`,async()=>_(`/accounts/${p}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0${v?`?`+v:``}`,{method:`POST`,localEndpoint:n.local?n.localEndpoint:void 0,body:Object.keys(h).length>0?h:void 0}));g(n.text===!0?y.toString(`utf-8`):y)}},Fa={command:`stable-diffusion-xl-base-1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Pa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ia={command:`stabilityai`,describe:`Operations for models.stabilityai`,builder:e=>e.command(Fa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function La(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ra={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/sven/test-pipe-http model.`,builder:La,handler:async t=>{if(t.dryRun){u({command:`cf ai models sven test-pipe-http get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/sven/test-pipe-http`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.sven.testPipeHttp.get({account_id:i})),{successLabel:`Loaded`})}},za={command:`test-pipe-http`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ba={command:`sven`,describe:`Operations for models.sven`,builder:e=>e.command(za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Va(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ha={command:`get`,describe:`Opens a WebSocket connection to stream inference results from the @cf/test/hello-world-cog model.`,builder:Va,handler:async t=>{if(t.dryRun){u({command:`cf ai models test hello-world-cog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/test/hello-world-cog`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.models.test.helloWorldCog.get({account_id:i})),{successLabel:`Loaded`})}},Ua={command:`hello-world-cog`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ha).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wa={command:`test`,describe:`Operations for models.test`,builder:e=>e.command(Ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ga(e){return 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)`})}const Ka={command:`create`,describe:`Runs inference on the @hf/thebloke/deepseek-coder-6.7b-base-awq model.`,builder:Ga,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke deepseek-coder-6-7b-base-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.deepseekCoder67BBaseAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.deepseekCoder67BBaseAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},qa={command:`deepseek-coder-6-7b-base-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ka).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ja(e){return 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)`})}const Ya={command:`create`,describe:`Runs inference on the @hf/thebloke/deepseek-coder-6.7b-instruct-awq model.`,builder:Ja,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke deepseek-coder-6-7b-instruct-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.deepseekCoder67BInstructAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.deepseekCoder67BInstructAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Xa={command:`deepseek-coder-6-7b-instruct-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Za(e){return 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)`})}const Qa={command:`create`,describe:`Runs inference on the @cf/thebloke/discolm-german-7b-v1-awq model.`,builder:Za,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke discolm-german-7b-v1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.discolmGerman7Bv1Awq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.discolmGerman7Bv1Awq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},$a={command:`discolm-german-7b-v1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function eo(e){return 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)`})}const to={command:`create`,describe:`Runs inference on the @hf/thebloke/llama-2-13b-chat-awq model.`,builder:eo,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke llama-2-13b-chat-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/llama-2-13b-chat-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.llama213BChatAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.llama213BChatAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},no={command:`llama-2-13b-chat-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(to).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ro(e){return 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)`})}const io={command:`create`,describe:`Runs inference on the @hf/thebloke/mistral-7b-instruct-v0.1-awq model.`,builder:ro,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke mistral-7b-instruct-v0-1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.mistral7BInstructV01Awq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.mistral7BInstructV01Awq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ao={command:`mistral-7b-instruct-v0-1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oo(e){return 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)`})}const so={command:`create`,describe:`Runs inference on the @hf/thebloke/neural-chat-7b-v3-1-awq model.`,builder:oo,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke neural-chat-7b-v3-1-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.neuralChat7Bv31Awq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.neuralChat7Bv31Awq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},co={command:`neural-chat-7b-v3-1-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(so).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lo(e){return 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)`})}const uo={command:`create`,describe:`Runs inference on the @hf/thebloke/openhermes-2.5-mistral-7b-awq model.`,builder:lo,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke openhermes-2-5-mistral-7b-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.openhermes25Mistral7BAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.openhermes25Mistral7BAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},fo={command:`openhermes-2-5-mistral-7b-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function po(e){return 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)`})}const mo={command:`create`,describe:`Runs inference on the @hf/thebloke/zephyr-7b-beta-awq model.`,builder:po,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models thebloke zephyr-7b-beta-awq create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@hf/thebloke/zephyr-7b-beta-awq`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.zephyr7BBetaAwq.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.thebloke.zephyr7BBetaAwq.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},ho={command:`zephyr-7b-beta-awq`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(mo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},go={command:`thebloke`,describe:`Operations for models.thebloke`,builder:e=>e.command(qa).command(Xa).command($a).command(no).command(ao).command(co).command(fo).command(ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _o(e){return 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)`})}const vo={command:`create`,describe:`Runs inference on the @cf/tiiuae/falcon-7b-instruct model.`,builder:_o,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models tiiuae falcon-7b-instruct create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/tiiuae/falcon-7b-instruct`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.tiiuae.falcon7BInstruct.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.tiiuae.falcon7BInstruct.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},yo={command:`falcon-7b-instruct`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(vo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bo={command:`tiiuae`,describe:`Operations for models.tiiuae`,builder:e=>e.command(yo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xo(e){return 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)`})}const So={command:`create`,describe:`Runs inference on the @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model.`,builder:xo,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models tinyllama tinyllama-1-1b-chat-v1-0 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.tinyllama.tinyllama11BChatV10.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({frequency_penalty:t[`frequency-penalty`],lora:f(t.lora,`lora`,`text`),max_tokens:t[`max-tokens`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),raw:t.raw,repetition_penalty:t[`repetition-penalty`],response_format:{type:f(t[`response-format-type`],`response-format-type`,`text`)},seed:t.seed,stream:t.stream,temperature:t.temperature,top_k:t[`top-k`],top_p:t[`top-p`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.tinyllama.tinyllama11BChatV10.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Co={command:`tinyllama-1-1b-chat-v1-0`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(So).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},wo={command:`tinyllama`,describe:`Operations for models.tinyllama`,builder:e=>e.command(Co).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function To(e){return 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)`})}const Eo={command:`create`,describe:`Runs inference on the @cf/zai-org/glm-4.7-flash model.`,builder:To,handler:async t=>{let n={queueRequest:t[`queue-request`],tags:t.tags};if(t.dryRun){u({command:`cf ai models zai-org glm-4-7-flash create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/@cf/zai-org/glm-4.7-flash`,pathParams:{},query:n,bodyKind:`json`,body:t.body===void 0?c({chat_template_kwargs:{clear_thinking:t[`chat-template-kwargs-clear-thinking`],enable_thinking:t[`chat-template-kwargs-enable-thinking`]},frequency_penalty:t[`frequency-penalty`],logprobs:t.logprobs,max_completion_tokens:t[`max-completion-tokens`],max_tokens:t[`max-tokens`],modalities:t.modalities,model:f(t.model,`model`,`text`),n:t.n,parallel_tool_calls:t[`parallel-tool-calls`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),reasoning_effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),seed:t.seed,service_tier:f(t[`service-tier`],`service-tier`,`text`),store:t.store,stream:t.stream,temperature:t.temperature,top_logprobs:t[`top-logprobs`],top_p:t[`top-p`],user:f(t.user,`user`,`text`)}):o(t.body)});return}let i=await a(t),s=t.local?m:await r(i);if(t.accountId=s,t.body){let e=o(t.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.zaiOrg.glm47Flash.create({body:e,account_id:s,...n})),{successLabel:`Created`});return}let p=c({chat_template_kwargs:{clear_thinking:t[`chat-template-kwargs-clear-thinking`],enable_thinking:t[`chat-template-kwargs-enable-thinking`]},frequency_penalty:t[`frequency-penalty`],logprobs:t.logprobs,max_completion_tokens:t[`max-completion-tokens`],max_tokens:t[`max-tokens`],modalities:t.modalities,model:f(t.model,`model`,`text`),n:t.n,parallel_tool_calls:t[`parallel-tool-calls`],presence_penalty:t[`presence-penalty`],prompt:f(t.prompt,`prompt`,`text`),reasoning_effort:f(t[`reasoning-effort`],`reasoning-effort`,`text`),seed:t.seed,service_tier:f(t[`service-tier`],`service-tier`,`text`),store:t.store,stream:t.stream,temperature:t.temperature,top_logprobs:t[`top-logprobs`],top_p:t[`top-p`],user:f(t.user,`user`,`text`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>i.ai.models.zaiOrg.glm47Flash.create({body:p,account_id:s,...n})),{successLabel:`Created`})}},Do={command:`glm-4-7-flash`,describe:`Per-model Workers AI inference endpoints`,builder:e=>e.command(Eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oo={command:`zai-org`,describe:`Operations for models.zai-org`,builder:e=>e.command(Do).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ko={command:`models`,describe:`Search the Workers AI model catalog and retrieve input/output schemas`,builder:e=>e.command(Mn).command(I).command(B).command(_e).command(Ae).command(Pe).command(xt).command(Ot).command(Mt).command(Ht).command(Kt).command(fn).command(yn).command(Cn).command(An).command(In).command(Ar).command(Br).command(Xr).command(ei).command(ii).command(ci).command(fi).command(gi).command(bi).command(Ii).command(Bi).command(Wi).command(Zi).command(Sa).command(ka).command(Ma).command(Ia).command(Ba).command(Wa).command(go).command(bo).command(wo).command(Oo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ao(e){return e.positional(`model-name`,{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`}).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`}).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`}).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`}).option(`source-lang`,{type:`string`,description:`The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified`}).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`}).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`])}const jo={command:`run <model-name>`,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:Ao,handler:async t=>{if(t.dryRun){u({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/run/${t[`model-name`]==null?`<model-name>`:encodeURIComponent(String(t[`model-name`]))}`,pathParams:{"model-name":String(t[`model-name`]??``)},bodyKind:`json`,body:t.body===void 0?c({text:f(t.text,`text`,`text`),guidance:t.guidance,height:t.height,image:t.image,image_b64:f(t[`image-b64`],`image-b64`,`text`),mask:t.mask,negative_prompt:f(t[`negative-prompt`],`negative-prompt`,`text`),num_steps:t[`num-steps`],prompt:f(t.prompt,`prompt`,`text`),seed:t.seed,strength:t.strength,width:t.width,lang:f(t.lang,`lang`,`text`),source_lang:f(t[`source-lang`],`source-lang`,`text`),target_lang:f(t[`target-lang`],`target-lang`,`text`),input_text:f(t[`input-text`],`input-text`,`text`),max_length:t[`max-length`]}):o(t.body)});return}let n=await a(t),i=t.local?m:await r(n);if(t.accountId=i,t.body){let e=o(t.body);l(await d(`Creating`,async()=>n.ai.run({body:e,account_id:i,model_name:t[`model-name`]})),{successLabel:`Created`});return}let s=c({text:f(t.text,`text`,`text`),guidance:t.guidance,height:t.height,image:t.image,image_b64:f(t[`image-b64`],`image-b64`,`text`),mask:t.mask,negative_prompt:f(t[`negative-prompt`],`negative-prompt`,`text`),num_steps:t[`num-steps`],prompt:f(t.prompt,`prompt`,`text`),seed:t.seed,strength:t.strength,width:t.width,lang:f(t.lang,`lang`,`text`),source_lang:f(t[`source-lang`],`source-lang`,`text`),target_lang:f(t[`target-lang`],`target-lang`,`text`),input_text:f(t[`input-text`],`input-text`,`text`),max_length:t[`max-length`]});l(await d(`Creating`,async()=>n.ai.run({body:s,account_id:i,model_name:t[`model-name`]})),{successLabel:`Created`})}};function Mo(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const No={command:`list`,describe:`Searches Workers AI models by task type (e.g., text-generation, embeddings).`,builder:Mo,handler:async t=>{if(t.dryRun){u({command:`cf ai tasks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/tasks/search`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.tasks.list({account_id:i})),{successLabel:`Loaded`})}},Po={command:`tasks`,describe:`Browse supported inference task types (text-generation, image-classification, etc.)`,builder:e=>e.command(No).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fo(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Io={command:`supported`,describe:`Lists all file formats supported for conversion to Markdown.`,builder:Fo,handler:async t=>{if(t.dryRun){u({command:`cf ai to-markdown supported`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/tomarkdown/supported`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?m:await r(n);t.accountId=i,l(await d(`Loading`,async()=>n.ai.toMarkdown.supported({account_id:i})),{successLabel:`Loaded`})}};function Lo(e){return 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`})}const Ro={command:`transform`,describe:`Converts uploaded files into Markdown format using Workers AI.`,builder:Lo,handler:async t=>{if(t.dryRun){u({command:`cf ai to-markdown transform`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/ai/tomarkdown`,pathParams:{},bodyKind:`multipart`,body:{body:t.body,file:t.file,files:t.files}});return}let n=await a(t),o=t.local?m:await r(n);if(t.accountId=o,t.file!==void 0||t.body!==void 0||t.files!==void 0){let e=new FormData;if(t.file){let n=p(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);if(t.files!==void 0){let n=typeof t.files==`string`?f(t.files,`files`,`text`):t.files;e.append(`files`,typeof n==`string`?n:JSON.stringify(n))}l(await d(`Creating`,async()=>i(n,`POST`,`/accounts/${o}/ai/tomarkdown`,{body:e})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`);l(await d(`Creating`,async()=>i(n,`POST`,`/accounts/${o}/ai/tomarkdown`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},zo={command:`to-markdown`,describe:`Convert documents and files to clean Markdown using AI-powered extraction`,builder:e=>e.command(Io).command(Ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Bo={command:`ai`,describe:`Run inference on Workers AI models — text generation, image classification, embeddings, and more`,builder:e=>e.command(jo).command(ee).command(k).command(ko).command(Po).command(zo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Bo as default};
|