From f7426f53e55f8b43fac0e0fa33dcae573f993d33 Mon Sep 17 00:00:00 2001 From: FenjuFu <92919259+FenjuFu@users.noreply.github.com> Date: Mon, 20 Jul 2026 17:10:50 +0800 Subject: [PATCH] feat(provider): add iFlytek Spark provider preset Spark's official endpoint is OpenAI-compatible, so it rides the existing openai_chat_completion path with no new source file - the preset only saves users from hand-typing the base URL, matching how DeepSeek, Moonshot and NVIDIA are wired. Requested in #3077. Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com> --- astrbot/core/config/default.py | 12 ++++++++++++ dashboard/src/utils/providerUtils.js | 1 + 2 files changed, 13 insertions(+) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 52e7036320..2818c697a4 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -1328,6 +1328,18 @@ "proxy": "", "custom_headers": {}, }, + "iFlytek Spark": { + "id": "iflytek_spark", + "provider": "iflytek_spark", + "type": "openai_chat_completion", + "provider_type": "chat_completion", + "enable": True, + "key": [], + "api_base": "https://spark-api-open.xf-yun.com/v1", + "timeout": 120, + "proxy": "", + "custom_headers": {}, + }, "AIHubMix": { "id": "aihubmix", "provider": "aihubmix", diff --git a/dashboard/src/utils/providerUtils.js b/dashboard/src/utils/providerUtils.js index b4f299d210..0ebde04ce2 100644 --- a/dashboard/src/utils/providerUtils.js +++ b/dashboard/src/utils/providerUtils.js @@ -24,6 +24,7 @@ export function getProviderIcon(type) { 'kimi': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/kimi.svg', 'kimi-code': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/kimi.svg', 'longcat': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/longcat-color.svg', + 'iflytek_spark': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/spark-color.svg', 'ppio': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/ppio.svg', 'dify': 'https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons/dify-color.svg', "coze": "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.66.0/icons/coze.svg",