The previous implementation only used the standard OpenAI /models
endpoint which often lacks context window and capability metadata,
causing a blind 200K fallback for all models.
Now fetch_openai_models_from_endpoint tries LiteLLM's /model/info
endpoint first, which returns rich metadata:
- max_input_tokens (e.g. 1,000,000 for Sonnet 4.6)
- max_output_tokens (e.g. 128,000 for max models)
- supports_vision
- supports_function_calling
- underlying model path (for provider detection)
Falls back to /models if /model/info is unavailable (e.g. non-LiteLLM
OpenAI-compatible endpoints).
This ensures the model picker and context window configuration reflect
the actual capabilities of the configured models.