Describe the bug
When using a custom provider (Azure OpenAI via LiteLLM), tokens aren't being counted and cost isn't shown.
Setup
Please complete the following information along with version numbers, if applicable.
- Windows 11 23H2
- Powershell 5.1.22621.2706
To Reproduce
Steps to reproduce the behavior:
- Create a crush.json with the following content:
{
"$schema": "https://charm.land/crush.json",
"providers": {
"your-custom-provider": {
"type": "openai",
"base_url": "https://litellm.local.host/v1",
"api_key": "REDACTED",
"models": [
{
"id": "gpt-5",
"name": "GPT-5",
"context_window": 400000,
"default_max_tokens": 16384,
"cost_per_1m_in": 1.25,
"cost_per_1m_out": 10.0
},
{
"id": "gpt-5-mini",
"name": "GPT-5-Mini",
"context_window": 400000,
"default_max_tokens": 8192,
"cost_per_1m_in": 0.25,
"cost_per_1m_out": 2.0
}
]
}
},
"models": {
"large": {
"model": "gpt-5",
"provider": "your-custom-provider"
}
}
}
- Launch
crush
- Make any request
- Token count and cost remain at 0 and $0.00 respectively.
Expected behavior
Token and cost count should match the tokens used count and the calculated cost based on cost_per_1m_in and cost_per_1m_out.
Screenshots
Additional context
This issue does not occur with a built-in provider (i.e. using OpenAI directly using an API Key).
Maintainers’ note: Formatted JSON for readability.
Describe the bug
When using a custom provider (Azure OpenAI via LiteLLM), tokens aren't being counted and cost isn't shown.
Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
{ "$schema": "https://charm.land/crush.json", "providers": { "your-custom-provider": { "type": "openai", "base_url": "https://litellm.local.host/v1", "api_key": "REDACTED", "models": [ { "id": "gpt-5", "name": "GPT-5", "context_window": 400000, "default_max_tokens": 16384, "cost_per_1m_in": 1.25, "cost_per_1m_out": 10.0 }, { "id": "gpt-5-mini", "name": "GPT-5-Mini", "context_window": 400000, "default_max_tokens": 8192, "cost_per_1m_in": 0.25, "cost_per_1m_out": 2.0 } ] } }, "models": { "large": { "model": "gpt-5", "provider": "your-custom-provider" } } }crushExpected behavior
Token and cost count should match the tokens used count and the calculated cost based on cost_per_1m_in and cost_per_1m_out.
Screenshots
Additional context
This issue does not occur with a built-in provider (i.e. using OpenAI directly using an API Key).
Maintainers’ note: Formatted JSON for readability.