make config come as localhost but global variable be set as the transformed endpoint

This commit is contained in:
Lucas Oliveira 2025-09-30 16:21:27 -03:00
parent d018a96923
commit f7c2561760

View file

@ -442,8 +442,6 @@ async def onboarding(request, flows_service):
{"error": "endpoint must be a non-empty string"}, status_code=400
)
current_config.provider.endpoint = body["endpoint"].strip()
if "model_provider" in body and body["model_provider"].strip() == "ollama":
current_config.provider.endpoint = transform_localhost_url(body["endpoint"].strip())
config_updated = True
if "project_id" in body:
@ -540,7 +538,8 @@ async def onboarding(request, flows_service):
# Set base URL for Ollama provider
if provider == "ollama" and "endpoint" in body:
endpoint = body["endpoint"]
endpoint = transform_localhost_url(body["endpoint"])
await clients._create_langflow_global_variable(
"OLLAMA_BASE_URL", endpoint, modify=True
)