Browse Source

refac: use selected model for merge response

Timothy Jaeryang Baek 2 months ago
parent
commit
959995c715
1 changed files with 1 additions and 12 deletions
  1. 1 12
      backend/open_webui/routers/tasks.py

+ 1 - 12
backend/open_webui/routers/tasks.py

@@ -653,17 +653,6 @@ async def generate_moa_response(
             detail="Model not found",
         )
 
-    # Check if the user has a custom task model
-    # If the user has a custom task model, use that model
-    task_model_id = get_task_model_id(
-        model_id,
-        request.app.state.config.TASK_MODEL,
-        request.app.state.config.TASK_MODEL_EXTERNAL,
-        models,
-    )
-
-    log.debug(f"generating MOA model {task_model_id} for user {user.email} ")
-
     template = DEFAULT_MOA_GENERATION_PROMPT_TEMPLATE
 
     content = moa_response_generation_template(
@@ -673,7 +662,7 @@ async def generate_moa_response(
     )
 
     payload = {
-        "model": task_model_id,
+        "model": model_id,
         "messages": [{"role": "user", "content": content}],
         "stream": form_data.get("stream", False),
         "metadata": {