Applies to:
- Plan -
- Deployment -
Summary
Issue: TheEstimated cost column in the Logs table shows – for all rows, even though the trace metrics panel displays a cost value correctly.
Cause: The Logs table reads metrics.estimated_cost from the root span, which only populates when custom AI providers are registered at the organization level. Providers configured at the project level only are not used during root span cost rollup.
Resolution: Re-register your custom AI providers at the organization level under Settings > AI providers.
Resolution steps
If you are using custom AI providers
Step 1: Confirm provider scope
Check where your custom providers are currently configured.- Go to Settings > AI providers.
- Note whether providers are listed at the project level only.
Step 2: Add providers at the organization level
- Go to Settings > AI providers at the organization level.
- Re-add each custom provider with the same input and output cost values.
- Verify the model names match exactly what is logged in
metadata.model.
Step 3: Verify the fix
Reload the Logs table. TheEstimated cost column should now populate for new and existing traces where token metrics are present.
If providers are already at the org level
Step 1: Confirm root span token metrics
Run the following query to check whether the root span hasmetrics.estimated_cost populated:
metrics.estimated_cost is null but cost_fn returns a value, the root span rollup is not propagating from child spans.
Step 2: Check child LLM span costs
Step 3: Use a custom column as a workaround
While investigating, add a custom column using theestimated_cost() SQL function, which falls back to per-span token pricing when metrics.estimated_cost is null.