{"_id":"@agilesyndrome/cf-genai-llm","_rev":"9-0175acc4e3a7bb6fd1ec4e7919043e4b","name":"@agilesyndrome/cf-genai-llm","dist-tags":{"latest":"5.0.0"},"versions":{"0.1.3":{"name":"@agilesyndrome/cf-genai-llm","version":"0.1.3","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@0.1.3","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"70482ade8749441cb81b4a3b81da90a83596b858","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-0.1.3.tgz","fileCount":6,"integrity":"sha512-9hfr3GE5IGnPmBifDx2RL+s7GBvUVoFzECHTH/H0wvgp/2E6T4dvZtcTY0QbsA0Q6ufvnASWRkyjOhngxI4SGQ==","signatures":[{"sig":"MEYCIQDnLP6UqHASa0bFn0EKnMUuo7jD4VCypdowC30W7TnNTQIhAMWsEdIC3WLlJ2BOl8DCTuoBa9M7UstfTbLFPCCd2Rr+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16005},"type":"module","exports":{".":"./src/index.js"},"gitHead":"436536ca662e40de843999aa3ab50603e56575a8","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"clouddrew","email":"drew.easley@calendly.com"},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.17.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_0.1.3_1789066651918_0.6544141615008259","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@agilesyndrome/cf-genai-llm","version":"0.1.8","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@0.1.8","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"a1f53d01c06cc383321df2bfec55f8b3a716eb3f","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-0.1.8.tgz","fileCount":6,"integrity":"sha512-aiPVCWIfTkFEBO3YjjbQlkRElzcEJo2d+Fy1uVs/VGIfzEmpV5LS52I3uX52imIwEuwK3zda1UCCoN+dnnAB9w==","signatures":[{"sig":"MEUCIG5vvQZLnfdXiW1DSoxZqZ6q/ZzzugclqdruQDD38smqAiEA1x7jP530hu61iJpdlhk6lP4GQyuX3Pcm7up1TknTDwY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@0.1.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16005},"type":"module","exports":{".":"./src/index.js"},"gitHead":"1e05bacbc61000121f819ccfff4fc4e04476cb44","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_0.1.8_1789071286686_0.10337426761825519","host":"s3://npm-registry-packages-npm-production"}},"0.1.10":{"name":"@agilesyndrome/cf-genai-llm","version":"0.1.10","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@0.1.10","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"4a128b0d2201df471ed0ca2fa6f0ce133eaf643a","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-0.1.10.tgz","fileCount":6,"integrity":"sha512-0wpUOYSH5nMCrrkbYSZW8R1JGYAAbaeiThhgixU1BUFgh1amjWpQGBz6/d729qrldudfbxEW6mBEi1GGw1LEoA==","signatures":[{"sig":"MEUCICShlsVcLVYsApcnjrnKrvz9D8XRiivnEEZLpC09/jgaAiEAuXx9CL187QAW6MlurO42sWpyr/v7p80tPX1CXRbTWow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@0.1.10","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20263},"type":"module","exports":{".":"./src/index.js"},"gitHead":"06349b73a5633190d76c48f4a2992bab60683aac","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"1.0.3"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_0.1.10_1789221098965_0.4968492625591805","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@agilesyndrome/cf-genai-llm","version":"0.1.11","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@0.1.11","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"1665e2e6ff1b14578d02f665c3280f66376626fa","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-0.1.11.tgz","fileCount":6,"integrity":"sha512-7nnmLENoe8HSXv3sFcat61bYQ30SmbDVHEXj7lcxBtt1Iv+UdvRUR6onXiEJJstFgHt9fNyCWOi3Rf297I6/gQ==","signatures":[{"sig":"MEUCIFVYZZZ10KYK1TgGGhTBSNV7LaZ88MXYIqV/Qp7NhYjFAiEA9YMmEwPnwar3+jH8KHlkSDkZ3miPhXzSQXO+dRza2HA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@0.1.11","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20400},"type":"module","exports":{".":"./src/index.js"},"gitHead":"d78195824d6eed1869bcaea47a9955d1147298b7","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"1.0.5"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_0.1.11_1789223678118_0.6884298429947224","host":"s3://npm-registry-packages-npm-production"}},"0.1.12":{"name":"@agilesyndrome/cf-genai-llm","version":"0.1.12","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@0.1.12","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"52654a7f7099691d96df5ce0bd1d8dbe5515d125","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-0.1.12.tgz","fileCount":6,"integrity":"sha512-QckFMScLjDf2OBL3+p5npayDSiVLY9JVSGlmnfSb7t34YuyizAx+iqsBHFH/SSAN000asROKaFfHQMYHpwBPig==","signatures":[{"sig":"MEQCIHD6yTCG60c6Ma3zgQLsJZ6DI8QEvfpx8zRP1aFmsr/xAiAZBPyi/t4Ipjy3MK/0+u9O6cJnlMPx93RVVOjvPKfZNA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@0.1.12","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20400},"type":"module","exports":{".":"./src/index.js"},"gitHead":"a3f0e36e0634062661efa8325b860867f1b0bf1a","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"2.0.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_0.1.12_1789433601194_0.3055502563158796","host":"s3://npm-registry-packages-npm-production"}},"4.1.0":{"name":"@agilesyndrome/cf-genai-llm","version":"4.1.0","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@4.1.0","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"d731a19dfcca44c5d42cad1d71c7f41470debcc8","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-4.1.0.tgz","fileCount":6,"integrity":"sha512-hLKAHM/drTq63GNRQ2qW/K7r4yBHhgbvfTAoEwxWXmWJYwgBIitFmdLET5qCGcGi4hG6X+clQ7+WmGdCYSRlHg==","signatures":[{"sig":"MEUCIGQB2Lwbq0z8ONtGAWp62VZdMdmz2HM5S16npi04IN7PAiEAvVsqhe3veJTxQ4W5RuWe7wMOg6YXmNNLj0317rxkNVM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@4.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20400},"type":"module","exports":{".":"./src/index.js"},"gitHead":"593d95fac0107059579f11471ef8589d9714fa38","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"^4.1.1"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_4.1.0_1789475254419_0.29924664652268884","host":"s3://npm-registry-packages-npm-production"}},"4.1.1":{"name":"@agilesyndrome/cf-genai-llm","version":"4.1.1","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@4.1.1","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"454fef39087725dacc309d5e7b3634204c5a08ad","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-4.1.1.tgz","fileCount":6,"integrity":"sha512-gFbAboza1zY/1Ul+qCba39HxM17kD62EX4DeBJ3Fi+aMDYfAvP/p7OMG+KevhkLnL15f4YYlnKE5Yp878lJ2hg==","signatures":[{"sig":"MEUCIAw4S10Q4ea8UAZz1eMcGyX3ZZq8cpZXlK6upJO4hzY/AiEAut3gJMPYCDPeLeVoPw5mEDR110OnFR3La8gIGE+OF4s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@4.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28352},"type":"module","exports":{".":"./src/index.js"},"gitHead":"641eff14e26a1a2579f08b8368fc6e9c70e4b2e5","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"^4.1.1"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_4.1.1_1789480175282_0.6887235858686747","host":"s3://npm-registry-packages-npm-production"}},"4.1.2":{"name":"@agilesyndrome/cf-genai-llm","version":"4.1.2","license":"MIT","_id":"@agilesyndrome/cf-genai-llm@4.1.2","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"dist":{"shasum":"1bcab65c8e165a12ad0b83ff16f12743198221a9","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-4.1.2.tgz","fileCount":6,"integrity":"sha512-YV8e/ZImQt+AsiXbisFUcCLFdjMHFEIgKCLsTL4ck7U9/dholng0uaZtd2nysM2/XJdngCNx2DGOjAqxsRkhiw==","signatures":[{"sig":"MEUCIHSyyKtxgoLX7y3cExTmCDzp2VPBTdJKXE1VZHlRJAdRAiEAsUxSZvzs5ma7DvT1QYehtuGmsT+/TaNiAV+SvREjbL4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@4.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27653},"type":"module","exports":{".":"./src/index.js"},"gitHead":"074f3045f9385bd6bde5efe426c3de370393c90a","scripts":{"test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run","check":"node --check src/index.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"repository":{"url":"git+https://github.com/agilesyndrome/cf-genai-llm.git","type":"git"},"_npmVersion":"11.19.0","description":"Composable Cloudflare Worker LLM generation and review client.","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@agilesyndrome/cf-genai-base":"^4.1.1"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cf-genai-llm_4.1.2_1789496011721_0.33718172133969815","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"@agilesyndrome/cf-genai-llm","version":"5.0.0","description":"Composable Cloudflare Worker LLM generation and review client.","type":"module","exports":{".":"./src/index.js"},"scripts":{"check":"node --check src/index.js","test":"node --test tests/*.test.mjs","build":"npm run check && npm test && npm pack --dry-run"},"license":"MIT","publishConfig":{"access":"public","provenance":true},"repository":{"type":"git","url":"git+https://github.com/agilesyndrome/cf-genai-llm.git"},"homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","dependencies":{"@agilesyndrome/cf-genai-base":"^5.0.0"},"gitHead":"a3c552ed4b2de4cb742714276440901a7a1c2688","_id":"@agilesyndrome/cf-genai-llm@5.0.0","bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-g1QKt4/0AHkcTjm2bybeHyF7/fGTuCqZgaogDTHmCkewS9z02b7UVw0l3mwA/ib7k+mbOIIZpS2M5pVrkndohg==","shasum":"dda3a9f6dcb90a74af15f243a6720c986c44b181","tarball":"https://registry.npmjs.org/@agilesyndrome/cf-genai-llm/-/cf-genai-llm-5.0.0.tgz","fileCount":7,"unpackedSize":32608,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agilesyndrome%2fcf-genai-llm@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCK0o6EgrEr+mFnSni9Y5gWM3raVC+0QGopAYy/5765TAIhAJf6YdYQ3oNMeEXjeaRzJsUejt+dX8WvNJs38UAgdj9T"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2ca9df6c-2007-4813-a6ea-51f75e7379d9"}},"directories":{},"maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cf-genai-llm_5.0.0_1789575371852_0.5051824101762412"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-10T18:57:31.602Z","modified":"2026-09-16T16:16:12.379Z","0.1.3":"2026-09-10T18:57:32.055Z","0.1.8":"2026-09-10T20:14:46.827Z","0.1.10":"2026-09-12T13:51:39.096Z","0.1.11":"2026-09-12T14:34:38.252Z","0.1.12":"2026-09-15T00:53:21.338Z","4.1.0":"2026-09-15T12:27:34.577Z","4.1.1":"2026-09-15T13:49:35.403Z","4.1.2":"2026-09-15T18:13:31.854Z","5.0.0":"2026-09-16T16:16:11.986Z"},"bugs":{"url":"https://github.com/agilesyndrome/cf-genai-llm/issues"},"license":"MIT","homepage":"https://github.com/agilesyndrome/cf-genai-llm#readme","repository":{"type":"git","url":"git+https://github.com/agilesyndrome/cf-genai-llm.git"},"description":"Composable Cloudflare Worker LLM generation and review client.","maintainers":[{"name":"clouddrew","email":"drew.easley@calendly.com"}],"readme":"# @agilesyndrome/cf-genai-llm\n\nReusable Cloudflare Worker LLM access with typed generation, parallel batches,\nreviews, one-shot schema repair, structured logs, and token accounting.\n\n```js\nimport { createLLM } from \"@agilesyndrome/cf-genai-llm\";\n\nconst llm = createLLM({ env, metadata: { app: \"cookbook\" } });\nconst result = await llm.generate(\"Write a summary\", schema, { schemaName: \"summary\" });\nconst reviews = await llm.reviewMulti(result, reviewerPrompts, reviewSchema);\n```\n\nLong-running generation is explicit. Dispatch a base job to an application-owned\nCloudflare Workflow, then execute the generation from that Workflow with the\nsame job ID:\n\n```js\nconst execution = await llm.generateJob(event.payload.jobId, prompt, schema, {\n  env: this.env,\n  job: {\n    toJobResult: async (recipe) => {\n      await recipes.save(recipe);\n      return { resourceType: \"recipe\", resourceId: recipe.id };\n    },\n  },\n});\n```\n\n`generateJob` reports phases through base's durable job events. It deliberately\nstores no generated content by default; `job.toJobResult` should persist the\ndomain value and return only the small result descriptor needed by the UI.\n\n## Providers and AI Gateway\n\nThe client speaks the OpenAI Responses-compatible API. OpenAI is the default\nendpoint, while any compatible service (including OpenRelay-style endpoints)\ncan be selected with the same URL, token, and model variables.\n\n```js\n// Direct OpenAI API access remains the default.\nconst direct = createLLM({ env });\n\n// Gateway is a routing/control layer; OpenAI still performs inference.\nconst gateway = createLLM({ env });\n```\n\nThe URL may be either a provider base URL or its `/responses` endpoint. Model\nlist requests use the matching `/models` route. Cloudflare AI Gateway is\ndetected from its hostname and receives the token in `cf-aig-authorization`;\ndirect compatible endpoints use `Authorization: Bearer ...`.\n\nCloudflare Workers AI can be reached through an OpenAI-compatible Gateway URL;\nthe package does not use the Workers AI binding directly.\n\n### Environment configuration\n\n| Variable | Purpose |\n| --- | --- |\n| `LLM_API_URL` | Universal OpenAI-compatible Responses URL or API base URL |\n| `LLM_API_TOKEN` | Universal provider or Gateway token |\n| `LLM_MODEL` | Universal model name; use `auto` to select from `/models` |\n\nSet `LLM_MODEL=auto` when the provider supports a `/models` endpoint.\n\nA feature exports an object with middleware(request, env, ctx, next, state).\nApplications layer it into @agilesyndrome/cf-genai-base:\n\n    import { createWorker } from \"@agilesyndrome/cf-genai-base\";\n    import { createFeature } from \"@agilesyndrome/cf-genai-feature\";\n\n    const feature = createFeature();\n    export default createWorker({ features: [feature], fetch: router });\n\nKeep migrations, binding names, API clients, schemas, and route policy in the\nfeature package. The site supplies only its D1/R2 bindings and domain handlers.\nDo not use module-level mutable request state.\n","readmeFilename":"README.md"}