{"_id":"@amanm/vertex-maas","_rev":"3-5ca4c4c36fc5eed1e5733e316b78cd31","name":"@amanm/vertex-maas","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@amanm/vertex-maas","version":"0.0.1","keywords":["ai"],"license":"Apache-2.0","_id":"@amanm/vertex-maas@0.0.1","maintainers":[{"name":"aman-mehtar","email":"amanmstudies@gmail.com"}],"homepage":"https://ai-sdk.dev/docs","bugs":{"url":"https://github.com/vercel/ai/issues"},"dist":{"shasum":"6ba56d64b5e09b4aa758450792965e1dd6a2c1cc","tarball":"https://registry.npmjs.org/@amanm/vertex-maas/-/vertex-maas-0.0.1.tgz","fileCount":15,"integrity":"sha512-FnhBXrPYdJu7slaViePFfSj93iW1TZ5KclYB1WHyrvEc5hlODM3L3/cfgfUCYFeBOnv5SsNc3Qcga2vkwd1hPg==","signatures":[{"sig":"MEUCID5kti3sVZcZiAoNglB0qc5oexCF1pZo5OutpAJeCg3LAiEApIgf/h2PDHG6oh5eaPCJ/pl7MLnWAXXLmMzsZlzXr8o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55220},"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":"ed4b59925471b484be8a980cd228b41342346f82","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"vitest --config vitest.node.config.js --run","build":"pnpm clean && tsup --tsconfig tsconfig.build.json","clean":"del-cli dist *.tsbuildinfo","test:watch":"vitest --config vitest.node.config.js","type-check":"tsc --build","build:watch":"pnpm clean && tsup --watch","test:update":"vitest --config vitest.node.config.js -u","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"aman-mehtar","email":"amanmstudies@gmail.com"},"repository":{"url":"git+https://github.com/vercel/ai.git","type":"git"},"_npmVersion":"10.9.4","description":"Vertex MaaS provider for the Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@ai-sdk/provider":"^3.0.8","google-auth-library":"^10.5.0","@ai-sdk/provider-utils":"^4.0.15","@ai-sdk/openai-compatible":"^2.0.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.25.76","tsup":"^8","typescript":"5.8.3","@types/node":"20.17.24","@ai-sdk/test-server":"workspace:*","@vercel/ai-tsconfig":"workspace:*"},"peerDependencies":{"zod":"^3.25.76 || ^4.1.8"},"_npmOperationalInternal":{"tmp":"tmp/vertex-maas_0.0.1_1771101425080_0.29940828852163914","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@amanm/vertex-maas","version":"0.0.2","keywords":["ai"],"license":"Apache-2.0","_id":"@amanm/vertex-maas@0.0.2","maintainers":[{"name":"aman-mehtar","email":"amanmstudies@gmail.com"}],"homepage":"https://github.com/amanmprojects/vertex-maas#readme","bugs":{"url":"https://github.com/amanmprojects/vertex-maas/issues"},"dist":{"shasum":"de05c81f424dbd1bc86bc48dd8f3d4749a82cba4","tarball":"https://registry.npmjs.org/@amanm/vertex-maas/-/vertex-maas-0.0.2.tgz","fileCount":15,"integrity":"sha512-sKYO8zz02EbdbnCHVFo+Spn1+30E7QURGEXJPPlt9Y8fo6bASAainGYbWmBkittD3Locp9aGhHYhGY+DBPCY2g==","signatures":[{"sig":"MEYCIQCzd0L9mInpWnRDjfad2zQVZhp/RFbIsuinnLomVunwkwIhAJnjiLffTX5Ni6DLn9RGQ7ZhRkCTwawxmaB7UAUavvfh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55309},"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":"d0c67fa60175c825b5a88a2f14d3c3a12406a0a4","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"vitest --config vitest.node.config.js --run","build":"pnpm clean && tsup --tsconfig tsconfig.build.json","clean":"del-cli dist *.tsbuildinfo","prepack":"pnpm build","test:watch":"vitest --config vitest.node.config.js","type-check":"tsc --build","build:watch":"pnpm clean && tsup --watch","test:update":"vitest --config vitest.node.config.js -u","prettier-check":"prettier --check \"./**/*.ts*\""},"_npmUser":{"name":"aman-mehtar","email":"amanmstudies@gmail.com"},"repository":{"url":"git+https://github.com/amanmprojects/vertex-maas.git","type":"git"},"_npmVersion":"10.9.4","description":"Vertex MaaS provider for the Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@ai-sdk/provider":"^3.0.8","google-auth-library":"^10.5.0","@ai-sdk/provider-utils":"^4.0.15","@ai-sdk/openai-compatible":"^2.0.30"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.25.76","tsup":"^8","typescript":"5.8.3","@types/node":"20.17.24","@ai-sdk/test-server":"workspace:*","@vercel/ai-tsconfig":"workspace:*"},"peerDependencies":{"zod":"^3.25.76 || ^4.1.8"},"_npmOperationalInternal":{"tmp":"tmp/vertex-maas_0.0.2_1771102190717_0.6829010522520864","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@amanm/vertex-maas","version":"0.0.3","license":"Apache-2.0","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"pnpm clean && tsup --tsconfig tsconfig.build.json","build:watch":"pnpm clean && tsup --watch","clean":"del-cli dist *.tsbuildinfo","prepack":"pnpm build","lint":"eslint \"./**/*.ts*\"","type-check":"tsc --build","prettier-check":"prettier --check \"./**/*.ts*\"","test":"vitest --config vitest.node.config.js --run","test:update":"vitest --config vitest.node.config.js -u","test:watch":"vitest --config vitest.node.config.js"},"exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"dependencies":{"@ai-sdk/openai-compatible":"^2.0.30","@ai-sdk/provider":"^3.0.8","@ai-sdk/provider-utils":"^4.0.15","google-auth-library":"^10.5.0"},"devDependencies":{"@ai-sdk/test-server":"workspace:*","@types/node":"20.17.24","@vercel/ai-tsconfig":"workspace:*","tsup":"^8","typescript":"5.8.3","zod":"3.25.76"},"peerDependencies":{"zod":"^3.25.76 || ^4.1.8"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"homepage":"https://github.com/amanmprojects/vertex-maas#readme","repository":{"type":"git","url":"git+https://github.com/amanmprojects/vertex-maas.git"},"bugs":{"url":"https://github.com/amanmprojects/vertex-maas/issues"},"keywords":["ai"],"_id":"@amanm/vertex-maas@0.0.3","gitHead":"d0c67fa60175c825b5a88a2f14d3c3a12406a0a4","description":"Vertex MaaS provider for the Vercel AI SDK.","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-GtdeH1YpQs1vw1vo0MWx4FPTcoGh+6+xvy8C0DcalSAB+cCAHSYEhEfFKYoIhcJmht6rq7ry8aQJ3utX3byLlQ==","shasum":"c7a57cd8a3c5d3f0056583074cc1cf812023a4d1","tarball":"https://registry.npmjs.org/@amanm/vertex-maas/-/vertex-maas-0.0.3.tgz","fileCount":15,"unpackedSize":66686,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDNiUqK+qfm+VIQ9U1Xlpi4RsXSc+VzjYcPbhOluEwITQIgbVGQXSqZpoR8bKzovohFZcF/p6cRgbQh+XP7uQpILEE="}]},"_npmUser":{"name":"aman-mehtar","email":"amanmstudies@gmail.com"},"directories":{},"maintainers":[{"name":"aman-mehtar","email":"amanmstudies@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vertex-maas_0.0.3_1771105033151_0.5453252643870019"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-14T20:37:04.958Z","modified":"2026-02-14T21:37:13.426Z","0.0.1":"2026-02-14T20:37:05.249Z","0.0.2":"2026-02-14T20:49:50.864Z","0.0.3":"2026-02-14T21:37:13.314Z"},"bugs":{"url":"https://github.com/amanmprojects/vertex-maas/issues"},"license":"Apache-2.0","homepage":"https://github.com/amanmprojects/vertex-maas#readme","keywords":["ai"],"repository":{"type":"git","url":"git+https://github.com/amanmprojects/vertex-maas.git"},"description":"Vertex MaaS provider for the Vercel AI SDK.","maintainers":[{"name":"aman-mehtar","email":"amanmstudies@gmail.com"}],"readme":"# @amanm/vertex-maas\n\nVertex MaaS provider for the Vercel AI SDK.\n\nThis provider targets **Vertex AI models exposed via OpenAI-compatible endpoints** and authenticates using **Google Application Default Credentials (ADC)** (service account JSON via `GOOGLE_APPLICATION_CREDENTIALS`, workload identity, etc.).\n\n## Requirements\n\n- Node.js runtime (not Edge)\n- ADC configured (commonly via `GOOGLE_APPLICATION_CREDENTIALS`)\n- Set `GOOGLE_VERTEX_PROJECT` and `GOOGLE_VERTEX_LOCATION` (or pass `project`/`location` to `createVertexMaaS`)\n\n## Usage\n\n```ts\nimport { generateText } from 'ai';\nimport { createVertexMaaS } from '@amanm/vertex-maas';\n\nconst vertex = createVertexMaaS({\n  project: process.env.GOOGLE_VERTEX_PROJECT!,\n  location: process.env.GOOGLE_VERTEX_LOCATION!, // e.g. \"global\" or \"us-central1\"\n});\n\nconst result = await generateText({\n  model: vertex('glm-4.7'),\n  prompt: 'Explain Amdahl\\\\'s Law in simple terms.',\n});\n```\n\n## Settings\n\n- `baseURL`: Optional. If set, used directly.\n- `project` / `location`: Used to compute the Vertex OpenAI-compatible base URL if `baseURL` is not provided.\n- `apiKey`: Optional. If set, uses a static `Authorization: Bearer <apiKey>` header (no ADC).\n- `googleAuthOptions`: Optional. Passed to `google-auth-library` `GoogleAuth`.\n- `opencodeCompat`: Optional. If `true`, maps `finish.finishReason` from `{ unified, raw }` to `unified` in `doStream()` for OpenCode.\n\n## OpenCode\n\nOpenCode currently expects the model stream `finishReason` to be a string.\n\nSet `opencodeCompat: true` in your OpenCode provider options:\n\n```json\n{\n  \"provider\": {\n    \"vertexmaas\": {\n      \"npm\": \"@amanm/vertex-maas\",\n      \"options\": {\n        \"project\": \"common-project-by-aman\",\n        \"location\": \"global\",\n        \"opencodeCompat\": true\n      },\n      \"models\": {\n        \"glm-4.7-maas\": { \"id\": \"zai-org/glm-4.7-maas\" }\n      }\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}