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

@aparte/provider-ai-sdk

v1.16.0

Published

Bridge any Vercel AI SDK model into aparté — bring your own @ai-sdk/* package (Anthropic, Google, OpenAI, 25+ vendors) and aparté renders it.

Readme

@aparte/provider-ai-sdk

Bridge any Vercel AI SDK model into aparté. aparté's own wire concern is deliberately tiny — @aparte/provider-openai-compat covers the one de-facto-standard format; everything else (Anthropic, Google, Bedrock, 25+ vendors) rides the AI SDK ecosystem through this bridge. You bring your @ai-sdk/* package, hand its model to createAiSdkProvider, and the bridge maps streamText's fullStream to aparté's events.

npm install @aparte/provider-ai-sdk @aparte/core ai @ai-sdk/anthropic

ai and your chosen @ai-sdk/* vendor package are peer dependencies — you pick the versions, and only the vendors you actually use end up in your bundle. @aparte/core is a peer too.

import { createAnthropic } from '@ai-sdk/anthropic';
import { createAiSdkProvider } from '@aparte/provider-ai-sdk';
import { aparteGlobalConfig } from '@aparte/core';

aparteGlobalConfig.registerAIProvider(createAiSdkProvider({
    id: 'anthropic',
    name: 'Anthropic',
    models: [{ id: 'claude-sonnet-5-5', name: 'Claude Sonnet 5.5' }],
    languageModel: (modelId, auth) =>
        createAnthropic({ apiKey: typeof auth === 'string' ? auth : auth?.['apiKey'] })(modelId),
}));

ai is a peerDependency pinned to the verified major (^7) — this bridge is the only aparté module touching the SDK's types. @aparte/core is a peer dependency.

Sources and citations

A model that searches the web or reads documents reports what it drew on as source parts in the SDK's stream. The bridge collects them and ends the turn with one sources event, just before done: aparté lists the sources under the reply, and puts a chip in the text wherever the vendor says a passage is cited. Nothing to configure — a model that reports no source leaves the stream as it was.

import { createPerplexity } from '@ai-sdk/perplexity';
import { createAiSdkProvider } from '@aparte/provider-ai-sdk';
import { aparteGlobalConfig } from '@aparte/core';

// Sonar searches the web: each page it reads arrives as a `source` part.
aparteGlobalConfig.registerAIProvider(createAiSdkProvider({
    id: 'perplexity',
    name: 'Perplexity',
    models: [{ id: 'sonar', name: 'Sonar' }],
    languageModel: (modelId, auth) =>
        createPerplexity({ apiKey: typeof auth === 'string' ? auth : auth?.['apiKey'] })(modelId),
}));
  • A url source becomes { id, url, title }; a document source { id, title } (its filename when it has no title) and no link. The same URL reported twice is one source.
  • From ai 7.0.138 a text-end part may carry citations: each names a source and, when the vendor says so, the passage it supports, with offsets relative to that text part. The bridge rebases them onto the whole reply, so the chip lands after the right sentence. A citation with no offsets supports its whole text part; a vendor's citedText becomes the source's snippet. On an older ai the field is simply absent and only the list of sources is shown.
  • A non-streamed request (stream: false) that cites sources returns the stream [text, sources, done] instead of a bare string; one that cites nothing still returns the string.

Works on the server too. This bridge touches no DOM, and core resolves its DOM-free entry under Node's export condition — so it runs in a backend, an Electron main process or an SSR pass as well as in the browser.

Part of the aparté monorepo. ESM-only. See the Providers guide in the docs for the full usage.