{"_id":"zhipu-ai-provider","_rev":"9-c2a9c6c5d13c5b5ad03d9cd8a94f77bf","name":"zhipu-ai-provider","dist-tags":{"beta":"0.2.0-beta.1","latest":"0.4.0"},"versions":{"0.1.0":{"name":"zhipu-ai-provider","version":"0.1.0","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.1.0","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"235519c221c3f1c4f3758801dbdb06179db900d9","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.1.0.tgz","fileCount":10,"integrity":"sha512-4MsIQ4/3l3LggpV345TQGzhFf3dUJ3PWlSFugBcchf+PHwV4xrk2j+eLybHu6aHe0YhPokQEFyZ0Xom+fJ3b6A==","signatures":[{"sig":"MEQCIEYKkbKAe48T0Ck+fYBc2uOMwuvpUx/JN+pe6w710bflAiAW+2cqywi6PTWBC4hCicZIDq91tw+nLcK6eqYoK9Gulg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165479},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"98524959555880f5c88efed968e3e58f8e1e0ca2","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"10.1.0","description":"Vercel AI Custom Provider for Services from Zhipu","directories":{},"sideEffects":false,"_nodeVersion":"20.9.0","dependencies":{"@ai-sdk/provider":"1.0.9","@ai-sdk/provider-utils":"2.1.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.23.8","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.1.0_1741125646777_0.9502847264867793","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"zhipu-ai-provider","version":"0.1.1","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.1.1","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"402cb2960f34a45b54cf873b6ca0cac27227f5a3","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.1.1.tgz","fileCount":10,"integrity":"sha512-cVwvvGtPiQqgsGdBzHCHC5oQ7z6slEQTbXJ5+42gQGX4N5uRUvYj+YYLp7Cr1HPQGF3zR2p8vNbT5etPHD4NbA==","signatures":[{"sig":"MEQCIBLq8XWUB/YmcLYu1WjpRUFV11pzPvvvp+v73HKoBUqBAiBo9OhOPEjj33Y41HJNPZcUba6a9tZABdGt0JBacG9HVA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":170754},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"ad3caafadeac9480e869f04fb7606f6eb9efaa9b","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"10.1.0","description":"Vercel AI Custom Provider for Services from Zhipu","directories":{},"sideEffects":false,"_nodeVersion":"20.9.0","dependencies":{"@ai-sdk/provider":"1.0.9","@ai-sdk/provider-utils":"2.1.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.23.8","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"peerDependencies":{"zod":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.1.1_1741273534316_0.1721057848333285","host":"s3://npm-registry-packages-npm-production"}},"0.2.0-beta.1":{"name":"zhipu-ai-provider","version":"0.2.0-beta.1","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.2.0-beta.1","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"83a9c7437405fdb4cb220407259fee3d4225ecd4","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.2.0-beta.1.tgz","fileCount":10,"integrity":"sha512-vprY/g5A2fPcNtXar7o3vTfJN64rseTg2Y1l/LAqmGTxOoKM3mz9ilyQFzZfJ5LuWNY99tv+WUOKKBpC3dsydA==","signatures":[{"sig":"MEYCIQCqfKFYuJooE9Pgl1SfN5p1WOdXKjyhOioTlSrZTTtoRQIhAJa/xXlvYKeuOJ9EddnkmkdKBkxM6TZ3eSFlaXE11DvI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2403851},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"f1d78c0facc9bae6c6d6804208c265ba288f1753","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.4.2","description":"Vercel AI Custom Provider for Services from Zhipu","directories":{},"sideEffects":false,"_nodeVersion":"23.9.0","dependencies":{"@ai-sdk/provider":"2.0.0-beta.1","zhipu-ai-provider":"link:../../Library/pnpm/global/5/node_modules/zhipu-ai-provider","@ai-sdk/provider-utils":"3.0.0-beta.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ai":"5.0.0-beta.25","zod":"4.0.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.2.0-beta.1_1753174851836_0.20286692678347018","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"zhipu-ai-provider","version":"0.2.0","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.2.0","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"d977f8c230f89a72a9ed51dc812f1b71889c3889","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.2.0.tgz","fileCount":10,"integrity":"sha512-vGJWraG8E+nEU/DwkpBl+vdD1X+133AJwSbTaQZ0GREm4H0JePYPBa4oDw5EG4jugDbmAiaYtI9gF/AVH7Eyfw==","signatures":[{"sig":"MEYCIQD6f08JWinzGGcx2EZTUZlW1GLEhhydfZepWh4ACC/ASQIhAIqvB6D2L1WIeEXeCh/quk+4Zuifl+ODRitOJsdNbUXY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3038153},"main":"./dist/index.js","_from":"file:zhipu-ai-provider-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"_resolved":"/private/var/folders/l5/vpd78n15069djvzrrbjdtzl00000gn/T/3d870b75e6ec12715d810721f27524c6/zhipu-ai-provider-0.2.0.tgz","_integrity":"sha512-vGJWraG8E+nEU/DwkpBl+vdD1X+133AJwSbTaQZ0GREm4H0JePYPBa4oDw5EG4jugDbmAiaYtI9gF/AVH7Eyfw==","repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Vercel AI SDK Custom Provider for Services from Zhipu","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","dependencies":{"@ai-sdk/provider":"^2.0.0","@ai-sdk/provider-utils":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^5.0.0","msw":"^2.12.7","zod":"4.3.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.2.0_1768396887065_0.1347049486844092","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"zhipu-ai-provider","version":"0.2.1","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.2.1","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"161e05726eaf852183e6bb43aaac7c0415218070","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.2.1.tgz","fileCount":10,"integrity":"sha512-oPTa1SQNGY6qEKg9EovCJWQITfCmIQUC2u+A5PQhEm4TN0HO4k/r8f143ar/GBHo+WMRkq/OE1Zf3Hay5xUYUQ==","signatures":[{"sig":"MEYCIQDgILVNR0mYjUttXfUkCU/djS/kz1fiID4Wgp/+f0dpSgIhANZztezFhz9Rq4jzl7L6PdEWMNem/a3y1DOB2XzdLZOz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3043001},"main":"./dist/index.js","_from":"file:zhipu-ai-provider-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"_resolved":"/private/var/folders/l5/vpd78n15069djvzrrbjdtzl00000gn/T/342635556c5d49dd0ea2f737485687e1/zhipu-ai-provider-0.2.1.tgz","_integrity":"sha512-oPTa1SQNGY6qEKg9EovCJWQITfCmIQUC2u+A5PQhEm4TN0HO4k/r8f143ar/GBHo+WMRkq/OE1Zf3Hay5xUYUQ==","repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Vercel AI SDK Custom Provider for Services from Zhipu","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","dependencies":{"@ai-sdk/provider":"^2.0.0","@ai-sdk/provider-utils":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^5.0.0","msw":"^2.12.7","zod":"4.3.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.2.1_1768397805370_0.3116300301308128","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"zhipu-ai-provider","version":"0.2.2","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.2.2","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"cbee428475b1c2fca446f273ac09006ef86f6f00","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.2.2.tgz","fileCount":10,"integrity":"sha512-UjX1ho4DI9ICUv/mrpAnzmrRe5/LXrGkS5hF6h4WDY2aup5GketWWopFzWYCqsbArXAM5wbzzdH9QzZusgGiBg==","signatures":[{"sig":"MEQCIFFhVci+QFsLZbreOQPT8Qn7u5G6WXA9ipgF/9Bv6MDIAiBc6JqexosXrrWZqINXYOjF9L1z7Fbh+0y6oo6+grYiNg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3046285},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"a3dfbceaab7c55d4a3246ebe470a8d89d56cad86","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Vercel AI SDK Custom Provider for Services from Zhipu (Z.ai)","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","dependencies":{"@ai-sdk/provider":"^2.0.0","@ai-sdk/provider-utils":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^5.0.0","msw":"^2.12.7","zod":"4.3.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.2.2_1769076730127_0.9389069412543123","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"zhipu-ai-provider","version":"0.3.0","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.3.0","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"f7b4d197afb31d162e414122021addd6ee1d0ec5","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.3.0.tgz","fileCount":10,"integrity":"sha512-KaA0APoGSJbuLO10QAC2tLX4mx4lVq7rDdl/023V3Wcnv9I57naVQ1EWEiOXklkM8tpEI20tbzHfhqL4JyK7nw==","signatures":[{"sig":"MEYCIQC9fya8k4HdaSpJkaCy8hg+cZMTWqL98hbE9wvgBi3mQgIhAMX6S8fR0wP9Oj3ZmKNZAmWz2Yhmd39R7/nQdNMEBLSL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3057201},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"915660b243b75db34861793395095eca09c2ae9b","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"./**/*.ts*\"","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","example:embed":"node examples/embed.mjs","prettier-check":"prettier --check \"./**/*.ts*\"","example:stream-text":"node examples/stream-text.mjs","example:generate-text":"node examples/generate-text.mjs","example:generate-image":"node examples/generate-image.mjs","example:generate-text-reasoning":"node examples/generate-text-reasoning.mjs","example:generate-text-tool-call":"node examples/generate-text-tool-call.mjs","example:generate-text-with-images":"node examples/generate-text-with-images.mjs"},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.11.0","description":"Vercel AI SDK Custom Provider for Services from Zhipu (Z.ai)","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","dependencies":{"@ai-sdk/provider":"^3.0.3","@ai-sdk/provider-utils":"^4.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.35","msw":"2.7.0","zod":"4.3.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.3.0_1775151216699_0.28201544921593236","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"zhipu-ai-provider","version":"0.3.1","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"author":{"name":"Chen Xiang"},"license":"Apache-2.0","_id":"zhipu-ai-provider@0.3.1","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"dist":{"shasum":"b6c43fbfd9e04bd3f774b9f0c307e6a10f53e1d0","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.3.1.tgz","fileCount":10,"integrity":"sha512-3BGtV1RVLXU9GXFN7QGsoNZLkpp2E4Grt9GRWNcvYOQdUF7hvgZ59JxA4zys7j0gWuEq6Qvt9TlbzMAMwIyQyw==","signatures":[{"sig":"MEUCIG/BGFZkt0SyVn+bGFPyAYv+oM37xD9xRGQKQ2mstJehAiEAxqlSKb3LqOeJUwz+tQJVcjGAasALbKOhOA4kElw/1EE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3057240},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"3586314442ea03f1ecf5129ecac2b9345456dd00","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","build":"tsup","clean":"rm -rf dist","format":"prettier --write \"./**/*.ts*\"","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","example:embed":"node examples/embed.mjs","prettier-check":"prettier --check \"./**/*.ts*\"","example:stream-text":"node examples/stream-text.mjs","example:generate-text":"node examples/generate-text.mjs","example:generate-image":"node examples/generate-image.mjs","example:generate-text-reasoning":"node examples/generate-text-reasoning.mjs","example:generate-text-tool-call":"node examples/generate-text-tool-call.mjs","example:generate-text-with-images":"node examples/generate-text-with-images.mjs"},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"repository":{"url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git","type":"git"},"_npmVersion":"11.9.0","description":"Vercel AI SDK Custom Provider for Services from Zhipu (Z.ai)","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@ai-sdk/provider":"^3.0.3","@ai-sdk/provider-utils":"^4.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.35","msw":"2.7.0","zod":"4.3.5","tsup":"^8","eslint":"^9.21.0","vitest":"^3.0.7","@eslint/js":"^9.21.0","typescript":"5.6.3","@types/node":"^18","@edge-runtime/vm":"^5.0.0","typescript-eslint":"^8.26.0"},"_npmOperationalInternal":{"tmp":"tmp/zhipu-ai-provider_0.3.1_1777653103894_0.1504769883287984","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"zhipu-ai-provider","version":"0.4.0","description":"Vercel AI SDK Custom Provider for Services from Zhipu (Z.ai)","author":{"name":"Chen Xiang"},"license":"Apache-2.0","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","build:watch":"tsup --watch","clean":"rm -rf dist","example:generate-text":"node examples/generate-text.mjs","example:stream-text":"node examples/stream-text.mjs","example:generate-text-reasoning":"node examples/generate-text-reasoning.mjs","example:generate-text-reasoning-effort":"node examples/generate-text-reasoning-effort.mjs","example:generate-text-tool-call":"node examples/generate-text-tool-call.mjs","example:generate-text-with-images":"node examples/generate-text-with-images.mjs","example:embed":"node examples/embed.mjs","example:generate-image":"node examples/generate-image.mjs","lint":"eslint \"./**/*.ts*\"","type-check":"tsc --noEmit","prettier-check":"prettier --check \"./**/*.ts*\"","format":"prettier --write \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run"},"exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"dependencies":{"@ai-sdk/provider":"^3.0.3","@ai-sdk/provider-utils":"^4.0.6"},"devDependencies":{"@edge-runtime/vm":"^5.0.0","@eslint/js":"^9.21.0","@types/node":"^18","ai":"^6.0.35","eslint":"^9.21.0","msw":"2.7.0","tsup":"^8","typescript":"5.6.3","typescript-eslint":"^8.26.0","vitest":"^3.0.7","zod":"4.3.5"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","repository":{"type":"git","url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git"},"bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"_id":"zhipu-ai-provider@0.4.0","gitHead":"7eac7cf119f6efbc4278d064064404614d825daa","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-yEUCjk8gQGvf/eP0nDOwxjOVPwVFSbH5f+0U9F+RXRFeHjd0bQbwBn9CvveGoYwg52m3fcHSrG3yFHNbFwPm2g==","shasum":"13dd4f852804b271cb2822ee6d20af04d0097a9b","tarball":"https://registry.npmjs.org/zhipu-ai-provider/-/zhipu-ai-provider-0.4.0.tgz","fileCount":10,"unpackedSize":3069577,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDeh3A78TJvYip7BdYNkwAIzjQmSRJVyYTWaVdDgXESfwIhAJ9GxYKbddD8IBbW0disSbLSlwKDLGb3KERmggO73YRo"}]},"_npmUser":{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"},"directories":{},"maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zhipu-ai-provider_0.4.0_1785142232733_0.036480182075480316"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-04T22:00:46.691Z","modified":"2026-07-27T08:50:33.021Z","0.1.0":"2025-03-04T22:00:46.989Z","0.1.1":"2025-03-06T15:05:34.573Z","0.2.0-beta.1":"2025-07-22T09:00:52.081Z","0.2.0":"2026-01-14T13:21:27.237Z","0.2.1":"2026-01-14T13:36:45.615Z","0.2.2":"2026-01-22T10:12:10.493Z","0.3.0":"2026-04-02T17:33:37.010Z","0.3.1":"2026-05-01T16:31:44.137Z","0.4.0":"2026-07-27T08:50:32.861Z"},"bugs":{"url":"https://github.com/Xiang-CH/zhipu-ai-provider/issues"},"author":{"name":"Chen Xiang"},"license":"Apache-2.0","homepage":"https://github.com/Xiang-CH/zhipu-ai-provider","keywords":["zhipu","bigmodel","glm","ai","provider","vercel-ai","vercel","ai-sdk"],"repository":{"type":"git","url":"git+https://github.com/Xiang-CH/zhipu-ai-provider.git"},"description":"Vercel AI SDK Custom Provider for Services from Zhipu (Z.ai)","maintainers":[{"name":"xiang-ch","email":"chen.xiang.bill@gmail.com"}],"readme":"# Zhipu AI Provider - Vercel AI SDK Community Provider\n\nThis is a [Zhipu](https://www.zhipuai.cn/) (Z.ai) provider for the [Vercel AI SDK](https://ai-sdk.dev/). It supports AI SDK 6 and the `LanguageModelV3` custom-provider contract for language models, plus embedding and image models provided on [bigmodel.cn](https://bigmodel.cn/) or [z.ai](https://docs.z.ai/) by [ZhipuAI](https://www.zhipuai.cn/).\n\n## Setup\n\n```bash\n# npm\nnpm i zhipu-ai-provider\n\n# pnpm\npnpm add zhipu-ai-provider\n\n# yarn\nyarn add zhipu-ai-provider\n\n# bun\nbun add zhipu-ai-provider\n```\n\nSet up your `.env` file / environment with your API key.\n\n```bash\nZHIPU_API_KEY=<your-api-key>\n```\n\n## Provider Instance\n\nYou can import the default provider instance `zhipu` from `zhipu-ai-provider` (This automatically reads the API key from the environment variable `ZHIPU_API_KEY`):\n\n```ts\nimport { zhipu } from 'zhipu-ai-provider' // for bigmodel.cn\n// or\nimport { zai } from 'zhipu-ai-provider' // for z.ai\n```\n\nAlternatively, you can create a provider instance with custom configuration with `createZhipu`:\n\n```ts\nimport { createZhipu } from 'zhipu-ai-provider';\n\nconst zhipu = createZhipu({\n  baseURL: \"https://open.bigmodel.cn/api/paas/v4\",\n  apiKey: \"your-api-key\"\n});\n```\n\nYou can use the following optional settings to customize the Zhipu provider instance:\n\n- **baseURL**: *string*\n  - Use a different URL prefix for API calls, e.g. to use proxy servers. The default prefix is `https://open.bigmodel.cn/api/paas/v4`.\n- **apiKey**: *string*\n  - Your API key for Zhipu [BigModel Platform](https://bigmodel.cn/). If not provided, the provider will attempt to read the API key from the environment variable `ZHIPU_API_KEY`.\n- **headers**: *Record<string,string>*\n  - Custom headers to include in the requests.\n\n## Language Model Example\n\n```ts\nimport { generateText } from 'ai';\nimport { zhipu } from 'zhipu-ai-provider';\n\nconst { text } = await generateText({\n  model: zhipu('glm-5'), // or use 'GLM-4.7-Flash' for free\n  prompt: 'Why is the sky blue?',\n});\n\nconsole.log(text)\n```\n\nTo disable thinking for hybrid models like `glm-5`, set `thinking.type` to `disabled` either in the model options or in `providerOptions.zhipu`:\n\n```ts\nconst { text } = await generateText({\n  model: zhipu('glm-5', {\n    thinking: {\n      type: 'disabled'\n    },\n  }),\n  prompt: 'Explain quantum computing in simple terms.',\n});\n```\n\nor\n\n```ts\nconst { text } = await generateText({\n  model: zhipu('glm-5'),\n  prompt: 'Explain quantum computing in simple terms.',\n  providerOptions: {\n    zhipu: {\n      thinking: {\n        type: 'disabled'\n      }\n    }\n  }\n});\n```\n\nFor GLM-5.2 and newer models, use `reasoningEffort` to control how much\nreasoning the model applies. It accepts `max`, `xhigh`, `high`, `medium`,\n`low`, `minimal`, and `none`:\n\n```ts\nconst { text } = await generateText({\n  model: zhipu('glm-5.2'),\n  prompt: 'Design a resilient recommendation system.',\n  providerOptions: {\n    zhipu: {\n      thinking: { type: 'enabled' },\n      reasoningEffort: 'high',\n    },\n  },\n});\n```\n\nThe provider forwards `reasoningEffort` for any model ID, so future Z.ai\nmodels do not require a provider update. It warns, without blocking the\nrequest, when a recognized GLM-5.1-or-earlier model is used because Z.ai will\nlikely ignore `reasoning_effort` for those models.\n\nOnly function tools are supported. Provider-defined tools are not currently implemented.\n\n## Embedding Example\n\n```ts\nconst { embedding } = await embed({\n  model: zhipu.embeddingModel(\"embedding-3\", {\n    dimensions: 256, // Optional, defaults to 2048\n  }),\n  value: \"Hello, world!\",\n});\n\nconsole.log(embedding);\n```\n\n`textEmbeddingModel(...)` is still available as a deprecated compatibility alias.\n\n## Image Generation Example\n\nZhipu supports image generation with `glm-image` or `cogview` models, but the api does not return images in base64 or buffer format, so the image urls are returned in the `providerMetadata` field.\n\n```ts\nimport { experimental_generateImage as generateImage } from 'ai';\nimport { zhipu } from 'zhipu-ai-provider';\n\nconst { image, providerMetadata } = await generateImage({\n  model: zhipu.imageModel('glm-image'),  // or use 'Cogview-3-Flash' for free\n  prompt: 'A beautiful landscape with mountains and a river',\n  size: '1024x1024',  // optional\n  providerOptions: {  // optional\n      zhipu: {\n          quality: 'hd'\n      }\n  }\n});\n\nconsole.log(providerMetadata.zhipu.images[0].url)\n```\n\n## Features Support\n\n\n| Feature                                                         | Zhipu ([bigmodel.cn](https://bigmodel.cn/)) | Z.ai ([z.ai](https://z.ai/)) |\n| --------------------------------------------------------------- | ------------------------------------------- | ---------------------------- |\n| Text generation                                                 | ✓                                           | ✓                            |\n| Streaming                                                       | ✓                                           | ✓                            |\n| Embedding                                                       | ✓                                           | x                            |\n| Image generation                                                | ✓                                           | ✓                            |\n| Tools                                                           | ✓                                           | ✓                            |\n| JSON response format                                            | ✓                                           | ✓                            |\n| Reasoning                                                       | ✓                                           | ✓                            |\n| Vision                                                          | ✓                                           | ✓                            |\n| Vision reasoning                                                | ✓                                           | ✓                            |\n| Schema-guided structured output for reasoning and vision models | —                                           | —                            |\n| Provider-defined tools                                          | —                                           | —                            |\n| Video models                                                    | —                                           | —                            |\n| Audio models                                                    | —                                           | —                            |\n| OCR models                                                      | —                                           | —                            |\n\n\n## Documentation\n\n- **[Zhipu documentation](https://bigmodel.cn/dev/welcome)** \n- **[Z.AI documentation](https://docs.z.ai/)**\n- **[Vercel AI SDK documentation](https://sdk.vercel.ai/docs/introduction)**\n- **[Zhipu AI Provider Repo](https://github.com/Xiang-CH/zhipu-ai-provider)**\n\n## Maintainer Examples\n\nRunnable maintainer-facing demo scripts live in [examples/README.md](examples/README.md). They cover text generation, streaming, reasoning, tool calls, vision prompts, embeddings, and image generation.\n","readmeFilename":"README.md"}