{"name":"@ai-sdk/openai","version":"4.0.3","keywords":["ai"],"license":"Apache-2.0","_id":"@ai-sdk/openai@4.0.3","maintainers":[{"name":"vercel-release-bot","email":"infra+release@vercel.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"matt.straka","email":"matt.j.straka@gmail.com"}],"homepage":"https://ai-sdk.dev/docs","bugs":{"url":"https://github.com/vercel/ai/issues"},"dist":{"shasum":"b72254754eebb1f1e4e088d57abf8adf65ef52ab","tarball":"http://registry-npm.ywwl.com/@ai-sdk/openai/download/@ai-sdk/openai-4.0.3.tgz","fileCount":78,"integrity":"sha512-VA4R08RZf/vOwY6YtJu0p6tc8tW6ONw2BoHz8f+9qTRJHu9ID4E1u1JHC+pKG0FVVvSLQAFRm2m09ILoh89Qjg==","signatures":[{"sig":"MEYCIQC4ycAnmgGfkrYeqi55tulyJROLZ7TFvA2FXUOfqFnmawIhAKbX+oVAAvllEd5n7V1/tygHBziS8T+d7ICfGVhj4hUY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ai-sdk%2fopenai@4.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2342921,"size":442995,"noattachment":false,"key":"/@ai-sdk/openai/-/@ai-sdk/openai-4.0.3.tgz"},"main":"./dist/index.js","type":"module","_from":"file:ai-sdk-openai-4.0.3.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./internal":{"types":"./dist/internal/index.d.ts","import":"./dist/internal/index.js","default":"./dist/internal/index.js"},"./package.json":"./package.json"},"scripts":{"test":"pnpm test:node && pnpm test:edge","build":"pnpm clean && tsup --tsconfig tsconfig.build.json","clean":"del-cli dist docs *.tsbuildinfo","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","test:watch":"vitest --config vitest.node.config.js","type-check":"tsc --build","build:watch":"pnpm clean && tsup --watch","test:update":"pnpm test:node -u"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:569dd145-ae82-472c-b6ea-be5c00f3f6ea"}},"_resolved":"/tmp/d6e30adf1608d5bdbeae00762ab6387e/ai-sdk-openai-4.0.3.tgz","_integrity":"sha512-VA4R08RZf/vOwY6YtJu0p6tc8tW6ONw2BoHz8f+9qTRJHu9ID4E1u1JHC+pKG0FVVvSLQAFRm2m09ILoh89Qjg==","repository":{"url":"git+https://github.com/vercel/ai.git","type":"git","directory":"packages/openai"},"_npmVersion":"11.13.0","description":"The **[OpenAI provider](https://ai-sdk.dev/providers/ai-sdk-providers/openai)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the OpenAI chat and completion APIs and embedding model support for the OpenAI embeddings API.","directories":{"doc":"./docs"},"sideEffects":false,"_nodeVersion":"24.17.0","dependencies":{"@ai-sdk/provider":"4.0.0","@ai-sdk/provider-utils":"5.0.1"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.25.76","tsup":"^8.5.1","typescript":"5.8.3","@types/node":"22.19.19","@ai-sdk/test-server":"2.0.0","@vercel/ai-tsconfig":"0.0.0"},"peerDependencies":{"zod":"^3.25.76 || ^4.1.8"},"_npmOperationalInternal":{"tmp":"tmp/openai_4.0.3_1782754393553_0.15051113741642363","host":"s3://npm-registry-packages-npm-production"},"readme":"# AI SDK - OpenAI Provider\n\nThe **[OpenAI provider](https://ai-sdk.dev/providers/ai-sdk-providers/openai)** for the [AI SDK](https://ai-sdk.dev/docs)\ncontains language model support for the OpenAI chat and completion APIs and embedding model support for the OpenAI embeddings API.\n\n> **Deploying to Vercel?** With Vercel's AI Gateway you can access OpenAI (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).\n\n## Setup\n\n```bash\nnpm i ai @ai-sdk/openai\n```\n\n## Skill for Coding Agents\n\nIf you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:\n\n```shell\nnpx skills add vercel/ai\n```\n\n## Usage\n\n```ts\nimport { openai } from '@ai-sdk/openai';\nimport { generateText } from 'ai';\n\nconst { text } = await generateText({\n  model: openai('gpt-6-luna'),\n  prompt: 'Write a vegetarian lasagna recipe for 4 people.',\n});\n```\n\nSee the [OpenAI Provider documentation](https://ai-sdk.dev/providers/ai-sdk-providers/openai) for more information.\n","publish_time":1782754393732,"_cnpm_publish_time":1782754393732,"dist-tags":{"ai-v5":"2.0.141","ai-v6":"3.0.139","alpha":"2.0.0-alpha.15","beta":"4.0.0-beta.77","canary":"4.0.0-canary.73","latest":"4.0.111","snapshot":"0.0.0-f1630544-20260811180950"}}