#29146 [Feature]: Add a typed exception for (This model isn't mapped yet) [provider=mistral]
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### The Feature
**Problem Statement**
Currently, when a model (with mistral provider) is requested but not mapped in LiteLLM, the system throws a generic Exception with a message similar to:
"This model isn't mapped yet"
Using a generic exception type makes it difficult for client code to:
Reliably detect this specific failure scenario Implement targeted error handling or retries Differentiate it from other runtime or configuration errors
**To reproduce**
` prompt_tokens_cost_usd, completion_tokens_cost_usd = litellm.cost_per_token( "mistral-medium-3.5-128b", 100, 100 custom_llm_provider="mistral" ) `
By the time this issue is being taken care of it could be that "mistral-medium-3.5-128b" is mapped, so you can put any unsupported model instead.
**Possible Enhancements**
` class ModelNotMappedError(Exception): """Raised when a requested model is not mapped in LiteLLM.""" pass `
` raise ModelNotMappedError("This model isn't mapped yet. model={}, custom_llm_provider={}. Add it here - https://github.com/BerriAI/litellm/bl…