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

@nimiplatform/sdk-adapter-vercel-ai

v0.1.0

Published

Use this adapter to retain Vercel's model, streaming and caller-owned tool-loop interfaces while Nimi owns execution configuration and protected access. Adapter 0.1.0 uses SDK 0.13.0, Kit/native 0.9.0 and a matching Runtime. SDK 0.12.0 / Kit 0.8.0 alone d

Readme

Nimi adapter for Vercel AI SDK 6

Use this adapter to retain Vercel's model, streaming and caller-owned tool-loop interfaces while Nimi owns execution configuration and protected access. Adapter 0.1.0 uses SDK 0.13.0, Kit/native 0.9.0 and a matching Runtime. SDK 0.12.0 / Kit 0.8.0 alone do not carry Local App images.

Local App

Obtain the Host-bound NimiLocalAppClient through the standard Kit carrier, then construct the model in the App's request scope:

import { convertToModelMessages, stepCountIs, streamText } from 'ai';
import { createNimiLocalAppVercelLanguageModel } from '@nimiplatform/sdk-adapter-vercel-ai';

const model = createNimiLocalAppVercelLanguageModel({ ai: client.ai });
const result = streamText({
  model,
  messages: await convertToModelMessages(uiMessages),
  tools: callerTools,
  stopWhen: stepCountIs(5),
  abortSignal,
});
return result.toUIMessageStreamResponse();

The App continues to own tool callbacks, user approval, diagram editing, file processing, state and UI. The model adapter emits tool calls only after the Nimi step has successful terminal evidence, so a failed or interrupted model batch cannot trigger a Vercel tool callback. Text displayed before that terminal state remains partial. Malformed output is not replaced with a success value.

User image files are uploaded through this same App client's artifact API. HTTP(S) image URLs are passed to the Runtime input path. Base64 decoding in the adapter is transport conversion, not image interpretation; inline binary and data URIs never enter the protected text-turn request. Persist original files or App storage references for history; transient Runtime artifact references are not a durable replacement for the image. No cross-session upload cache is created by this adapter.

Conversation history and continuity

Preserve complete UI message parts, including text providerMetadata and tool callProviderMetadata. The adapter uses versioned providerMetadata.nimi to relay opaque continuity before/after the associated visible part. Its base64 payload is never display reasoning. convertToModelMessages restores it to the canonical ordered Nimi transcript; do not flatten history into text or discard provider metadata when serializing it.

Caller tool results retain their call IDs, tool names and JSON/text values. Vercel may copy call metadata onto a tool result; that copy is not replayed as a second continuity item. Invalid or unsupported metadata fails explicitly.

Configuration and supported scope

Use Nimi AIConfig for execution configuration. The adapter does not select a provider/model or expose a compatibility HTTP endpoint. Arbitrary provider options and HTTP headers are rejected; the framework's transport user-agent is not a Runtime generation parameter. Request controls must be supported by the selected Nimi execution configuration. In particular, an App's provider-specific default maxOutputTokens must not be unconditionally imposed on a Nimi model.

Function tools, caller-owned loops, structured response-format mapping and image input are supported through their matching Nimi contracts. Provider-owned tools/results/approval transcripts, media output and raw reasoning are rejected. Only permitted reasoning summaries may be exposed as reasoning. Token usage remains unknown when the backing Nimi client does not project it.

The manifest describes framework usability and explicit gaps. A successful mapping test is not live-provider or installed-App acceptance. A generic NimiAiModel can be wrapped with createNimiVercelLanguageModel({ model }); ordinary Local Apps should use the Host-bound factory above.