{"_id":"@coopah/bentley-provider-openai","_rev":"4-96456ae14ffc575ca5626b33dfd4b17f","name":"@coopah/bentley-provider-openai","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@coopah/bentley-provider-openai","version":"0.2.0","keywords":["ai","agent","llm","bentley"],"license":"MIT","_id":"@coopah/bentley-provider-openai@0.2.0","maintainers":[{"name":"coopah","email":"tibo6c04@gmail.com"}],"homepage":"https://github.com/CoopahG/bentley#readme","bugs":{"url":"https://github.com/CoopahG/bentley/issues"},"dist":{"shasum":"0d11c3aea61f4c3ba6715627c3b7509e3ec35843","tarball":"https://registry.npmjs.org/@coopah/bentley-provider-openai/-/bentley-provider-openai-0.2.0.tgz","fileCount":14,"integrity":"sha512-FYF6lWUnDdblMFDp0nBMzxe1J6ZxnfUO1ySaTanX5lpiYBRaUWc9mlutIAMdIt4CyuQB6INKPAv9t/iVbI6jFg==","signatures":[{"sig":"MEUCIDE9zCneG16ikHGp5C/OQXUcKzk30WXqWea4cLrkMyERAiEAnDRUgib6WnManct3NVj4Jfj1j4lsLW/E/RiLW43ALlM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5731},"main":"dist/index.js","type":"module","_from":"file:coopah-bentley-provider-openai-0.2.0.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"eslint src","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"coopah","email":"tibo6c04@gmail.com"},"_resolved":"/private/var/folders/k4/9fdyr38j4gv59whg5k3w4fgm0000gn/T/ee0882804817e2d74aa0e22b9b16cec2/coopah-bentley-provider-openai-0.2.0.tgz","_integrity":"sha512-FYF6lWUnDdblMFDp0nBMzxe1J6ZxnfUO1ySaTanX5lpiYBRaUWc9mlutIAMdIt4CyuQB6INKPAv9t/iVbI6jFg==","repository":{"url":"git+https://github.com/CoopahG/bentley.git","type":"git","directory":"packages/providers/openai"},"_npmVersion":"10.9.4","description":"OpenAI LLM provider for Bentley","directories":{},"_nodeVersion":"22.22.0","dependencies":{"ai":"^6.0.116","@ai-sdk/openai":"^3.0.41","@coopah/bentley-core":"0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.3.5"},"_npmOperationalInternal":{"tmp":"tmp/bentley-provider-openai_0.2.0_1773093158224_0.5915038712369038","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@coopah/bentley-provider-openai","version":"0.2.1","keywords":["ai","agent","llm","bentley"],"license":"MIT","_id":"@coopah/bentley-provider-openai@0.2.1","maintainers":[{"name":"coopah","email":"tibo6c04@gmail.com"}],"homepage":"https://github.com/CoopahG/bentley#readme","bugs":{"url":"https://github.com/CoopahG/bentley/issues"},"dist":{"shasum":"d68719cb633afde682ff4f0f8982c13f30d1d838","tarball":"https://registry.npmjs.org/@coopah/bentley-provider-openai/-/bentley-provider-openai-0.2.1.tgz","fileCount":15,"integrity":"sha512-8vCcWrvrr3BemPe06Vws0pXN6cveAsiF358iudha+1igzWbZMua9ooFJpJWPZ8Fp+lgIjTDuiECbnZ3OWN1mGQ==","signatures":[{"sig":"MEUCIBDtrw4qn8h8PrlaiWsEmXcTtV6oWvzIASZSxNneq9UvAiEA3afe1upkbg21AbrCCXChK3UEy7YtaL880XNJ+qchtLw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6405},"main":"dist/index.js","type":"module","_from":"file:coopah-bentley-provider-openai-0.2.1.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"eslint src","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"coopah","email":"tibo6c04@gmail.com"},"_resolved":"/private/var/folders/k4/9fdyr38j4gv59whg5k3w4fgm0000gn/T/0f62ed7aed0587a4a518a7624a8e871c/coopah-bentley-provider-openai-0.2.1.tgz","_integrity":"sha512-8vCcWrvrr3BemPe06Vws0pXN6cveAsiF358iudha+1igzWbZMua9ooFJpJWPZ8Fp+lgIjTDuiECbnZ3OWN1mGQ==","repository":{"url":"git+https://github.com/CoopahG/bentley.git","type":"git","directory":"packages/providers/openai"},"_npmVersion":"10.9.4","description":"OpenAI LLM provider for Bentley","directories":{},"_nodeVersion":"22.22.0","dependencies":{"ai":"^6.0.116","@ai-sdk/openai":"^3.0.41","@coopah/bentley-core":"0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.3.5"},"_npmOperationalInternal":{"tmp":"tmp/bentley-provider-openai_0.2.1_1773093592689_0.43903981524809965","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@coopah/bentley-provider-openai","version":"0.2.2","keywords":["ai","agent","llm","bentley"],"license":"MIT","_id":"@coopah/bentley-provider-openai@0.2.2","maintainers":[{"name":"coopah","email":"tibo6c04@gmail.com"}],"homepage":"https://github.com/CoopahG/bentley#readme","bugs":{"url":"https://github.com/CoopahG/bentley/issues"},"dist":{"shasum":"e8477139badea4567f68e49505decb6586f0f784","tarball":"https://registry.npmjs.org/@coopah/bentley-provider-openai/-/bentley-provider-openai-0.2.2.tgz","fileCount":15,"integrity":"sha512-tXIuBdUFuA9oCtQC0btpXIxtAIyg73JRIjUGD9cW51Nah+ecadIJNxP0ZUhoDc9KTsnOAW0jJt1oIwZCZrXe1g==","signatures":[{"sig":"MEUCIAGnkmlp1jn9MQx/PSjjBZS20YYHKJzVbWw9/eWBnlyxAiEA3fiBNYWrGfsId1MAvQw0tko4rIbv4t5yvc6612AVa44=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7468},"main":"dist/index.js","type":"module","_from":"file:coopah-bentley-provider-openai-0.2.2.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","lint":"eslint src","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"coopah","email":"tibo6c04@gmail.com"},"_resolved":"/private/var/folders/k4/9fdyr38j4gv59whg5k3w4fgm0000gn/T/f4e5d11e6102b9df8534e64aa47e4136/coopah-bentley-provider-openai-0.2.2.tgz","_integrity":"sha512-tXIuBdUFuA9oCtQC0btpXIxtAIyg73JRIjUGD9cW51Nah+ecadIJNxP0ZUhoDc9KTsnOAW0jJt1oIwZCZrXe1g==","repository":{"url":"git+https://github.com/CoopahG/bentley.git","type":"git","directory":"packages/providers/openai"},"_npmVersion":"10.9.4","description":"OpenAI LLM provider for Bentley","directories":{},"_nodeVersion":"22.22.0","dependencies":{"ai":"^6.0.116","@ai-sdk/openai":"^3.0.41","@coopah/bentley-core":"0.2.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.3.5"},"_npmOperationalInternal":{"tmp":"tmp/bentley-provider-openai_0.2.2_1773093917253_0.6591038906207811","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@coopah/bentley-provider-openai","version":"0.3.0","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@ai-sdk/openai":"^3.0.41","ai":"^6.0.116","@coopah/bentley-core":"0.3.0"},"devDependencies":{"@types/node":"^25.4.0","typescript":"^5.9.3"},"description":"OpenAI LLM provider for Bentley","license":"MIT","repository":{"type":"git","url":"git+https://github.com/CoopahG/bentley.git","directory":"packages/providers/openai"},"engines":{"node":">=20.0.0"},"keywords":["ai","agent","llm","bentley"],"scripts":{"build":"tsc","dev":"tsc --watch","lint":"eslint src","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"_id":"@coopah/bentley-provider-openai@0.3.0","bugs":{"url":"https://github.com/CoopahG/bentley/issues"},"homepage":"https://github.com/CoopahG/bentley#readme","_integrity":"sha512-qtNECcZF3AwZL6uYJC8+aMCnl1Dgh+8c0NamqYMWKGRS8H8Fn+hbB1E28IN4QEOHQ+vp2EpNnwnUGODGJULevQ==","_resolved":"/private/var/folders/k4/9fdyr38j4gv59whg5k3w4fgm0000gn/T/dbe019c274dba9fd01d10699e010b78c/coopah-bentley-provider-openai-0.3.0.tgz","_from":"file:coopah-bentley-provider-openai-0.3.0.tgz","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-qtNECcZF3AwZL6uYJC8+aMCnl1Dgh+8c0NamqYMWKGRS8H8Fn+hbB1E28IN4QEOHQ+vp2EpNnwnUGODGJULevQ==","shasum":"a21ae74c63a2632408cbeba0c452c467fbefa629","tarball":"https://registry.npmjs.org/@coopah/bentley-provider-openai/-/bentley-provider-openai-0.3.0.tgz","fileCount":15,"unpackedSize":7468,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICLULN2GfcE+2RT3xaOqsT1/4NQw58Q8V6T2Y1ppwrizAiEArnuukJU/WUjDU+yDQC6l9jsxdeYpYhJSoAv/H1WRq8o="}]},"_npmUser":{"name":"coopah","email":"tibo6c04@gmail.com"},"directories":{},"maintainers":[{"name":"coopah","email":"tibo6c04@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bentley-provider-openai_0.3.0_1773178075646_0.7830751709373907"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-09T21:52:38.146Z","modified":"2026-03-10T21:27:55.952Z","0.2.0":"2026-03-09T21:52:38.368Z","0.2.1":"2026-03-09T21:59:52.836Z","0.2.2":"2026-03-09T22:05:17.452Z","0.3.0":"2026-03-10T21:27:55.825Z"},"bugs":{"url":"https://github.com/CoopahG/bentley/issues"},"license":"MIT","homepage":"https://github.com/CoopahG/bentley#readme","keywords":["ai","agent","llm","bentley"],"repository":{"type":"git","url":"git+https://github.com/CoopahG/bentley.git","directory":"packages/providers/openai"},"description":"OpenAI LLM provider for Bentley","maintainers":[{"name":"coopah","email":"tibo6c04@gmail.com"}],"readme":"# @coopah/bentley-provider-openai\n\nOpenAI LLM provider for [Bentley](https://github.com/CoopahG/bentley), built on the [Vercel AI SDK](https://sdk.vercel.ai).\n\n## Install\n\n```bash\npnpm add @coopah/bentley-provider-openai\n```\n\n### Dependencies\n\n- [`@coopah/bentley-core`](https://www.npmjs.com/package/@coopah/bentley-core)\n- `@ai-sdk/openai` ^3.0.41\n- `ai` ^6.0.116\n\n## Usage\n\n```ts\nimport { createBentley } from \"@coopah/bentley-core\";\nimport { bentleyOpenAIPlugin } from \"@coopah/bentley-provider-openai\";\n\nconst bentley = createBentley({\n  plugins: [\n    bentleyOpenAIPlugin(process.env.OPENAI_API_KEY),\n    // or: bentleyOpenAIPlugin() — reads from OPENAI_API_KEY env var\n  ],\n});\n```\n\nThe plugin registers a credential requirement for `OPENAI_API_KEY` (category: `llm`), which is picked up by the server and Studio UI.\n\n## API\n\n- **`bentleyOpenAIPlugin(apiKey?)`** — `BentleyPlugin` that registers OpenAI as an LLM provider\n- **`createBentleyOpenAIProvider(apiKey?)`** — Low-level factory returning `(modelId: string) => LanguageModel`\n- **`OPENAI_MODEL_COSTS`** — Cost-per-token constants for OpenAI models (used by cost tracking middleware)\n\n## Related Packages\n\n| Package | Role |\n|---------|------|\n| [`@coopah/bentley-core`](https://www.npmjs.com/package/@coopah/bentley-core) | Core runtime (required) |\n| [`@coopah/bentley-provider-anthropic`](https://www.npmjs.com/package/@coopah/bentley-provider-anthropic) | Anthropic provider |\n| [`@coopah/bentley-provider-ollama`](https://www.npmjs.com/package/@coopah/bentley-provider-ollama) | Ollama provider (local models) |\n| [`@coopah/bentley-provider-copilot`](https://www.npmjs.com/package/@coopah/bentley-provider-copilot) | GitHub Copilot provider |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}