Fix: Populate LiteLLM Manifold Model List on Initialization
This PR addresses an issue where the LiteLLM Manifold pipeline wasn't fetching the model list on startup, causing the pipelines list to remain empty until the valves were manually saved.
The solution is to call the get_litellm_models() function within the __init__ method of the Pipeline class. This ensures that the model list is retrieved from the LiteLLM server as soon as the pipeline is initialized.
Key Changes:
Added a call to get_litellm_models() within the __init__ method.
Improved error handling in get_litellm_models() to provide more informative messages.
Added a print statement when LITELLM_BASE_URL is not set.
Benefits:
The model list is now populated on startup, providing a smoother user experience.
Users no longer need to manually save the valves to see the available models.
Enhanced error handling provides clearer feedback in case of issues fetching models.
Addresses:
111
Acknowledgement:
@attilaszasz for the same fix from the Gemini manifold (#193) applied here.
Fix: Populate LiteLLM Manifold Model List on Initialization
This PR addresses an issue where the LiteLLM Manifold pipeline wasn't fetching the model list on startup, causing the pipelines list to remain empty until the valves were manually saved.
The solution is to call the
get_litellm_models()
function within the__init__
method of thePipeline
class. This ensures that the model list is retrieved from the LiteLLM server as soon as the pipeline is initialized.Key Changes:
get_litellm_models()
within the__init__
method.get_litellm_models()
to provide more informative messages.LITELLM_BASE_URL
is not set.Benefits:
Addresses:
111
Acknowledgement: @attilaszasz for the same fix from the Gemini manifold (#193) applied here.