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
feat: support auth by api key for ark provider (#7845)
sino1f56a20b626d
diff --git a/api/core/model_runtime/model_providers/volcengine_maas/client.py b/api/core/model_runtime/model_providers/volcengine_maas/client.pyindex 61f3521a436..a4d89dabcbc 100644--- a/api/core/model_runtime/model_providers/volcengine_maas/client.py+++ b/api/core/model_runtime/model_providers/volcengine_maas/client.py@@ -71,11 +71,24 @@ class ArkClientV3:args = {"base_url": credentials['api_endpoint_host'],"region": credentials['volc_region'],- "ak": credentials['volc_access_key_id'],- "sk": credentials['volc_secret_access_key'],}+ if credentials.get("auth_method") == "api_key":+ args = {+ **args,+ "api_key": credentials['volc_api_key'],+ }+ else:+ args = {+ **args,+ "ak": credentials['volc_access_key_id'],+ "sk": credentials['volc_secret_access_key'],+ }+if cls.is_compatible_with_legacy(credentials):- args["base_url"] = DEFAULT_V3_ENDPOINT+ args = {+ **args,+ "base_url": DEFAULT_V3_ENDPOINT+ }client = 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 735ba2b3143..13e00da76fb 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@@ -30,8 +30,28 @@ model_credential_schema:en_US: Enter your Model Namezh_Hans: 输入模型名称credential_form_schemas:+ - variable: auth_method+ required: true+ label:+ en_US: Authentication Method+ zh_Hans: 鉴权方式+ type: select+ default: aksk+ options:+ - label:+ en_US: API Key+ value: api_key+ - label:+ en_US: Access Key / Secret Access Key+ value: aksk+ placeholder:+ en_US: Enter your Authentication Method+ zh_Hans: 选择鉴权方式- variable: volc_access_key_idrequired: true+ show_on:+ - variable: auth_method+ value: aksklabel:en_US: Access Keyzh_Hans: Access Key@@ -41,6 +61,9 @@ model_credential_schema:zh_Hans: 输入您的 Access Key- variable: volc_secret_access_keyrequired: true+ show_on:+ - variable: auth_method+ value: aksklabel:en_US: Secret Access Keyzh_Hans: Secret Access Key@@ -48,6 +71,17 @@ model_credential_schema:placeholder:en_US: Enter your Secret Access Keyzh_Hans: 输入您的 Secret Access Key+ - variable: volc_api_key+ required: true+ show_on:+ - variable: auth_method+ value: api_key+ label:+ en_US: API Key+ type: secret-input+ placeholder:+ en_US: Enter your API Key+ zh_Hans: 输入您的 API Key- variable: volc_regionrequired: truelabel: