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

sambanova-ai-provider

v1.2.2

Published

Vercel AI Provider for running LLMs locally using SambaNova models

Downloads

3,892

Readme

sambanova-ai-provider

Vercel AI Provider for running LLMs locally using SambaNova's models.

Table of Contents

Requirements

API key can be obtained from the SambaNova Cloud Platform.

Installation

The SambaNova provider is available in the sambanova-ai-provider module. You can install it with

npm:

npm install sambanova-ai-provider

yarn:

yarn add sambanova-ai-provider

or pnpm:

pnpm add sambanova-ai-provider

Setup Environment

You will need to setup a SAMBANOVA_API_KEY environment variable. You can get your API key on the SambaNova Cloud Portal.

Provider Instance

You can import the default provider instance sambanova from sambanova-ai-provider:

import { sambanova } from 'sambanova-ai-provider';

If you need a customized setup, you can import createSambaNova from sambanova-ai-provider and create a provider instance with your settings:

import { createSambaNova } from 'sambanova-ai-provider';

const sambanova = createSambaNova({
  apiKey: 'YOUR_API_KEY',
  // Optional settings
});

You can use the following optional settings to customize the SambaNova provider instance:

  • baseURL string

    Use a different URL prefix for API calls, e.g. to use proxy servers. The default prefix is https://api.sambanova.ai/v1.

  • apiKey string

    API key that is being sent using the Authorization header. It defaults to the SAMBANOVA_API_KEY environment variable*.

  • headers Record<string,string>

    Custom headers to include in the requests.

  • fetch (input: RequestInfo, init?: RequestInit) => Promise<Response>

    Custom fetch implementation. Defaults to the global fetch function. You can use it as a middleware to intercept requests, or to provide a custom fetch implementation for e.g. testing.

* If you set the environment variable in a .env file, you will need to use a loader like dotenv in order for the script to read it.

Models

You can use SambaNova models on the provider instance. The first argument is the model ID, e.g. Meta-Llama-3.3-70B-Instruct.

const model = sambanova('Meta-Llama-3.3-70B-Instruct');

Tested models and capabilities

This provider is capable of generating and streaming text, interpreting image inputs, run tool callings, and use embeddings.

At least it has been tested with the following features:

| Chat completion | Image input | Tool calling | Embeddings | | ------------------ | ------------------ | ------------------ | ------------------ | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Image input

You need to use any of the following models for visual understanding:

  • Llama-4-Maverick-17B-128E-Instruct
  • Llama-4-Scout-17B-16E-Instruct

SambaNova vision models support up to five (5) images per request. They don't support URLs.

Tool calling

You can use any of the Function calling supported models for tool calling.

Embeddings

You can use the E5-Mistral-7B-Instruct model to use the embeddings feature of the SambaNova provider.

Examples

On the examples folder you will find some Markdown files containing simple code snippets of some of the features of the SambaNova Provider.

Intercepting Fetch requests

This provider supports Intercepting Fetch Requests.