Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Issue: Spans show $0 cost in Braintrust logs when using a third-party SDK to call models. Cost data is also missing from the Monitor page even after registering a custom provider. Cause: Cost lookup is an exact string match against Braintrust’s model catalog. Third-party SDKs may format model IDs differently than the catalog expects. Additionally, custom providers registered at the project level are not visible to the Monitor page. Resolution: Register a custom provider at the organization level with the model string exactly matching what your SDK sends.

Resolution steps

If you are using the Braintrust AI proxy directly

Verify the model string in your API calls exactly matches the catalog key. Calls must route through https://api.braintrust.dev/v1/proxy for cost attribution to apply. Cost calculation is handled server-side — no SDK update is required.

If you are using a third-party SDK

Third-party SDKs may format model IDs differently than Braintrust’s catalog. For example, the Vercel AI SDK with Fireworks sends fireworks/models/<model>, but Braintrust’s catalog keys Fireworks models as accounts/fireworks/models/<model>.

Step 1: Identify the exact model string your SDK sends

Check your logs to see the exact model ID format in the span data.

Step 2: Register a custom provider at the organization level

  1. Go to Settings > AI Providers > Custom Providers > Create
  2. Set Model name to the exact string your SDK sends
  3. Set pricing to match the provider’s published rates
  4. Ensure you are registering this at the organization level, not the project level
Note: A custom provider registered only at the project level will appear in Logs but not in the Monitor page. Organization-level registration is required for Monitor cost charts to populate.

Step 3: Verify cost appears in logs and Monitor

After saving, trigger a new request and confirm:
  • The span in Logs shows the expected cost
  • The Monitor page reflects cost data for the model

If the model is not yet in the Braintrust catalog

If you believe the model should be in the catalog (it has published pricing and an official slug from the provider), file a request to add it. In the meantime, use the custom provider workaround above.