Documentation / Attribution / Tagging convention

Tagging convention

The full standard is OASA 0.1.3. The practical guide, with the provider citations behind this page, is Attributing agent spend. This page is the short version, plus what Meridian actually reads.

A tag or label reaches a bill only when the provider copies it onto a cost row. The keys below are the ones to put on that copy. They are lowercase so a Google request label will accept them.

Recommended keys

KeyMeaning
oasa_cost_centerThe department or other cost center to charge
oasa_agentThe agent
oasa_ownerThe person who owns the agent
oasa_projectThe project
environmentWhere it ran. Use prod, staging, or dev when it is one of those

environment is not one of the four attribution fields. It does not, by itself, assign a department.

Rules that make them work

These limits are the Google Cloud request-label rules. They are the strictest of the providers, so a key that passes them is safe to reuse. (Custom metadata labels)

  • Keys and values are lowercase letters, digits, underscores, and dashes.
  • A key starts with a lowercase letter.
  • A key and a value are at most 63 characters.
  • Do not use an empty value.
  • Keep the number of distinct values small. After 1,000 distinct values for one key over the life of a Google billing account, that key can be dropped without notice. An agent catalog larger than that must not put oasa_agent on Google labels. Bind those agents from the project id instead.

Do not put a per-request id in a tag or a label. That includes a trace id, a span id, a session id, a task id, a request id, a message id, an end-user id, an email address, or a timestamp. Bedrock's own cost guidance says session ids, trace ids, and experiment ids belong in request metadata, not in cost allocation tags. (Bedrock cost best practices) Request metadata does not reach the bill. A tag with a new value per call will also blow the cardinality limit.

Where to put them

Amazon Bedrock. On the application inference profile, or on a mantle project. One profile is one model, so a workload with several models needs the same keys on each profile. Activate the keys as cost allocation tags. They apply going forward. (Application inference profiles, activating tags)

Azure. On the Foundry resource and on the model deployment. Azure also copies billing, resource-group, and subscription tags onto child usage for the common agreement types. A new tag can take about a day to show on usage. (Foundry costs, tag resources)

Google Vertex AI. On the labels object of a pay-as-you-go generateContent or streamGenerateContent call. For the partner models that page lists, Anthropic and Mistral, send X-Vertex-AI-Labels on rawPredict and streamRawPredict. Provisioned Throughput drops the labels and the call still succeeds. A Google model call holds 64 labels. A listed partner-model call holds 32.

Anthropic and OpenAI APIs. There is no cost-allocation tag. Use a workspace, a project, or a key, then map it. See Anthropic and OpenAI.

Gateways. The key you map is the identity Meridian uses. A tag inside the gateway reaches the provider bill only when the upstream call writes a tag or a label the provider stores. See gateways.

OpenTelemetry. On the span, oasa.agent.id, oasa.cost_center, oasa.agent.owner, and oasa.project.id are the attributes. Those attribute the usage record. They are not on the provider invoice. See OASA events.

What you set up

You do not have to change tags that already use CostCenter, Department, cost-center, Agent, Project, or Customer. Those names still match.

To use the convention, put oasa_cost_center, oasa_agent, oasa_owner, and oasa_project on the same resource the bill copies. When both a convention key and an older alias are on the row, Meridian reads the convention key.

In Meridian, open Source identities. The tag-key lists are on that page. A finance admin can reorder a list, add an alias, or pin a tag value to a department. The first cost-center key is the one Azure and Bedrock request after support turns that source on. Until then, those pulls stay a daily total. Google request labels are not read.

An organization that already saved a list keeps that list until someone edits it. An organization with no saved list uses the defaults below.

What Meridian reads today

On a FOCUS upload, when the organization has no saved list, Meridian reads:

What it setsKeys, in order
Departmentoasa_cost_center, CostCenter, Department, cost-center
Agentoasa_agent, Agent
Owneroasa_owner
Projectoasa_project, Project
CustomerCustomer

Matching ignores letter case, a user: prefix, and spaces, dashes, and underscores. CostCenter, user:cost-center, and cost_center are the same key. oasa_cost_center is not the same key as CostCenter. oasa_agent is not the same key as Agent. environment is not read.

The owner value is stored with the row. It does not assign an agent, and it does not assign a department. Project and customer are stored with the row. They do not, by themselves, set the department.

The Azure OpenAI pull and the Bedrock Cost Explorer pull read the first cost-center key only after support@onaro.io turns that source on. Until then they stay a daily total. Vertex and Gemini can split by Cloud project id after their own switches are turned on. They do not read request labels. The FOCUS upload reads the table above either way.

An agent value still has to match an agent name that already exists. The list changes which key is read. It does not create the agent. A cost-center value still has to match a department code or name, unless that value is pinned on Source identities.

What stays unattributed

A FOCUS row that has none of the cost-center keys in the list that organization uses, and no account crosswalk, stays unattributed. The inbox says "No cost allocation tags", or "Cost center value not mapped" when a cost-center key was present and the value matched no department. oasa_cost_center counts when that key is on the list. It does not count for an organization whose saved list still has only the older names.

While a cloud switch is off, those pulls stay unattributed until a rule or a person assigns them. Putting the convention keys on the cloud resource does not clear that inbox until support turns the source on. Google labels still do not.