I’m currently using Vertex AI to access LLMs from third-party providers such as Claude. For cost analysis purposes, I would like to break down usage based on environment (e.g., prod, stage, dev) or business purpose.
I’ve noticed that Google’s Gemini models support custom metadata labels during generateContent and streamGenerateContent API calls, which are very helpful for filtering costs in billing reports.
However, I’d like to know:
Are custom labels also supported for third-party models like Claude?
If not, what is the recommended method to categorize or break down billing data based on purpose or environment for third-party model usage?
Any guidance or best practices would be greatly appreciated.
When using Vertex AI to access third-party models like Claude, categorizing costs by environment (e.g., prod, stage, dev) or business purpose requires alternative approaches, as Vertex AI’s custom metadata labels (supported for Gemini) are not available for external models. Below are Google-recommended methods to achieve cost transparency, along with supporting documentation.
Project-Level Separation
Approach: Create dedicated GCP projects for each environment (e.g., project-prod, project-dev) and apply labels. Pros:
For most users, project separation or endpoint labels offer the best balance of simplicity and billing integration. For advanced use cases, custom logging provides finer granularity. Always reference Google’s official documentation for updates to labeling and billing features.