#27830 [Feature]: Auto-populate max_input_tokens/max_output_tokens for hosted vLLM/OpenAI-like models
### Check for existing issues - [x] I have searched the existing issues and checked that my issue is not a duplicate.
### The Feature When LiteLLM proxies self-hosted/openai-compatible backends (especially vLLM), automatically populate `model_info.max_input_tokens` and `model_info.max_output_tokens` using upstream model metadata (for vLLM: `max_model_len`) instead of leaving them `null`.
Suggested behavior: 1. On model registration / router refresh / periodic cache refresh, LiteLLM calls upstream model metadata endpoint (`/v1/models` for OpenAI-compatible backends). 2. If upstream exposes a context window (`max_model_len` or equivalent), LiteLLM maps it to `max_input_tokens`. 3. If no explicit output limit is available, set `max_output_tokens` conservatively (or allow configurable derivation strategy). 4. Persist derived values in runtime model info (and optionally DB if configured), while still allowing explicit `model_info` overrides to take priority.
This would make `/v1/model/info`, `/model_group/info`, routing decisions, and UI model tables much more accurate for hosted models.
### Motivation, pitch Today, hosted vLLM/OpenAI-like models frequently show: - `max_input_tokens…