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
chore: update default endpoint for ark provider (#7741)
sino7cfebffbb883
diff --git a/api/core/model_runtime/model_providers/volcengine_maas/client.py b/api/core/model_runtime/model_providers/volcengine_maas/client.pyindex 5100494e584..61f3521a436 100644--- a/api/core/model_runtime/model_providers/volcengine_maas/client.py+++ b/api/core/model_runtime/model_providers/volcengine_maas/client.py@@ -32,6 +32,9 @@ from core.model_runtime.entities.message_entities import (UserPromptMessage,)+DEFAULT_V2_ENDPOINT = "maas-api.ml-platform-cn-beijing.volces.com"+DEFAULT_V3_ENDPOINT = "https://ark.cn-beijing.volces.com/api/v3"+class ArkClientV3:endpoint_id: Optional[str] = None@@ -43,16 +46,24 @@ class ArkClientV3:@staticmethoddef is_legacy(credentials: dict) -> bool:+ # match default v2 endpointif ArkClientV3.is_compatible_with_legacy(credentials):return False- sdk_version = credentials.get("sdk_version", "v2")- return sdk_version != "v3"+ # match default v3 endpoint+ if credentials.get("api_endpoint_host") == DEFAULT_V3_ENDPOINT:+ return False+ # only v3 support api_key+ if credentials.get("auth_method") == "api_key":+ return False+ # these cases are considered as sdk v2+ # - modified default v2 endpoint+ # - modified default v3 endpoint and auth without api_key+ return True@staticmethoddef is_compatible_with_legacy(credentials: dict) -> bool:- sdk_version = credentials.get("sdk_version")endpoint = credentials.get("api_endpoint_host")- return sdk_version is None and endpoint == "maas-api.ml-platform-cn-beijing.volces.com"+ return endpoint == DEFAULT_V2_ENDPOINT@classmethoddef from_credentials(cls, credentials):@@ -64,7 +75,7 @@ class ArkClientV3:"sk": credentials['volc_secret_access_key'],}if cls.is_compatible_with_legacy(credentials):- args["base_url"] = "https://ark.cn-beijing.volces.com/api/v3"+ args["base_url"] = DEFAULT_V3_ENDPOINTclient = ArkClientV3(**argsdiff --git a/api/core/model_runtime/model_providers/volcengine_maas/volcengine_maas.yaml b/api/core/model_runtime/model_providers/volcengine_maas/volcengine_maas.yamlindex a00c1b79944..735ba2b3143 100644--- a/api/core/model_runtime/model_providers/volcengine_maas/volcengine_maas.yaml+++ b/api/core/model_runtime/model_providers/volcengine_maas/volcengine_maas.yaml@@ -64,7 +64,7 @@ model_credential_schema:en_US: API Endpoint Hostzh_Hans: API Endpoint Hosttype: text-input- default: maas-api.ml-platform-cn-beijing.volces.com+ default: https://ark.cn-beijing.volces.com/api/v3placeholder:en_US: Enter your API Endpoint Hostzh_Hans: 输入 API Endpoint Host