Applies to:
- Plan - Any
- Deployment - Any
- Use case - Users calling models via third-party SDKs who see $0 cost in logs or dashboards despite tokens being tracked
Summary
Issue: Spans show$0 cost in Braintrust logs when using a third-party SDK to call models. Cost data is also missing from dashboards even after registering a custom provider.
Cause: Cost lookup matches the logged model string against Braintrust’s model catalog. Known reasoning-effort and thinking-tier suffixes (-thinking, -none, -low, -medium, -high, -xhigh, -max) are stripped automatically, so Cursor-style slugs like claude-opus-4-8-thinking-high resolve to the base model’s price without a custom provider. But when a third-party SDK formats the model ID differently in other ways, such as a different prefix structure, no match is found. Additionally, custom providers registered at the project level are not visible to dashboards.
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 throughhttps://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 sendsfireworks/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
- Go to Settings > AI providers.
- Click Organization provider, then choose Custom providers > New.
- On Setup, configure the provider, then under Models, click Custom model. Enter the exact model string your SDK sends.
- Click the settings icon beside the model and set pricing to match the provider’s published rates.
- Click Create.
Note: A custom provider registered only at the project level will appear in Logs but not on the Dashboards page. Organization-level registration is required for dashboard cost charts to populate.
Step 3: Verify cost appears in logs and dashboards
After saving, trigger a new request and confirm:- The span in Logs shows the expected cost
- The Dashboards page reflects cost data for the model