osquarski OpenAI example Since OpenAI does not include cost, I use a custom pricing map to return it import { UIMessage, convertToModelMessages, generateText, wrapLanguageModel, } from 'ai'; import { createOpenAI } from '@ai-sdk/openai'; import { createOpenAIMiddleware } from '@ai-billing/openai'; import { consoleDestination, createObjectPriceResolver, ModelPricing, } from '@ai-billing/core'; const openai = createOpenAI({ // eslint-disable-next-line turbo/no-undeclared-env-vars apiKey: process.env.OPENAI_API_KEY, }); const customPricingMap: Record<string, ModelPricing> = { 'gpt-5': { promptTokens: 1.25
osquarski @ai-billing also sends usage events to Billing Providers Here is an infographic how: And a codesnippet showing how to do it for: Stripe import { createOpenRouter } from '@openrouter/ai-sdk-provider'; import { streamText, convertToModelMessages, UIMessage, wrapLanguageModel, } from 'ai'; import { createOpenRouterV3Middleware } from '@ai-billing/openrouter'; import { consoleDestination } from '@ai-billing/core'; import { createStripeDestination } from '@ai-billing/stripe'; type BillingTags = { org_name?: string; stripe_customer_id?: string; }; const stripeDestination = createStripeDestination<Bi
osquarski Installation npm install @ai-billing/core @ai-billing/openrouter # Example for OpenRouter Full-stack @ai-billing examples | Name | Demo Link | Repo | Deploy | | :--- | :--- | :--- | :--- | | Chatbot (OpenRouter + Polar) | View Demo | GitHub | [](vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnarevai%2Fai-billing%2Ftree%2Fmain%2Fexamples%2Fchatbot-with-billing-polar) | | Chatbot (OpenAI + Polar) | View Demo | GitHub | [](vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnarevai%2Fchatbot-openai-with-billing-polar&env=AUTH_SECRET,OPENAI_API_KEY,POSTGRES_URL,POLAR_ACC
Ryu Hi Nochinxx, Nice idea. The “five views” framing makes the PR review flow feel much easier to scan than a normal diff wall. One thing I’d consider adding is a small confidence/source indicator per AI comment, especially if the app is summarizing or flagging risky changes. For example: based on changed file only based on related files based on package/config context needs human verification That could make the AI feedback easier to trust because reviewers can tell whether the comment came from local diff context or a broader repo read. I’d also make “open original PR/file on GitHub” very promin
Nochinxx Thanks, Ryu. Sure, I just added some of the source indicators. However, the idea is also that each user modifies the code so that the flags are more accurate to what they usually check for. I'd also make the “open original PR/file on GitHub” more prominent. Thanks!
Ryu Hi Nochinxx, That makes sense, and nice work moving on those changes so quickly. I like the idea that teams can tune the flags for their own review style. My only thought would be to make the default rules very transparent, even if they are meant to be customized later. Something like a small “why this was flagged” note could help new users understand the baseline before they start editing it. The source indicators already sound like a good step in that direction. I’m definitely not the expert here, but this feels like the kind of tool where trust and explainability matter almost as much as th
system The domain troubleshooting guide can help with most custom domain configuration issues. You might be able to use that guide to solve it before a human is available to help you. Then you can come back here and share the answer for bonus points. vercel.com/docs/projects/domains/troubleshooting You can also use v0 to narrow down the possibilities.
SkyMesh Dynamics ah, then I'm not the only one who reported this
Ryu Hi Yuze, Your openssl test is a good way to narrow it down. Since this fails when the trailing dot is included in SNI: echo | openssl s_client -connect deckclip.app:443 -servername 'deckclip.app.' but works without it: echo | openssl s_client -connect deckclip.app:443 -servername 'deckclip.app' then this is happening before your Next.js app or vercel.json redirects can run. So I don’t think there’s an app-level redirect/header fix for the HTTPS case. A trailing dot is valid in DNS as an absolute/FQDN form, but TLS certificate/SNI matching is a separate layer. If Vercel’s edge does not normaliz