[PR #210] [MERGED] Fix: Get LiteLLM Models #348

Closed
opened 2026-02-15 20:15:12 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/pipelines/pull/210
Author: @justinh-rahb
Created: 8/2/2024
Status: Merged
Merged: 8/2/2024
Merged by: @tjbck

Base: mainHead: litellm-fix


📝 Commits (2)

  • ef88564 Fix: get LiteLLM models on init
  • 316c547 Fix: get LiteLLM models on startup

📊 Changes

1 file changed (+7 additions, -3 deletions)

View changed files

📝 examples/pipelines/providers/litellm_manifold_pipeline.py (+7 -3)

📄 Description

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:

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/pipelines/pull/210 **Author:** [@justinh-rahb](https://github.com/justinh-rahb) **Created:** 8/2/2024 **Status:** ✅ Merged **Merged:** 8/2/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `litellm-fix` --- ### 📝 Commits (2) - [`ef88564`](https://github.com/open-webui/pipelines/commit/ef8856452095cbbaa44955f782fc6dc0d4df3673) Fix: get LiteLLM models on init - [`316c547`](https://github.com/open-webui/pipelines/commit/316c547163cef5592a8574d8adb2f38809e5e9a9) Fix: get LiteLLM models on startup ### 📊 Changes **1 file changed** (+7 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `examples/pipelines/providers/litellm_manifold_pipeline.py` (+7 -3) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:15:12 -05:00
yindo closed this issue 2026-02-15 20:15:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/pipelines#348