#20482 [Bug]: LiteLLM Proxy {+request log) shows ProxyException instead of unauthenticated when using config-defined models
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
Due to [another issue reported here](https://github.com/BerriAI/litellm/issues/17398) with too many encrypted fields in the database, we opted for an IaC approach of LiteLLM using models/credentials defined in the config.yaml file and other resources managed by API.
This setup works great, but we noticed two critical things:
- Unauthenticated requests don't report the usual "401 Unauthorized", but instead throw a ProxyExpection error without useful log information - The exception seen in the screenshot below is also going to STDOUT and Slack Exception alerts if configured -> Excessive noise in Alerting and Logging
<img width="1295" height="761" alt="Image" src="https://github.com/user-attachments/assets/8267e8a3-4749-4b28-b89f-f9e04e188aad" />
### Steps to Reproduce
Version: 1.81.0-stable
```yaml # config.yal general_settings: store_model_in_db: false store_prompts_in_spend_logs: true
# Example model model_list: - litellm_params: custom_llm_provider: openai litellm_credential_name: OpenAI mo…