{"_id":"@ainative/ai-sdk-provider","name":"@ainative/ai-sdk-provider","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ainative/ai-sdk-provider","version":"1.0.0","description":"AINative provider for the Vercel AI SDK — free Llama, Qwen, and DeepSeek models with zero config","main":"index.cjs","module":"index.js","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"}},"scripts":{"test":"node --test tests/basic.test.js","prepublishOnly":"npm test"},"keywords":["ai-sdk","vercel-ai","ai-provider","openai-compatible","free-llm","llama","qwen","deepseek","ainative","zerodb","auto-provisioning","chat-completion","embeddings","tool-calling","streaming","claude","cursor","windsurf","next-js","react","serverless"],"dependencies":{"@ai-sdk/openai":"^1.0.0"},"peerDependencies":{"ai":">=3.0.0"},"peerDependenciesMeta":{"ai":{"optional":false}},"repository":{"type":"git","url":"git+https://github.com/AINative-Studio/ainative-ai-sdk-provider.git"},"homepage":"https://ainative.studio","bugs":{"url":"https://github.com/AINative-Studio/ainative-ai-sdk-provider/issues"},"author":{"name":"AINative Studio","email":"engineering@ainative.studio"},"license":"MIT","engines":{"node":">=18"},"_id":"@ainative/ai-sdk-provider@1.0.0","gitHead":"1c2fe844936d16826d6ff77fd3e2b764ca95d94e","_nodeVersion":"22.21.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-gOaJAldPzoCYefEgW2aP/TIvmtlRYWCp2gmGLPfDua5KAkWSOWceuFYtyN+cOYtrERhAsV5sywgWHfVvtywUfw==","shasum":"0dd54a16ac6ff4f2f08e1543a33ec165dcda192a","tarball":"https://registry.npmjs.org/@ainative/ai-sdk-provider/-/ai-sdk-provider-1.0.0.tgz","fileCount":6,"unpackedSize":11422,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE2klCyIsSRVQtTQdo/9QdRkobQT2H8ervLzuNDWCkQvAiEA66yZpSSjH4obEiux4ZHTx/TSdyDVvJH9uywttx4wRno="}]},"_npmUser":{"name":"ainative-studio","email":"toby@rely.ventures"},"directories":{},"maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-sdk-provider_1.0.0_1781079593952_0.38467940602575434"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T08:19:53.762Z","1.0.0":"2026-06-10T08:19:54.063Z","modified":"2026-06-10T08:19:54.257Z"},"maintainers":[{"name":"ainative-studio","email":"toby@rely.ventures"}],"description":"AINative provider for the Vercel AI SDK — free Llama, Qwen, and DeepSeek models with zero config","homepage":"https://ainative.studio","keywords":["ai-sdk","vercel-ai","ai-provider","openai-compatible","free-llm","llama","qwen","deepseek","ainative","zerodb","auto-provisioning","chat-completion","embeddings","tool-calling","streaming","claude","cursor","windsurf","next-js","react","serverless"],"repository":{"type":"git","url":"git+https://github.com/AINative-Studio/ainative-ai-sdk-provider.git"},"author":{"name":"AINative Studio","email":"engineering@ainative.studio"},"bugs":{"url":"https://github.com/AINative-Studio/ainative-ai-sdk-provider/issues"},"license":"MIT","readme":"# @ainative/ai-sdk-provider\n\nAINative provider for the [Vercel AI SDK](https://sdk.vercel.ai). Use free Llama, Qwen, and DeepSeek models with zero config.\n\n## Install\n\n```bash\nnpm install @ainative/ai-sdk-provider ai\n```\n\n## Quick Start\n\n```typescript\nimport { generateText } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\n\nconst { text } = await generateText({\n  model: ainative('meta-llama/Llama-3.3-70B-Instruct'),\n  prompt: 'Explain quantum computing in simple terms',\n});\n\nconsole.log(text);\n```\n\nNo API key required — auto-provisioning gives you instant free-tier access.\n\n## Available Models\n\n| Model ID | Description |\n|----------|-------------|\n| `meta-llama/Llama-3.3-70B-Instruct` | Llama 3.3 70B (default) |\n| `qwen3-coder-flash` | Qwen3 Coder Flash |\n| `deepseek-4-flash` | DeepSeek 4 Flash |\n| `kimi-k2` | Kimi K2 |\n\n## Streaming\n\n```typescript\nimport { streamText } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\n\nconst result = streamText({\n  model: ainative('meta-llama/Llama-3.3-70B-Instruct'),\n  prompt: 'Write a haiku about programming',\n});\n\nfor await (const chunk of result.textStream) {\n  process.stdout.write(chunk);\n}\n```\n\n## Structured Output\n\n```typescript\nimport { generateObject } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\nimport { z } from 'zod';\n\nconst { object } = await generateObject({\n  model: ainative('qwen3-coder-flash'),\n  schema: z.object({\n    recipe: z.object({\n      name: z.string(),\n      ingredients: z.array(z.string()),\n      steps: z.array(z.string()),\n    }),\n  }),\n  prompt: 'Generate a recipe for pasta carbonara',\n});\n```\n\n## Tool Calling\n\n```typescript\nimport { generateText, tool } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\nimport { z } from 'zod';\n\nconst { text } = await generateText({\n  model: ainative('qwen3-coder-flash'),\n  tools: {\n    weather: tool({\n      description: 'Get the weather for a location',\n      parameters: z.object({\n        location: z.string().describe('City name'),\n      }),\n      execute: async ({ location }) => ({\n        temperature: 72,\n        condition: 'sunny',\n        location,\n      }),\n    }),\n  },\n  prompt: 'What is the weather in San Francisco?',\n});\n```\n\n## Next.js API Route\n\n```typescript\n// app/api/chat/route.ts\nimport { streamText } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\n\nexport async function POST(req: Request) {\n  const { messages } = await req.json();\n\n  const result = streamText({\n    model: ainative('meta-llama/Llama-3.3-70B-Instruct'),\n    messages,\n  });\n\n  return result.toDataStreamResponse();\n}\n```\n\n## Embeddings\n\n```typescript\nimport { embed } from 'ai';\nimport { ainative } from '@ainative/ai-sdk-provider';\n\nconst { embedding } = await embed({\n  model: ainative.embedding('text-embedding-3-small'),\n  value: 'The quick brown fox jumps over the lazy dog',\n});\n```\n\n## Configuration\n\n### Custom API Key\n\n```typescript\nimport { createAINative } from '@ainative/ai-sdk-provider';\n\nconst ainative = createAINative({\n  apiKey: 'your-api-key',\n});\n```\n\n### Environment Variables\n\nThe provider checks these environment variables in order:\n\n1. `AINATIVE_API_KEY`\n2. `OPENAI_API_KEY`\n3. Falls back to auto-provisioning (no key needed)\n\n### Custom Base URL\n\n```typescript\nimport { createAINative } from '@ainative/ai-sdk-provider';\n\nconst provider = createAINative({\n  baseURL: 'https://your-custom-endpoint.com/v1',\n});\n```\n\n## Migrating from OpenAI\n\nReplace one import:\n\n```diff\n- import { openai } from '@ai-sdk/openai';\n+ import { ainative } from '@ainative/ai-sdk-provider';\n\nconst { text } = await generateText({\n-  model: openai('gpt-4o'),\n+  model: ainative('meta-llama/Llama-3.3-70B-Instruct'),\n  prompt: 'Hello!',\n});\n```\n\n## Free Tier\n\nAINative provides free access to open-source models:\n\n- No credit card required\n- Auto-provisioning creates an account instantly\n- Rate limits: 10 RPM for free tier\n- Upgrade at [ainative.studio](https://ainative.studio) for higher limits\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-9130e3ce814d5b433e3186b6c33c3c96"}