#27581 [Feature]: cost_per_token() in cost_calculator.py should return (0.0, 0.0) for unrecognized models instead of raising
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### The Feature
`cost_per_token()` and `completion_cost()` in `litellm/cost_calculator.py` raise an exception when the model is not found in the pricing database:
```python from litellm import cost_per_token cost_per_token( model="openrouter/meta-llama/llama-3.3-70b-instruct", completion_tokens=50, ) # β raises: No cost information for model ``` Proposed fix β return `(0.0, 0.0)` with a `UserWarning` instead of raising: ```python # in cost_calculator.py warnings.warn(f"No pricing data for model '{model}'. Returning (0.0, 0.0).") return 0.0, 0.0 ```
### Motivation, pitch
Raising breaks any flow iterating over a mixed list of models. Downstream tools using LiteLLM's pricing functions are forced to wrap every single call in `try/except` and implement their own fallbacks β which defeats the purpose of having a shared pricing utility. Returning `(0.0, 0.0)` with a warning is non-breaking: callers that already handle zero cost are unaffected, and callers that relied on the exception can check forβ¦