Merged
Size
M
Change Breakdown
Refactor70%
Feature20%
Maintenance10%
#28436refactor(core): Rename AI Gateway credits to wallet with USD amounts

AI Gateway displays usage costs in USD instead of abstract credits

AI Gateway usage now displays in real dollar amounts rather than abstract credit counts — a terminology shift from "credits" to "wallet/budget/balance" that makes spending visible.

The AI Gateway previously showed users an abstract credit count — an integer with no connection to actual dollars spent. Now the interface displays USD amounts directly, so users see "$1.53 / $2.00 remaining" instead of "47 / 100 credits remaining". The terminology has shifted from "credits" to "wallet," "budget," and "balance" throughout the platform — in API endpoints, state management, composables, and UI components.

This change touches every layer of the stack. The backend renamed /ai/gateway/credits to /ai/gateway/wallet and returns { budget, balance } instead of { creditsQuota, creditsRemaining }. Frontend stores and composables now expose balance and budget computed properties, and the usage table column renamed from "Credits" to "Cost (USD)" with proper dollar formatting applied.

The shift matters because it removes a layer of abstraction between users and their spending. Credit counts required mental math to understand real costs; dollar amounts do not. This aligns AI Gateway with how users think about other subscription services, where the currency of payment is visible from the start.

View Original GitHub Description

Summary

Renames "credits" terminology to "wallet/budget/balance" across the AI Gateway feature and switches display values from integer credit counts to USD dollar amounts ($X.XX).

What changed:

  • AI_GATEWAY_CREDITS constant → AI_GATEWAY_BUDGET (quota:aiGatewayBudget)
  • Backend: /ai/gateway/credits endpoint → /ai/gateway/wallet, service method getCreditsRemaining()getWallet() returning { budget, balance }
  • Frontend: stores, composables, and components updated from creditsRemaining/creditsQuota to balance/budget, fetchCredits()fetchWallet()
  • UI: all AI Gateway credit displays now show USD amounts ($1.53 / $2.00 remaining)
  • Usage table column renamed from "Credits" to "Cost (USD)" with $X.XX formatting
  • i18n strings updated to use balance/budget/wallet terminology

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-4834

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse