open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
1.04k stars 324 forks source link

Fix: Get LiteLLM Models #210

Closed justinh-rahb closed 4 months ago

justinh-rahb commented 4 months ago

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:

Benefits:

Addresses:

Acknowledgement: @attilaszasz for the same fix from the Gemini manifold (#193) applied here.

tjbck commented 4 months ago

LGTM, Thanks!