From 7ddcc979722a9e4456314e6cfda10247c51551fd Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Thu, 18 Dec 2025 14:25:36 -0500 Subject: [PATCH 1/4] Update Dockerfile.langflow --- Dockerfile.langflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.langflow b/Dockerfile.langflow index aaa9f5d6..12992fe7 100644 --- a/Dockerfile.langflow +++ b/Dockerfile.langflow @@ -1,4 +1,4 @@ -FROM langflowai/langflow-nightly:1.7.0.dev21 +FROM langflowai/langflow-nightly:1.7.0.dev54 EXPOSE 7860 From 4673782200110a7df95c79f262c602abc1757087 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Tue, 6 Jan 2026 13:15:01 -0300 Subject: [PATCH 2/4] change to 1.7.1 --- Dockerfile.langflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.langflow b/Dockerfile.langflow index 12992fe7..e8011db6 100644 --- a/Dockerfile.langflow +++ b/Dockerfile.langflow @@ -1,4 +1,4 @@ -FROM langflowai/langflow-nightly:1.7.0.dev54 +FROM langflowai/langflow:1.7.1 EXPOSE 7860 From 6f0a143a0a7ac465f25e75238d5f8d7012d68056 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 8 Jan 2026 15:02:08 -0300 Subject: [PATCH 3/4] Make update compatible with new Model Providers structure for updating the components --- src/services/flows_service.py | 109 ++++------------------------------ 1 file changed, 12 insertions(+), 97 deletions(-) diff --git a/src/services/flows_service.py b/src/services/flows_service.py index e97ac2d3..e46cec03 100644 --- a/src/services/flows_service.py +++ b/src/services/flows_service.py @@ -6,28 +6,15 @@ from config.settings import ( LANGFLOW_URL, LANGFLOW_CHAT_FLOW_ID, LANGFLOW_INGEST_FLOW_ID, - OLLAMA_LLM_TEXT_COMPONENT_PATH, OPENAI_EMBEDDING_COMPONENT_DISPLAY_NAME, OPENAI_LLM_COMPONENT_DISPLAY_NAME, - WATSONX_LLM_TEXT_COMPONENT_PATH, clients, - WATSONX_LLM_COMPONENT_PATH, - WATSONX_EMBEDDING_COMPONENT_PATH, - OLLAMA_LLM_COMPONENT_PATH, - OLLAMA_EMBEDDING_COMPONENT_PATH, - WATSONX_EMBEDDING_COMPONENT_DISPLAY_NAME, - WATSONX_LLM_COMPONENT_DISPLAY_NAME, - OLLAMA_EMBEDDING_COMPONENT_DISPLAY_NAME, - OLLAMA_LLM_COMPONENT_DISPLAY_NAME, get_openrag_config, ) import json import os -import re -import copy from datetime import datetime from utils.logging_config import get_logger -from utils.container_utils import transform_localhost_url from utils.telemetry import TelemetryClient, Category, MessageId logger = get_logger(__name__) @@ -1308,27 +1295,30 @@ class FlowsService: updated = False - provider_name = "IBM watsonx.ai" if provider == "watsonx" else "Ollama" if provider == "ollama" else "Anthropic" if provider == "anthropic" else "OpenAI" - - field_name = "provider" if "provider" in template else "agent_llm" + provider_name = "IBM WatsonX" if provider == "watsonx" else "Ollama" if provider == "ollama" else "Anthropic" if provider == "anthropic" else "OpenAI" # Update provider field and call custom_component/update endpoint - if field_name in template: + if "model" in template: + if "options" not in template["model"]: + return False + + model = [item for item in template["model"]["options"] if item["provider"] == provider_name and item["name"] == model_value] + + # First, update the provider value - template[field_name]["value"] = provider_name + template["model"]["value"] = model # Call custom_component/update endpoint to get updated template # Only call if code field exists (custom components should have code) if "code" in template and "value" in template["code"]: code_value = template["code"]["value"] - field_value = provider_name try: update_payload = { "code": code_value, "template": template, - "field": field_name, - "field_value": field_value, + "field": "model", + "field_value": model, "tool_mode": False, } @@ -1356,96 +1346,21 @@ class FlowsService: # Continue with manual updates even if API call fails updated = True - - - # Update model_name field (common to all providers) - if "model" in template: - template["model"]["value"] = model_value - template["model"]["options"] = [model_value] - template["model"]["advanced"] = False - updated = True - elif "model_name" in template: - template["model_name"]["value"] = model_value - template["model_name"]["options"] = [model_value] - template["model_name"]["advanced"] = False - updated = True # Update endpoint/URL field based on provider if endpoint: - if provider == "watsonx" and "base_url" in template: - # Watson uses "url" field - template["base_url"]["value"] = endpoint - template["base_url"]["options"] = [endpoint] - template["base_url"]["show"] = True - template["base_url"]["advanced"] = False - updated = True if provider == "watsonx" and "base_url_ibm_watsonx" in template: # Watson uses "url" field template["base_url_ibm_watsonx"]["value"] = endpoint template["base_url_ibm_watsonx"]["show"] = True template["base_url_ibm_watsonx"]["advanced"] = False updated = True - - if provider == "openai" and "api_key" in template: - template["api_key"]["value"] = "OPENAI_API_KEY" - template["api_key"]["load_from_db"] = True - template["api_key"]["show"] = True - template["api_key"]["advanced"] = False - updated = True - if provider == "openai" and "api_base" in template: - template["api_base"]["value"] = "" - template["api_base"]["load_from_db"] = False - template["api_base"]["show"] = True - template["api_base"]["advanced"] = False - updated = True - - if provider == "anthropic" and "api_key" in template: - template["api_key"]["value"] = "ANTHROPIC_API_KEY" - template["api_key"]["load_from_db"] = True - template["api_key"]["show"] = True - template["api_key"]["advanced"] = False - updated = True - - if provider == "anthropic" and "base_url" in template: - template["base_url"]["value"] = "https://api.anthropic.com" - template["base_url"]["load_from_db"] = False - template["base_url"]["show"] = True - template["base_url"]["advanced"] = True - updated = True - - if provider == "ollama" and "base_url" in template: - template["base_url"]["value"] = "OLLAMA_BASE_URL" - template["base_url"]["load_from_db"] = True - template["base_url"]["show"] = True - template["base_url"]["advanced"] = False - updated = True - - if provider == "ollama" and "api_base" in template: - template["api_base"]["value"] = "OLLAMA_BASE_URL" - template["api_base"]["load_from_db"] = True - template["api_base"]["show"] = True - template["api_base"]["advanced"] = False - updated = True - - if provider == "ollama" and "ollama_base_url" in template: - template["ollama_base_url"]["value"] = "OLLAMA_BASE_URL" - template["ollama_base_url"]["load_from_db"] = True - template["ollama_base_url"]["show"] = True - template["ollama_base_url"]["advanced"] = False - updated = True - + if provider == "watsonx" and "project_id" in template: template["project_id"]["value"] = "WATSONX_PROJECT_ID" template["project_id"]["load_from_db"] = True template["project_id"]["show"] = True template["project_id"]["advanced"] = False updated = True - - if provider == "watsonx" and "api_key" in template: - template["api_key"]["value"] = "WATSONX_API_KEY" - template["api_key"]["load_from_db"] = True - template["api_key"]["show"] = True - template["api_key"]["advanced"] = False - updated = True return updated From cfe29e867cc9cd99e761a6c4749f8a5143b4c5c3 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 8 Jan 2026 15:02:29 -0300 Subject: [PATCH 4/4] Update to latest nightly --- Dockerfile.langflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.langflow b/Dockerfile.langflow index e8011db6..27ef0146 100644 --- a/Dockerfile.langflow +++ b/Dockerfile.langflow @@ -1,4 +1,4 @@ -FROM langflowai/langflow:1.7.1 +FROM langflowai/langflow-nightly:1.7.1.dev14 EXPOSE 7860