Merged
Conversation
matv-stripe
reviewed
Oct 28, 2025
matv-stripe
reviewed
Oct 28, 2025
matv-stripe
reviewed
Oct 28, 2025
matv-stripe
reviewed
Oct 28, 2025
matv-stripe
reviewed
Oct 28, 2025
matv-stripe
reviewed
Oct 29, 2025
nm-stripe
reviewed
Oct 29, 2025
matv-stripe
reviewed
Oct 30, 2025
Co-authored-by: Steve Kaliski <59668283+stevekaliski-stripe@users.noreply.github.com>
matv-stripe
reviewed
Oct 30, 2025
matv-stripe
reviewed
Oct 30, 2025
matv-stripe
reviewed
Oct 30, 2025
matv-stripe
reviewed
Oct 30, 2025
mpbagwell-stripe
suggested changes
Oct 30, 2025
Contributor
mpbagwell-stripe
left a comment
There was a problem hiding this comment.
A mix of widely applicable suggestions!
Co-authored-by: matv-stripe <55463370+matv-stripe@users.noreply.github.com>
Co-authored-by: matv-stripe <55463370+matv-stripe@users.noreply.github.com>
Co-authored-by: mpbagwell-stripe <mpbagwell@stripe.com>
Co-authored-by: mpbagwell-stripe <mpbagwell@stripe.com>
|
|
||
| ### `@stripe/token-meter` | ||
|
|
||
| @stripe/token-meter provides generic token metering for native AI SDKs with automatic Stripe billing integration. Unlike the ai-sdk package, this works directly with native SDKs from OpenAI, Anthropic, and Google Gemini without requiring the Vercel AI SDK or any other framework. |
Collaborator
There was a problem hiding this comment.
token-billing or token-meter/
stevekaliski-stripe
approved these changes
Oct 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Stripe AI SDK packages for Vercel AI SDK integration
This PR adds three new packages under
llm/for integrating Stripe billing with AI applications.Packages Added
@stripe/ai-sdk/providerA custom Vercel AI SDK provider that routes requests through Stripe's
llm.stripe.comproxy for automatic usage tracking and billing. Provides a unified interface to OpenAI, Google Gemini, and Anthropic Claude models.@stripe/ai-sdk/meterA wrapper that adds Stripe billing tracking to any AI SDK v2 language model. Allows developers to continue using their existing provider setup while gaining billing capabilities.
@stripe/token-billingA generic token metering library for native AI SDKs (OpenAI, Anthropic, Google Gemini) without framework dependencies. Automatically detects provider types and tracks token usage for billing.
Notes