dylsteck/surplus-ai-sdk-provider — explained in plain English
Analysis updated 2026-05-18
Swap an existing Vercel AI SDK app to route model calls through the cheaper Surplus Intelligence marketplace.
Request only providers offering a minimum price discount for a given model call.
Pay per API request with a crypto wallet using x402 instead of holding an API key.
Point an existing Anthropic SDK client at Surplus's Anthropic-compatible endpoint.
| dylsteck/surplus-ai-sdk-provider | 0xradioac7iv/tempfs | 52191314/web-agent-proxy-sdk | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs a Surplus API key, or a crypto wallet and EVM private key for the no-API-key x402 payment path.
This project is a small connector library that lets developers use the Vercel AI SDK, a popular toolkit for building AI powered apps, to talk to a service called Surplus Intelligence. Surplus Intelligence is a marketplace for AI model inference, meaning it routes your request to whichever provider can run a given AI model at a lower price, and this package is the piece of code that plugs that marketplace into the Vercel AI SDK's standard interface. You install it with npm alongside the Vercel AI SDK, then import a function called surplus and pass it a model name, such as a Llama or Claude model, when generating text. With just an API key set as an environment variable, a developer can start generating text, chat completions, embeddings, or images through Surplus using the same generateText style calls the Vercel AI SDK already supports elsewhere. One notable feature is minimum discount routing, where a developer can request that Surplus only route their call to providers offering at least a certain percentage discount, which changes the web address the request is sent to behind the scenes. There is also a set of routing controls that let a developer specify things like a preferred provider or a maximum price per million tokens. The package also supports a payment method called x402, which lets someone use the service without an API key at all by paying for each request directly through a cryptocurrency wallet, using Ethereum-compatible payment code from a library called viem. Separately, there is an Anthropic flavored version of the connector that points Anthropic's own SDK at the Surplus service instead of Anthropic's normal servers. The README also shows a recipe for using OpenAI's Responses API style through Surplus by configuring an existing OpenAI SDK client with a custom base web address. The project includes a folder of runnable examples covering the API key, minimum discount, provider options, x402 payment, and Anthropic use cases, along with build, type check, and test scripts. It is released under the MIT License.
A connector library that lets Vercel AI SDK apps route AI model requests through the Surplus Intelligence pricing marketplace.
Mainly TypeScript. The stack also includes TypeScript, Node.js, Vercel AI SDK.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.