{"_id":"@coralbricks/ai-sdk-provider","_rev":"2-30b0f96bd1fd5e206f30f4fe15ab44f6","name":"@coralbricks/ai-sdk-provider","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@coralbricks/ai-sdk-provider","version":"0.1.0","keywords":["ai-sdk","vercel-ai-sdk","coralbricks","inference","glm","kimi","gpt-oss","openai-compatible","llm"],"license":"Apache-2.0","_id":"@coralbricks/ai-sdk-provider@0.1.0","maintainers":[{"name":"divyvasal","email":"divy@coralbricks.ai"}],"homepage":"https://github.com/Coral-Bricks-AI/www#readme","bugs":{"url":"https://github.com/Coral-Bricks-AI/www/issues"},"dist":{"shasum":"43905ce73afe455523875e0ce028bf67b4a24028","tarball":"https://registry.npmjs.org/@coralbricks/ai-sdk-provider/-/ai-sdk-provider-0.1.0.tgz","fileCount":8,"integrity":"sha512-DkmCkraVd3vNzhnCbWjHMIwTdtcRVjkR/0WLLivatZLXEsfxeSep/uvx7cZf0TY611qwVsXNYSDSMW00fmy1bQ==","signatures":[{"sig":"MEUCIQC9+t2u07Lm/ExAK1AWKr7oUB3MiLCgctKuZRfLUZLqHQIgatIO26sGs0vSIjZhcxMgAxqK8kQ3O7/Vhpz08lQYlxE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18736},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"16b708312a8a3435fbb082aaa9a0068c4adf0b41","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"divyvasal","email":"divy@coralbricks.ai"},"repository":{"url":"git+https://github.com/Coral-Bricks-AI/www.git","type":"git","directory":"integrations/ai-sdk-provider"},"_npmVersion":"11.17.0","description":"Vercel AI SDK provider for CoralBricks — GLM and Kimi open models with up to 1M context, free cached input.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"@ai-sdk/provider-utils":"^5.0.0","@ai-sdk/openai-compatible":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^26.2.0"},"peerDependencies":{"zod":"^3.0.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-sdk-provider_0.1.0_1786330639406_0.6856089828008631","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"_id":"@coralbricks/ai-sdk-provider@0.1.1","bugs":{"url":"https://github.com/Coral-Bricks-AI/www/issues"},"dist":{"shasum":"4cd5758cb6eb254306f69e69655082f9e85c0a54","tarball":"https://registry.npmjs.org/@coralbricks/ai-sdk-provider/-/ai-sdk-provider-0.1.1.tgz","fileCount":8,"integrity":"sha512-9ame9icwktzTsFnvqCsZkuZMliXnbrsvmFpSQh8OZfYxY49Jmr8zuMLFwzem7iGv8WeYujl8cGnQODe4Fa6Yrw==","signatures":[{"sig":"MEYCIQDpbyadJolBzGs2Wael09KDzBMpSg2ftLqG26oe44CK6wIhAKmp/kA1lQ/U26J0qF/EBbVWmc6QHWuh2zzEZ54W9yhr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGHf3oaKwwsJzlvmR+cY5eMAipojYjRiGwlMsPRhcMHvAiBCjT9obV/R4R7bVSOGLNpMQoVWAzCfnixdgDs3eRZJpg=="}],"unpackedSize":19110},"main":"./dist/index.cjs","name":"@coralbricks/ai-sdk-provider","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"d2748ddf6210e5f2bb1e6b19494df8a3e4f932a7","license":"Apache-2.0","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"version":"0.1.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:26920e44-1a10-41ff-b586-043d642bf3a9"}},"homepage":"https://github.com/Coral-Bricks-AI/www#readme","keywords":["ai-sdk","vercel-ai-sdk","coralbricks","inference","glm","deepseek","openai-compatible","llm"],"repository":{"url":"git+https://github.com/Coral-Bricks-AI/www.git","type":"git","directory":"integrations/ai-sdk-provider"},"_npmVersion":"12.0.2","description":"Vercel AI SDK provider for CoralBricks — GLM and DeepSeek open models with up to 1M context, free cached input.","directories":{},"maintainers":[{"name":"divyvasal","email":"divy@coralbricks.ai"}],"_nodeVersion":"22.23.2","dependencies":{"@ai-sdk/provider-utils":"^5.0.0","@ai-sdk/openai-compatible":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^26.2.0"},"peerDependencies":{"zod":"^3.0.0 || ^4.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-sdk-provider_0.1.1_1790107506625_0.09850667194815976"}}},"time":{"created":"2026-08-10T02:57:19.257Z","modified":"2026-09-22T20:05:06.902Z","0.1.0":"2026-08-10T02:57:19.565Z","0.1.1":"2026-09-22T20:05:06.720Z"},"bugs":{"url":"https://github.com/Coral-Bricks-AI/www/issues"},"license":"Apache-2.0","homepage":"https://github.com/Coral-Bricks-AI/www#readme","keywords":["ai-sdk","vercel-ai-sdk","coralbricks","inference","glm","deepseek","openai-compatible","llm"],"repository":{"url":"git+https://github.com/Coral-Bricks-AI/www.git","type":"git","directory":"integrations/ai-sdk-provider"},"description":"Vercel AI SDK provider for CoralBricks — GLM and DeepSeek open models with up to 1M context, free cached input.","maintainers":[{"name":"divyvasal","email":"divy@coralbricks.ai"}],"readme":"# @coralbricks/ai-sdk-provider\n\n[Vercel AI SDK](https://ai-sdk.dev) provider for **CoralBricks** — open-model\ninference (GLM 5.3, GLM 5.3 Flash, DeepSeek V4.1 Flash) with up to 1M-token context and\n**free cached input**.\n\nA thin, typed wrapper over\n[`@ai-sdk/openai-compatible`](https://www.npmjs.com/package/@ai-sdk/openai-compatible)\nthat presets the gateway endpoint and model catalog, so it works with zero\nconfiguration like the first-party `@ai-sdk/*` providers.\n\n## Install\n\n```sh\nnpm install @coralbricks/ai-sdk-provider ai\n```\n\n## Usage\n\nSet `CORALBRICKS_API_KEY` (get a key at\n[coralbricks.ai/api-keys](https://www.coralbricks.ai/api-keys)), then:\n\n```ts\nimport { generateText } from 'ai'\nimport { coralbricks } from '@coralbricks/ai-sdk-provider'\n\nconst { text } = await generateText({\n  model: coralbricks('glm-5.3-fp4'),\n  prompt: 'Explain prompt caching in one sentence.',\n})\n```\n\nStreaming, tools, and structured output work through the standard AI SDK\nfunctions (`streamText`, `generateObject`, …) — CoralBricks speaks the\nOpenAI wire format, including streaming tool calls.\n\n### Custom instance\n\n```ts\nimport { createCoralBricks } from '@coralbricks/ai-sdk-provider'\n\nconst coralbricks = createCoralBricks({\n  apiKey: process.env.MY_KEY,          // default: CORALBRICKS_API_KEY\n  baseURL: 'https://inference.coralbricks.ai/v1', // default\n  headers: { 'x-my-header': '1' },\n})\n```\n\n## Models\n\n| Model | Model ID | Context | Input $/M | Cache Write $/M | Output $/M |\n| --- | --- | --- | --- | --- | --- |\n| GLM 5.3 | `glm-5.3-fp4` | 1M | $1.12 | $1.68 | $4.40 |\n| GLM 5.3 Flash | `glm-5.3-flash-fp4` | 1M | $0.15 | $0.23 | $0.50 |\n| DeepSeek V4.1 Flash | `deepseek-v4.1-flash-fast-fp4` | 1M | $0.30 | $0.09 | $1.20 |\n\nCached input tokens are always free; prompt tokens CoralBricks has not cached\nyet bill once at the Cache Write rate, in place of the Input rate. Rates per\n[coralbricks.ai/pricing](https://www.coralbricks.ai/pricing). The model-id type is open\n(`string & {}`), so a newly launched model works before this package updates.\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}