Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
api tool support multiple env url (#12249)
mbo1859d57784b1
diff --git a/api/core/tools/utils/parser.py b/api/core/tools/utils/parser.pyindex 30e4fdcf06d..9d88d6d6ef5 100644--- a/api/core/tools/utils/parser.py+++ b/api/core/tools/utils/parser.py@@ -5,6 +5,7 @@ from json import loads as json_loadsfrom json.decoder import JSONDecodeErrorfrom typing import Optional+from flask import requestfrom requests import getfrom yaml import YAMLError, safe_load # type: ignore@@ -29,6 +30,10 @@ class ApiBasedToolSchemaParser:raise ToolProviderNotFoundError("No server found in the openapi yaml.")server_url = openapi["servers"][0]["url"]+ request_env = request.headers.get("X-Request-Env")+ if request_env:+ matched_servers = [server["url"] for server in openapi["servers"] if server["env"] == request_env]+ server_url = matched_servers[0] if matched_servers else server_url# list all interfacesinterfaces = []