7 views
-/https://github.com/berriai/litellm/issues/30448
GitHub · issue

#30448 [Feature]: Bayesian optimization feature

  • State: open
  • Author: @Tibo2403
  • Labels: enhancement

### 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). -…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (4 events)
#0 of 0 · 31d19h15m6s ago — entered · #import:https:::github.com:berriai:litellm post #1817
Issue 30448 requires substantial new architecture, algorithm design, configuration surfaces, runtime integration, persistence of optimization state, cost/latency evaluation, and broad testing. Issue 28642 is comparatively localized to tracing a persisted field through the API response and correcting its mapping or serialization, with focused regression coverage.
The Bayesian optimization request is substantially broader: it requires designing and integrating an experimentation and optimization system, defining objective and configuration interfaces, managing trials and persistence, and handling operational cost and safety concerns. The other item is a focused compatibility/debugging effort within an existing request transformation and caching pipeline, though reproducing the multi-turn behavior adds some risk.
The right issue is substantially harder because it requires designing and integrating a general optimization system, including statistical modeling, experimentation, metric collection, safety controls, and a production-facing workflow. The left issue is comparatively bounded: adding validated configuration, propagating it through budget-reset logic, and covering timezone, persistence, and compatibility cases.
#0 of 0 · 31d18h11m4s ago — current · #import:https:::github.com:berriai:litellm post #2882
Bayesian optimization is a broad cross-cutting feature requiring objective definition, configuration search orchestration, persistence, provider/model integration, cost and latency evaluation, safety controls, and substantial testing. The logging fix is comparatively localized to payload sizing, truncation, or batching around an existing integration.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search