npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@seedkit-ai/ai-sdk-provider

v0.1.7

Published

Seed adapter for AI SDK

Downloads

166

Readme

AI SDK Seed Adapter

Seed (Doubao) provider for the AI SDK.

Installation

npm install @seedkit-ai/ai-sdk-provider

Setup

Set your Seed API key as an environment variable:

export ARK_API_KEY=your-api-key

Or pass it directly when creating the provider:

import { createSeed } from '@seedkit-ai/ai-sdk-provider';

const seed = createSeed({
  apiKey: 'your-api-key',
});

Usage

Basic Text Generation

import { generateText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';

const { text } = await generateText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'What is the meaning of life?',
});

console.log(text);

Streaming

import { streamText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';

const result = streamText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'Write a short story about a robot.',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Extended Thinking Mode

Enable extended thinking to get reasoning content from the model:

import { streamText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';

const result = streamText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'Solve this step by step: What is 23 * 47?',
  providerOptions: {
    seed: {
      thinking: true,
    },
  },
});

for await (const part of result.fullStream) {
  if (part.type === 'reasoning-delta') {
    process.stdout.write(`[Thinking] ${part.text}`);
  } else if (part.type === 'text-delta') {
    process.stdout.write(part.text);
  }
}

PDF File Support

You can include PDF files in your messages:

import { generateText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';
import fs from 'fs';

const pdfBuffer = fs.readFileSync('document.pdf');

const { text } = await generateText({
  model: seed('doubao-seed-1-6-vision-250815'),
  messages: [
    {
      role: 'user',
      content: [
        {
          type: 'file',
          data: pdfBuffer,
          mimeType: 'application/pdf',
        },
        {
          type: 'text',
          text: 'Summarize this PDF document.',
        },
      ],
    },
  ],
});

Image Generation

Generate images using Seed's image models:

import { generateImage } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';

const { images } = await generateImage({
  model: seed.image('doubao-seedream-4-5-251128'),
  prompt: 'A beautiful sunset over mountains',
  size: '1024x1024',
});

// images[0] contains the base64 encoded image

Tool Calling

import { generateText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';
import { z } from 'zod';

const { text, toolCalls } = await generateText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'What is the weather in San Francisco?',
  tools: {
    getWeather: {
      description: 'Get the weather for a location',
      parameters: z.object({
        location: z.string().describe('The city name'),
      }),
      execute: async ({ location }) => {
        return { temperature: 72, condition: 'sunny' };
      },
    },
  },
});

Web Search Tool

Use the built-in web search tool:

import { generateText } from 'ai';
import { seed, seedTools } from '@seedkit-ai/ai-sdk-provider';

const { text } = await generateText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'What are the latest news about AI?',
  tools: {
    webSearch: seedTools.webSearch(),
  },
});

Supported Models

Chat Models

  • doubao-seed-1-8-251228 - Latest Doubao Seed model
  • doubao-seed-code-preview-251028 - Code-optimized model
  • doubao-seed-1-6-lite-251015 - Lightweight model
  • doubao-seed-1-6-flash-250828 - Fast inference model
  • doubao-seed-1-6-vision-250815 - Vision-capable model (supports images and PDFs)

Image Models

  • doubao-seedream-4-5-251128 - Latest Seedream image generation model
  • doubao-seedream-4-0-250828 - Seedream 4.0 model

You can also use any model ID string for custom endpoints.

Provider Options

import { createSeed } from '@seedkit-ai/ai-sdk-provider';

const seed = createSeed({
  // Custom base URL (default: https://ark.cn-beijing.volces.com/api/v3)
  baseURL: 'https://your-custom-endpoint.com/api/v3',

  // API key (default: ARK_API_KEY env variable)
  apiKey: 'your-api-key',

  // Custom headers
  headers: {
    'X-Custom-Header': 'value',
  },

  // Custom fetch implementation
  fetch: customFetch,
});

Model Options

import { generateText } from 'ai';
import { seed } from '@seedkit-ai/ai-sdk-provider';

const { text } = await generateText({
  model: seed('doubao-seed-1-8-251228'),
  prompt: 'Hello!',
  providerOptions: {
    seed: {
      // Enable extended thinking mode
      thinking: true,

      // Enable structured outputs
      structuredOutputs: true,

      // Enable strict JSON schema validation
      strictJsonSchema: false,

      // Enable parallel tool calls
      parallelToolCalls: true,
    },
  },
});

License

MIT