From 977f2c423a8e51b127a879b986531601d991c2b2 Mon Sep 17 00:00:00 2001 From: N3ko Date: Thu, 31 Jul 2025 12:15:55 +0800 Subject: [PATCH] chore: simplify model yaml (#308) --- backend/application/modelmgr/modelmgr.go | 2 +- backend/application/singleagent/get.go | 2 +- backend/conf/model/template/model_template_ark.yaml | 11 ++--------- .../template/model_template_ark_doubao-1.5-lite.yaml | 11 ++--------- .../model_template_ark_doubao-1.5-pro-256k.yaml | 10 ++-------- .../model_template_ark_doubao-1.5-pro-32k.yaml | 10 ++-------- .../model_template_ark_doubao-1.5-thinking-pro.yaml | 10 ++-------- ...l_template_ark_doubao-1.5-thinking-vision-pro.yaml | 10 ++-------- .../model_template_ark_doubao-1.5-vision-lite.yaml | 10 ++-------- .../model_template_ark_doubao-1.5-vision-pro.yaml | 10 ++-------- .../model_template_ark_doubao-seed-1.6-flash.yaml | 10 ++-------- .../model_template_ark_doubao-seed-1.6-thinking.yaml | 10 ++-------- .../template/model_template_ark_doubao-seed-1.6.yaml | 10 ++-------- .../template/model_template_ark_volc_deepseek-r1.yaml | 10 ++-------- .../template/model_template_ark_volc_deepseek-v3.yaml | 10 ++-------- backend/conf/model/template/model_template_basic.yaml | 5 ++--- .../conf/model/template/model_template_claude.yaml | 8 +------- .../conf/model/template/model_template_deepseek.yaml | 8 +------- .../conf/model/template/model_template_gemini.yaml | 8 +------- .../conf/model/template/model_template_ollama.yaml | 9 +-------- .../conf/model/template/model_template_openai.yaml | 8 +------- backend/conf/model/template/model_template_qwen.yaml | 8 +------- .../internal/agentflow/agent_flow_builder.go | 2 +- backend/infra/contract/modelmgr/desc.go | 1 - 24 files changed, 37 insertions(+), 156 deletions(-) diff --git a/backend/application/modelmgr/modelmgr.go b/backend/application/modelmgr/modelmgr.go index 5bd575f3..b56dc586 100644 --- a/backend/application/modelmgr/modelmgr.go +++ b/backend/application/modelmgr/modelmgr.go @@ -106,7 +106,7 @@ func modelDo2To(model *modelmgr.Model, locale i18n.Locale) (*developer_api.Model PriceOut: 0, SystemPromptLimit: nil, }, - ModelName: mm.Name, + ModelName: model.Name, ModelClassName: mm.Protocol.TOModelClass().String(), IsOffline: mm.Status != modelmgr.StatusInUse, ModelParams: mps, diff --git a/backend/application/singleagent/get.go b/backend/application/singleagent/get.go index 3cc8bfe7..88c6a84d 100644 --- a/backend/application/singleagent/get.go +++ b/backend/application/singleagent/get.go @@ -259,7 +259,7 @@ func toModelDetail(m *modelmgr.Model) *playground.ModelDetail { return &playground.ModelDetail{ Name: ptr.Of(m.Name), - ModelName: ptr.Of(m.Meta.Name), + ModelName: ptr.Of(m.Name), ModelID: ptr.Of(m.ID), ModelFamily: ptr.Of(int64(mm.Protocol.TOModelClass())), ModelIconURL: ptr.Of(m.IconURL), diff --git a/backend/conf/model/template/model_template_ark.yaml b/backend/conf/model/template/model_template_ark.yaml index d82584c8..878edd7f 100755 --- a/backend/conf/model/template/model_template_ark.yaml +++ b/backend/conf/model/template/model_template_ark.yaml @@ -90,7 +90,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: Doubao protocol: ark capability: function_call: true @@ -107,10 +106,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -118,16 +117,10 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null - custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-lite.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-lite.yaml index 3040640d..520271d9 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-lite.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-lite.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: doubao-1.5-lite protocol: ark capability: function_call: true @@ -82,10 +81,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -93,16 +92,10 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null - custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-pro-256k.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-pro-256k.yaml index e49e33ba..9f6755a6 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-pro-256k.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-pro-256k.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: doubao-1.5-pro-256k protocol: ark capability: function_call: true @@ -82,10 +81,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -93,16 +92,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-pro-32k.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-pro-32k.yaml index cc09ea65..23dd1d42 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-pro-32k.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-pro-32k.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: doubao-1.5-pro-32k protocol: ark capability: function_call: true @@ -82,10 +81,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -93,16 +92,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-pro.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-pro.yaml index 4eff7884..e4257a24 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-pro.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-pro.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-1.5-thinking-pro protocol: ark capability: function_call: true @@ -105,10 +104,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -116,16 +115,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-vision-pro.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-vision-pro.yaml index cf7e4c67..bc4a631e 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-vision-pro.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-thinking-vision-pro.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-1.5-thinking-vision-pro protocol: ark capability: function_call: true @@ -106,10 +105,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -117,16 +116,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-vision-lite.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-vision-lite.yaml index abf737ca..4a394074 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-vision-lite.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-vision-lite.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-1.5-vision-lite protocol: ark capability: function_call: false @@ -105,10 +104,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -116,16 +115,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-1.5-vision-pro.yaml b/backend/conf/model/template/model_template_ark_doubao-1.5-vision-pro.yaml index 8c7c678d..ea09d6d4 100755 --- a/backend/conf/model/template/model_template_ark_doubao-1.5-vision-pro.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-1.5-vision-pro.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-1.5-vision-pro protocol: ark capability: function_call: true @@ -106,10 +105,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -117,16 +116,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-seed-1.6-flash.yaml b/backend/conf/model/template/model_template_ark_doubao-seed-1.6-flash.yaml index 6488f7be..2f51bd82 100755 --- a/backend/conf/model/template/model_template_ark_doubao-seed-1.6-flash.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-seed-1.6-flash.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-seed-1.6-flash protocol: ark capability: function_call: true @@ -106,10 +105,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -117,16 +116,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-seed-1.6-thinking.yaml b/backend/conf/model/template/model_template_ark_doubao-seed-1.6-thinking.yaml index c6d2f2e8..f716c917 100755 --- a/backend/conf/model/template/model_template_ark_doubao-seed-1.6-thinking.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-seed-1.6-thinking.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-seed-1.6-thinking protocol: ark capability: function_call: true @@ -106,10 +105,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -117,16 +116,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml b/backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml index 1571dd7c..9250e91b 100755 --- a/backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml +++ b/backend/conf/model/template/model_template_ark_doubao-seed-1.6.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: doubao-seed-1.6 protocol: ark capability: function_call: true @@ -106,10 +105,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -117,16 +116,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_volc_deepseek-r1.yaml b/backend/conf/model/template/model_template_ark_volc_deepseek-r1.yaml index ae72f3fa..bcfe6d4b 100755 --- a/backend/conf/model/template/model_template_ark_volc_deepseek-r1.yaml +++ b/backend/conf/model/template/model_template_ark_volc_deepseek-r1.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: deepseek-r1-ve protocol: ark capability: function_call: true @@ -82,10 +81,10 @@ meta: reasoning: true prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -93,16 +92,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_ark_volc_deepseek-v3.yaml b/backend/conf/model/template/model_template_ark_volc_deepseek-v3.yaml index efa1fcef..d45b1e12 100755 --- a/backend/conf/model/template/model_template_ark_volc_deepseek-v3.yaml +++ b/backend/conf/model/template/model_template_ark_volc_deepseek-v3.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: deepseek-v3-ve protocol: ark capability: function_call: true @@ -82,10 +81,10 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://ark.cn-beijing.volces.com/api/v3/" api_key: "" timeout: 0s - model: "" + model: "" # model_id / endpoint_id temperature: 0.1 frequency_penalty: 0 presence_penalty: 0 @@ -93,16 +92,11 @@ meta: top_p: 0.7 top_k: 0 stop: [] - openai: null - claude: null ark: region: "" access_key: "" secret_key: "" retry_times: null custom_header: {} - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_basic.yaml b/backend/conf/model/template/model_template_basic.yaml index a46d09a3..e092e600 100755 --- a/backend/conf/model/template/model_template_basic.yaml +++ b/backend/conf/model/template/model_template_basic.yaml @@ -128,7 +128,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: test_model protocol: test_protocol capability: function_call: true @@ -150,7 +149,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: https://localhost:1234/chat/completion + base_url: https://localhost:1234/v1 api_key: qweasdzxc timeout: 10s model: model_name @@ -164,7 +163,7 @@ meta: - bye enable_thinking: false openai: - by_azure: true + by_azure: false api_version: "2024-10-21" response_format: type: text diff --git a/backend/conf/model/template/model_template_claude.yaml b/backend/conf/model/template/model_template_claude.yaml index e3d0200e..5b533a96 100755 --- a/backend/conf/model/template/model_template_claude.yaml +++ b/backend/conf/model/template/model_template_claude.yaml @@ -47,7 +47,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: Claude-3.5-Sonnet protocol: claude capability: function_call: true @@ -64,7 +63,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://api.anthropic.com/v1/" api_key: "" timeout: 0s model: "" @@ -75,16 +74,11 @@ meta: top_p: 1 top_k: 0 stop: [] - openai: null claude: by_bedrock: false access_key: "" secret_access_key: "" session_token: "" region: "" - ark: null - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_deepseek.yaml b/backend/conf/model/template/model_template_deepseek.yaml index 8eef84d9..c5d78f50 100755 --- a/backend/conf/model/template/model_template_deepseek.yaml +++ b/backend/conf/model/template/model_template_deepseek.yaml @@ -69,7 +69,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: DeepSeek-V3 protocol: deepseek capability: function_call: false @@ -85,7 +84,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://api.deepseek.com" api_key: "" timeout: 0s model: "" @@ -96,12 +95,7 @@ meta: top_p: 1 top_k: 0 stop: [] - openai: null - claude: null - ark: null deepseek: response_format_type: text - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_gemini.yaml b/backend/conf/model/template/model_template_gemini.yaml index 1eb2bd4c..638bf852 100755 --- a/backend/conf/model/template/model_template_gemini.yaml +++ b/backend/conf/model/template/model_template_gemini.yaml @@ -88,7 +88,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: Gemini-2.5-Flash protocol: gemini capability: function_call: true @@ -107,7 +106,7 @@ meta: reasoning: true prefill_response: true conn_config: - base_url: "" + base_url: "https://generativelanguage.googleapis.com/" api_key: "" timeout: 0s model: gemini-2.5-flash @@ -118,11 +117,6 @@ meta: top_p: 1 top_k: 0 stop: [] - openai: null - claude: null - ark: null - deepseek: null - qwen: null gemini: backend: 0 project: "" diff --git a/backend/conf/model/template/model_template_ollama.yaml b/backend/conf/model/template/model_template_ollama.yaml index 63d5048f..d6746749 100755 --- a/backend/conf/model/template/model_template_ollama.yaml +++ b/backend/conf/model/template/model_template_ollama.yaml @@ -47,7 +47,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: Gemma-3 protocol: ollama capability: function_call: true @@ -63,7 +62,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "http://host.docker.internal:11434" api_key: "" timeout: 0s model: "" @@ -74,11 +73,5 @@ meta: top_p: 0.95 top_k: 20 stop: [] - openai: null - claude: null - ark: null - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_openai.yaml b/backend/conf/model/template/model_template_openai.yaml index 84fb7449..58ac5ad7 100755 --- a/backend/conf/model/template/model_template_openai.yaml +++ b/backend/conf/model/template/model_template_openai.yaml @@ -128,7 +128,6 @@ default_parameters: zh: 输入及输出设置 en: Input and output settings meta: - name: GPT-4o protocol: openai capability: function_call: true @@ -145,7 +144,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://api.openai.com/v1" api_key: "" timeout: 0s model: "" @@ -162,10 +161,5 @@ meta: response_format: type: text jsonschema: null - claude: null - ark: null - deepseek: null - qwen: null - gemini: null custom: {} status: 0 diff --git a/backend/conf/model/template/model_template_qwen.yaml b/backend/conf/model/template/model_template_qwen.yaml index 6b56d846..8ee7067e 100755 --- a/backend/conf/model/template/model_template_qwen.yaml +++ b/backend/conf/model/template/model_template_qwen.yaml @@ -66,7 +66,6 @@ default_parameters: zh: 生成多样性 en: Generation diversity meta: - name: Qwen3-32B protocol: qwen capability: function_call: true @@ -82,7 +81,7 @@ meta: reasoning: false prefill_response: false conn_config: - base_url: "" + base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1" api_key: "" timeout: 0s model: "" @@ -93,14 +92,9 @@ meta: top_p: 1 top_k: 0 stop: [] - openai: null - claude: null - ark: null - deepseek: null qwen: response_format: type: text jsonschema: null - gemini: null custom: {} status: 0 diff --git a/backend/domain/agent/singleagent/internal/agentflow/agent_flow_builder.go b/backend/domain/agent/singleagent/internal/agentflow/agent_flow_builder.go index 4eb98247..7b8dd179 100644 --- a/backend/domain/agent/singleagent/internal/agentflow/agent_flow_builder.go +++ b/backend/domain/agent/singleagent/internal/agentflow/agent_flow_builder.go @@ -163,7 +163,7 @@ func BuildAgent(ctx context.Context, conf *Config) (r *AgentRunner, err error) { isReActAgent = true requireCheckpoint = true if modelInfo.Meta.Capability != nil && !modelInfo.Meta.Capability.FunctionCall { - return nil, fmt.Errorf("model %v does not support function call", modelInfo.Meta.Name) + return nil, fmt.Errorf("model %v does not support function call", modelInfo.Name) } } diff --git a/backend/infra/contract/modelmgr/desc.go b/backend/infra/contract/modelmgr/desc.go index 9885c13c..ab59b71a 100644 --- a/backend/infra/contract/modelmgr/desc.go +++ b/backend/infra/contract/modelmgr/desc.go @@ -123,7 +123,6 @@ func (p *Parameter) GetString(tp DefaultType) (string, error) { } type ModelMeta struct { - Name string `yaml:"name"` Protocol chatmodel.Protocol `yaml:"protocol"` // 模型通信协议 Capability *Capability `yaml:"capability"` // 模型能力 ConnConfig *chatmodel.Config `yaml:"conn_config"` // 模型连接配置