#30448 [Feature]: Bayesian optimization feature
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### The Feature
Bayesian optimization uses a probabilistic model to find the best settings for complex systems with minimal testing. It balances exploring new configurations and exploiting known good settings to systematically maximize your target metrics. For LiteLLM, it avoids wasting money by smartly adjusting parameters like temperature or model selection to lower latency and API costs. This approach is much faster and cheaper than testing every single option or guessing settings at random. It is the perfect choice for large language models because each test requires slow and expensive API calls. It could be a nice-to-have.
### Motivation, pitch
P(C(x) ≤ Limite) = Φ( (Limite - μc(x)) / σc(x) ) This formula calculates the probability that your hyperparameter choice stays under the token limit. It normalizes the safety margin using the model's predicted token mean and uncertainty. - P(C(x) <= Limit) : Probability that the token consumption stays within the fixed budget. - x : Tested hyperparameter configuration (e.g., temperature, penalties). -…