{"_id":"@agentbill-sdk/vercel-ai","_rev":"10-f5a0013f19354a6c2ed33e3b77c98cd7","name":"@agentbill-sdk/vercel-ai","dist-tags":{"latest":"7.17.3"},"versions":{"1.0.1":{"name":"@agentbill-sdk/vercel-ai","version":"1.0.1","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@1.0.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/Agent-Bill/vercel-ai-sdk/issues"},"dist":{"shasum":"4162c929c877c2e8ae34c4dfa84434923327d702","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-1.0.1.tgz","fileCount":8,"integrity":"sha512-p22LqlxZtrMaW6SWaplyEgdq7Q4tjWkBYV0QoN2ohwvrFwGzTKIsj+RBLdWldNJRz/gmV2IDtlWp8b9KZJLzJw==","signatures":[{"sig":"MEQCIGns7BPEc3LT5gIsSpgy+dNRZ57lGd5RfyitnK5CdTieAiBE1K+85x6MEHuVJ2OOe3XXu2Nf7ehruAnGkMmQxuYolA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51411},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f50f4a80c9763e4df12451214fcdff1221df733e","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/vercel-ai-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_1.0.1_1761330081102_0.24609067568366583","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@agentbill-sdk/vercel-ai","version":"1.0.2","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@1.0.2","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/Agent-Bill/vercel-ai-sdk/issues"},"dist":{"shasum":"311154c18f59b5978e8f379c8fb2671a22d5baa6","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-1.0.2.tgz","fileCount":8,"integrity":"sha512-6megv7vrnoerG7BJAtTn3rnBzRXLVV7nilVk6ExTVGzLtyYQXcuNcp69fmyojGIi+IzkPXjTAfvXKEQInMELVw==","signatures":[{"sig":"MEYCIQDz+j5n98Duh3XpbyVv2M5fnIYClyOW8RCiJ+YJV9yCwgIhAIOFtKAoC+CIwhUIz6y2kHCuCeXdic8vTOS0zvldN6Wh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51235},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"e8839e931c9d7769c145042269b6310dc080b5cf","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/vercel-ai-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_1.0.2_1761561960380_0.8578972943121013","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@agentbill-sdk/vercel-ai","version":"1.0.3","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@1.0.3","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/Agent-Bill/vercel-ai-sdk/issues"},"dist":{"shasum":"fa2891e40af1890d36957c61aeafa4182814642b","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-1.0.3.tgz","fileCount":8,"integrity":"sha512-v6m1BCOgXlj3PpNPWMqDZcRSbdhNuNa4b3H+z933WPC/7+nZiLd+xQKUUpRN1sxVfw+hRCBjINILd+T7RiOH0g==","signatures":[{"sig":"MEUCIQDgAsg13XnCjBRpY2ras6YBiPzOkVsdmQMvv08uijduIQIgXsj6Lw5D6OMEQUbGCSOXDogw7wDk6hskJcUo/rcYCwA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51235},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"2e6aba3d9eacce050f189b0c0dcd6b5e5b2d5e81","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/vercel-ai-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_1.0.3_1761913340031_0.2848190621159252","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@agentbill-sdk/vercel-ai","version":"2.0.0","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@2.0.0","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/Agent-Bill/vercel-ai-sdk/issues"},"dist":{"shasum":"4d254965ce08720a549ff169de52653c6d748121","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-2.0.0.tgz","fileCount":8,"integrity":"sha512-/VHGDJ9a7KT+dvi308rPmYREfhPaMad7oocRyqlHo+rNi6NwxJQ4IYdayixA8lzUMYu6p566VK034jQfUQbLKw==","signatures":[{"sig":"MEUCIF/u4/xzeoNhUmNNtj5IKAuQcYrGw3r/Fe9CufJGwNo1AiEA74Xys/7SBeWq8xGF+eUUY+k3CCaVSkvg58xD6GGG9kc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51235},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ea6006aaae882cf8cbdae73e53f6a409b7204bb9","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/vercel-ai-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_2.0.0_1761914357174_0.040348765184196944","host":"s3://npm-registry-packages-npm-production"}},"5.0.1":{"name":"@agentbill-sdk/vercel-ai","version":"5.0.1","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@5.0.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"dist":{"shasum":"3f788b54fabd37bed8c023f56a2a4dbec1c3f76d","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-5.0.1.tgz","fileCount":8,"integrity":"sha512-tnQQyH4f9AoXyAhao0egSS+RT+JGKRX2d1F4SDxfTBRoNGlvsR6BYR3h2cjckQxnYnR9CoSaxLbA+wDPO3BmdA==","signatures":[{"sig":"MEUCIFc+jlPotSB4QPfKPGWwJqqqxN6747ksxDOXetrRz/E+AiEAuQksYp8d5mGJxLLKXGtZlcSuyIqmZxAsReIrAi/YmRI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57011},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ab9562c81d9c909352cba37cc5a3b0a15d2bf3e7","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_5.0.1_1762458818296_0.5823413756967117","host":"s3://npm-registry-packages-npm-production"}},"5.0.2":{"name":"@agentbill-sdk/vercel-ai","version":"5.0.2","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@5.0.2","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"dist":{"shasum":"8efc48558bdc4f77cb348c816ca40641bf6070a3","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-5.0.2.tgz","fileCount":8,"integrity":"sha512-4S7o1+MK3HCdoZD8roUCc6GBFtGoF6DLNqG1SKmatH2qMcSYETti7MmrNVf8xVesEdE4ImvkQJA4s9R7fjFvhg==","signatures":[{"sig":"MEYCIQC5abEj+dOTPWTGRSQGymEzzRh10lghO6mkk9/nOLk5ogIhAOds/JIWBs9XRW/bMVrvlufu/ftKDAa85GBWAmTuiPWV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57011},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"7b025cdc2a70f4c77ae2e8324a1ed886bfe35eb8","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_5.0.2_1762459198946_0.8740496129950981","host":"s3://npm-registry-packages-npm-production"}},"6.4.2":{"name":"@agentbill-sdk/vercel-ai","version":"6.4.2","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@6.4.2","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"dist":{"shasum":"d6891ee41721681886592feff6346477cd719a90","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-6.4.2.tgz","fileCount":8,"integrity":"sha512-rOWG9bpefIAR8xXV0m5nWRZ6Y6rQPVtr8wCCrQ3uDvEdgBKuaGEHzNCecv5vrz81ijJi3nvdwg3Tu1urM4Dyag==","signatures":[{"sig":"MEYCIQDs/7PcX6cXkf67sHA+sVUnxmRSGWcZYcrUl6sBp+ecLAIhAKKkMHqviDtfK5UWPeyasLD2rLPrDxzqhSi9bTWQBiwq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65801},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"317b9b5927d807b555271ad20e79e7af9da45577","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_6.4.2_1764348920663_0.4006664327665994","host":"s3://npm-registry-packages-npm-production"}},"7.17.0":{"name":"@agentbill-sdk/vercel-ai","version":"7.17.0","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability","cost-guard","tracing"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@7.17.0","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"dist":{"shasum":"dd23627e01126cfa018f71ac82099691fb9f0437","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-7.17.0.tgz","fileCount":8,"integrity":"sha512-e7IpIdg/TguN4KxI0j+SXvP837ciq54+Otv5frJBd5T1j7MpVZ5hwgUGvMQmcmfyAVtbwRbribC68TXhT+/STA==","signatures":[{"sig":"MEYCIQCi6Y4HmelPJZniOTNbjkh0fP0MlznzPGltzHlcvRYojQIhAOq28Faa7XXIplykiGv5UhHDoYjI/7Ygw4ujtcJ/P9Gb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78128},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"58cfcaa0a988b523e611c31f012025e42b74ae9b","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking with Cost Guard protection","directories":{},"_nodeVersion":"20.19.6","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_7.17.0_1767426542934_0.4785355661980024","host":"s3://npm-registry-packages-npm-production"}},"7.17.1":{"name":"@agentbill-sdk/vercel-ai","version":"7.17.1","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability","cost-guard","tracing"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/vercel-ai@7.17.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://agentbill.com","bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"dist":{"shasum":"25fb2375b5bcd7af9ce7ceca1841e2627793fd26","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-7.17.1.tgz","fileCount":8,"integrity":"sha512-GnF3qSYNLqm4ZGZ/NiN7eGpWJ5SKOrUkiva5s3/mzoe9fo4al9jjfB4IPDTjjBGPfSDQ6NNwbpIV3eMRN5gX6g==","signatures":[{"sig":"MEUCIQCQe/CotZ65OKhqaf8Qhjx34aTxWCzcTMFKMPCrArqVnQIgJQsAj73U5J5g9coWRWlewmOmFRxRG6NxkSHFkZnV5s8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90480},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"0a3ecbde2203f571f24d11a578c00f48a8034186","scripts":{"lint":"echo 'Linting skipped'","test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","type-check":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking with Cost Guard protection","directories":{},"_nodeVersion":"20.19.6","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.0.0","@types/node":"^20.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/vercel-ai_7.17.1_1767442684086_0.3836492982613109","host":"s3://npm-registry-packages-npm-production"}},"7.17.3":{"name":"@agentbill-sdk/vercel-ai","version":"7.17.3","description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking with Cost Guard protection","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","type-check":"tsc --noEmit","lint":"echo 'Linting skipped'","prepare":"npm run build","prepublishOnly":"npm run build && npm test"},"keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability","cost-guard","tracing"],"author":{"name":"AgentBill"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git"},"bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"homepage":"https://agentbill.com","peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"devDependencies":{"@types/node":"^20.0.0","vitest":"^1.0.0"},"_id":"@agentbill-sdk/vercel-ai@7.17.3","gitHead":"5643eeff3af451f740ef7a1cb2e4db1c77f377cb","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-AhiHa6UryGBAyfLSv0xs8pDq91U5AWGky2nieH1EtS7xSKuZfLW61x/kCrNad63q4Pox9Qb9DGjC1Iqf1IcPYQ==","shasum":"90de1d00349266d3fe3db1b9643bddbffdfaf7cd","tarball":"https://registry.npmjs.org/@agentbill-sdk/vercel-ai/-/vercel-ai-7.17.3.tgz","fileCount":8,"unpackedSize":90502,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAdywZ5+JaH0NWdGAAg7u6qReDkPc8ZfKY9V8Yo/a/vwAiEAtOVWnMvNVQ33BshU++HHgwuyjsed3geJsxL6JkL09zg="}]},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"directories":{},"maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vercel-ai_7.17.3_1767722554841_0.02351871442695752"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-24T18:21:20.971Z","modified":"2026-01-06T18:02:35.231Z","1.0.1":"2025-10-24T18:21:21.305Z","1.0.2":"2025-10-27T10:46:00.581Z","1.0.3":"2025-10-31T12:22:20.229Z","2.0.0":"2025-10-31T12:39:17.368Z","5.0.1":"2025-11-06T19:53:38.504Z","5.0.2":"2025-11-06T19:59:59.139Z","6.4.2":"2025-11-28T16:55:20.853Z","7.17.0":"2026-01-03T07:49:03.071Z","7.17.1":"2026-01-03T12:18:04.234Z","7.17.3":"2026-01-06T18:02:34.962Z"},"bugs":{"url":"https://github.com/yourusername/agentbill-vercel-sdk/issues"},"author":{"name":"AgentBill"},"license":"MIT","homepage":"https://agentbill.com","keywords":["vercel","ai","sdk","agent","billing","usage-tracking","agentbill","openai","anthropic","llm","observability","cost-guard","tracing"],"repository":{"type":"git","url":"git+https://github.com/yourusername/agentbill-vercel-sdk.git"},"description":"AgentBill integration for Vercel AI SDK - Automatic usage tracking with Cost Guard protection","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"readme":"# AgentBill Vercel AI SDK Integration\n\nOpenTelemetry-based provider wrapper for automatically tracking and billing Vercel AI SDK usage.\n\n## Installation\n\n```bash\nnpm install @agentbill/vercel-sdk ai\n```\n\nWith specific AI SDK providers:\n```bash\nnpm install @ai-sdk/openai @ai-sdk/anthropic\n```\n\n## Quick Start\n\n```typescript\nimport { AgentBillVercel } from '@agentbill/vercel-sdk';\nimport { openai } from '@ai-sdk/openai';\nimport { generateText } from 'ai';\n\n// 1. Initialize AgentBill wrapper\nconst agentBill = new AgentBillVercel({\n  apiKey: 'agb_your_api_key_here',  // Get from AgentBill dashboard\n  baseUrl: 'https://api.agentbill.io',\n  customerId: 'customer-123',\n  debug: true\n});\n\n// 2. Wrap your AI SDK provider\nconst trackedOpenAI = agentBill.wrapProvider(openai);\n\n// 3. Use normally - everything auto-tracked!\nconst { text } = await generateText({\n  model: trackedOpenAI('gpt-4o-mini'),\n  prompt: 'What is the capital of France?',\n});\n\nconsole.log(text);\n\n// ✅ Automatically captured:\n// - Prompt text (hashed for privacy)\n// - Model name (gpt-4o-mini)\n// - Provider (openai)\n// - Token usage (prompt + completion)\n// - Latency (ms)\n// - Costs (calculated automatically)\n```\n\n## Features\n\n- ✅ **Zero-config instrumentation** - Just wrap the provider\n- ✅ **Automatic token tracking** - Captures all AI SDK calls\n- ✅ **Multi-provider support** - OpenAI, Anthropic, any AI SDK provider\n- ✅ **Streaming support** - Tracks token-by-token streaming\n- ✅ **Cost calculation** - Auto-calculates costs per model\n- ✅ **Prompt profitability** - Compare costs vs revenue\n- ✅ **OpenTelemetry compatible** - Standard observability\n\n## Advanced Usage\n\n### Streaming with Tracking\n\n```typescript\nimport { streamText } from 'ai';\n\nconst result = await streamText({\n  model: trackedOpenAI('gpt-4o-mini'),\n  prompt: 'Write a poem about code',\n});\n\n// Stream to client - all tokens tracked!\nfor await (const chunk of result.textStream) {\n  process.stdout.write(chunk);\n}\n\n// Automatically tracked:\n// - Total streaming tokens\n// - Time to first token\n// - Total latency\n```\n\n### Track Custom Revenue\n\n```typescript\n// Track revenue for profitability analysis\nagentBill.trackRevenue({\n  event_name: 'ai_completion',\n  revenue: 0.50,  // What you charged the customer\n  metadata: { subscription_tier: 'pro' }\n});\n```\n\n### Use with Multiple Providers\n\n```typescript\nimport { anthropic } from '@ai-sdk/anthropic';\n\nconst trackedAnthropic = agentBill.wrapProvider(anthropic);\n\n// Mix and match providers - all tracked!\nconst openaiResult = await generateText({\n  model: trackedOpenAI('gpt-4o'),\n  prompt: 'Hello from OpenAI'\n});\n\nconst anthropicResult = await generateText({\n  model: trackedAnthropic('claude-3-5-sonnet-20241022'),\n  prompt: 'Hello from Anthropic'\n});\n```\n\n### Next.js API Route Example\n\n```typescript\n// app/api/chat/route.ts\nimport { AgentBillVercel } from '@agentbill/vercel-sdk';\nimport { openai } from '@ai-sdk/openai';\nimport { streamText } from 'ai';\n\nconst agentBill = new AgentBillVercel({\n  apiKey: process.env.AGENTBILL_API_KEY!,\n  baseUrl: process.env.AGENTBILL_BASE_URL!,\n  debug: process.env.NODE_ENV === 'development'\n});\n\nexport async function POST(req: Request) {\n  const { messages } = await req.json();\n  \n  const trackedOpenAI = agentBill.wrapProvider(openai);\n  \n  // Stream response with automatic tracking\n  const result = await streamText({\n    model: trackedOpenAI('gpt-4o-mini'),\n    messages,\n  });\n  \n  return result.toDataStreamResponse();\n}\n```\n\n## Configuration\n\n```typescript\nconst agentBill = new AgentBillVercel({\n  apiKey: 'agb_...',              // Required - get from dashboard\n  baseUrl: 'https://...',         // Required - your AgentBill instance\n  customerId: 'customer-123',     // Optional - for multi-tenant apps\n  accountId: 'account-456',       // Optional - for account-level tracking\n  debug: true,                    // Optional - enable debug logging\n  batchSize: 10,                  // Optional - batch signals before sending\n  flushInterval: 5000             // Optional - flush interval in ms\n});\n```\n\n## How It Works\n\nThe provider wrapper intercepts AI SDK calls:\n\n1. **Wrap Provider** - Creates a proxy around the AI SDK provider\n2. **Track Call** - Captures model, prompt, start time\n3. **Execute** - Runs the actual AI SDK call\n4. **Capture Response** - Extracts tokens, latency, response\n5. **Send Signal** - Sends data to AgentBill via unified OTEL Collector (`/otel-collector`)\n\nAll data is batched and sent efficiently to minimize overhead.\n\n## Supported Models\n\nAuto-cost calculation for:\n- OpenAI: GPT-4o, GPT-4o-mini, GPT-4-turbo, GPT-3.5-turbo\n- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku\n- Any AI SDK-compatible provider\n\n## TypeScript Support\n\nFull TypeScript support with proper typing:\n\n```typescript\nimport type { AgentBillConfig } from '@agentbill/vercel-sdk';\n\nconst config: AgentBillConfig = {\n  apiKey: 'agb_...',\n  baseUrl: 'https://...',\n  customerId: 'customer-123'\n};\n```\n\n## Troubleshooting\n\n### Not seeing data in dashboard?\n\n1. Check API key is correct\n2. Enable `debug: true` to see logs\n3. Verify `baseUrl` matches your instance\n4. Check network connectivity to AgentBill\n\n### TypeScript errors?\n\nMake sure you have the latest version: `npm install @agentbill/vercel-sdk@latest`\n\n### Streaming not working?\n\nThe wrapper supports streaming - make sure you're using the latest AI SDK version\n\n## License\n\nMIT\n","readmeFilename":"README.md"}