Every AI Call Is Registered Before It Runs

By Sharon C
Oct 07, 2026 5 min read 7 views
Every AI Call Is Registered Before It Runs
AI features cost money and touch customer data, so we keep a registry of every one. Here is how a call that is not on the list is refused before anything is spent.
Share:

AI features have spread through our platform. They help draft pages and blog posts, read images, narrate audio, moderate community content, answer help questions and more. Each of those features calls a paid service, sends some data to it and produces something customers rely on.

Without discipline, AI usage in a large platform becomes hard to see. A helpful feature gets added here, a quick experiment there, and soon nobody can say how many AI calls exist, what they cost or which ones are billed to customers. We decided early that would not happen to us. Every AI use in our platform must be listed in a registry before it can run.

What the registry records

Each entry in the registry describes one specific AI use:

  • Its name and purpose, in plain language
  • Where it lives in the platform
  • Who can use it, such as customers, our staff or an automated process
  • How large its requests typically are, so costs can be estimated
  • How it is billed: to a customer's credits, to our own account or not at all
  • Which code calls it, so it can be found and reviewed

Every call also carries a specific action name that is recorded in our logs, so actual usage can be compared with the registry.

Unregistered means refused

The registry is not documentation that hopes to stay accurate. It is enforced. Before any AI call is made, our code asks the registry whether that specific feature and action are registered. If they are not, the call is refused before anything is sent or spent.

That turns a common failure, a forgotten feature quietly spending money, into an obvious error that is caught immediately. A developer who adds a new AI feature must add its registry entry in the same change, or the feature will not work.

Quote card: If we cannot say where an AI call lives, who uses it and how it is billed, it does not run.

One place to see it all

Our administrators have a page that shows every registered AI use with its current pricing and what our logs actually recorded. It also shows credit purchases and charges, and anything that was logged outside the registry. If the registry and reality ever disagree, that page makes it visible.

Billing that matches the entry

Because each entry declares how it is billed, our billing code does not have to guess. Customer-facing features charge the customer's AI credits according to measured usage. Some internal work is recorded at cost but not charged to anyone. Support work our staff does during onboarding is not charged to the customer. The registry is the source of truth for which is which.

Data handling is part of the decision

Registering a feature is also a moment to ask privacy questions: what data does this call send, is that necessary and is it allowed? Features that send customer content to an AI service do so for a specific purpose, through our own gateway rather than directly from a browser, with provider keys kept on our servers.

An emergency switch, used sparingly

Enforcement can be turned off in an emergency, for example if a registry problem were blocking a critical feature. That switch exists for real emergencies only. Normal practice is to fix the registry entry, not to bypass it.

Every call has its own action name

A registry entry covers a feature, but a feature can make several kinds of calls. A writing assistant might draft text, rewrite a paragraph and suggest a title, each with different costs and purposes. So each call carries its own short action name, registered alongside the feature. Our logs record that name for every request, which makes it possible to answer specific questions later: how often is the rewrite action used, what does it cost on average and did anything run that was not expected?

Action names are kept short and stable on purpose, so they fit in our logs and can be compared across months without renaming confusion.

Registry entries change with the code

When a feature changes how it uses AI, its registry entry changes in the same piece of work. A new action, a different billing rule or a larger expected request size is updated together with the code that causes it. Reviews check that the two match. This keeps the registry from drifting into a document that describes how things used to work, which is the fate of most inventories that live apart from the code. It is an application of our Zero Dead Code rule: nothing exists in one place without being connected in the other.

Why we built it this way

AI is powerful and still evolving quickly. Models change, prices change and new uses appear every month. A registry gives us a stable foundation: we always know what AI we use, why, at what cost and on whose behalf. That clarity is what lets us offer AI features to customers with honest pricing, which we describe in showing AI costs before customers spend credits.

Frequently asked questions

Why register every AI feature?

A registry makes AI usage visible and enforceable, so no feature spends money or sends data without a documented purpose, owner and billing rule.

What happens if a developer forgets to register a feature?

The call is refused before anything is spent, so the missing entry is noticed immediately during development.

Are customers charged for every AI call?

No. Each registered feature declares how it is billed. Customer features use measured credits; some internal and support work is not charged to customers.

Comments (0)

No comments yet. Be the first to share your thoughts!