فهرست منبع

fix: model ids not being applied

Timothy Jaeryang Baek 3 ماه پیش
والد
کامیت
4a2792b4da
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      backend/open_webui/routers/ollama.py
  2. 1 1
      backend/open_webui/routers/openai.py

+ 1 - 1
backend/open_webui/routers/ollama.py

@@ -261,7 +261,7 @@ async def get_all_models(request: Request):
     if request.app.state.config.ENABLE_OLLAMA_API:
         request_tasks = []
         for idx, url in enumerate(request.app.state.config.OLLAMA_BASE_URLS):
-            if (str(idx) not in request.app.state.config.OLLAMA_API_CONFIGS) or (
+            if (str(idx) not in request.app.state.config.OLLAMA_API_CONFIGS) and (
                 url not in request.app.state.config.OLLAMA_API_CONFIGS  # Legacy support
             ):
                 request_tasks.append(send_get_request(f"{url}/api/tags"))

+ 1 - 1
backend/open_webui/routers/openai.py

@@ -266,7 +266,7 @@ async def get_all_models_responses(request: Request) -> list:
 
     request_tasks = []
     for idx, url in enumerate(request.app.state.config.OPENAI_API_BASE_URLS):
-        if (str(idx) not in request.app.state.config.OPENAI_API_CONFIGS) or (
+        if (str(idx) not in request.app.state.config.OPENAI_API_CONFIGS) and (
             url not in request.app.state.config.OPENAI_API_CONFIGS  # Legacy support
         ):
             request_tasks.append(