#25204 [Bug]: custom_llm_provider "anthropic" bypasses input_cost_per_token: 0 — cost_per_token() dispatches to anthropic_cost_per_token() before checking custom pricing
## What happened?
When a model is configured with `custom_llm_provider: "anthropic"` and explicit zero costs (`input_cost_per_token: 0`, `output_cost_per_token: 0`), LiteLLM **ignores the zero-cost override** and calculates spend using the internal Anthropic pricing database.
This affects any deployment that proxies Anthropic models through an intermediate service (subscription-based, internal proxy, etc.) where the actual per-token cost is zero.
## Relevant code
In `litellm/cost_calculator.py`, `cost_per_token()` has a provider dispatch chain:
```python elif custom_llm_provider == "anthropic": return anthropic_cost_per_token(model=model, usage=usage_block) ```
This runs **before** the `else` branch that would check `litellm.model_cost` for custom pricing entries. So when `custom_llm_provider == "anthropic"`, the function dispatches directly to `anthropic_cost_per_token()`, which calls `get_model_info()` against the internal price DB (`model_prices_and_context_window.json`), finds the real Anthropic pricing (e.g. `$15/$75 per MTok` for Opus 4.6), and returns that — completely bypassing the configured `0` costs.
Additionally, `use_custom_pricing_for_model()` correctly det…