diff --git a/models/iflytek/spark-x2-flash.toml b/models/iflytek/spark-x2-flash.toml new file mode 100644 index 00000000000..08226ddefe4 --- /dev/null +++ b/models/iflytek/spark-x2-flash.toml @@ -0,0 +1,19 @@ +name = "Spark X2 Flash" +description = "Lightweight iFlytek Spark model for fast, economical text generation" +family = "spark" +release_date = "2026-06-01" +last_updated = "2026-06-01" +attachment = false +reasoning = true +temperature = true +tool_call = true +structured_output = true +open_weights = false + +[limit] +context = 262_144 +output = 65_536 + +[modalities] +input = ["text"] +output = ["text"] diff --git a/models/iflytek/spark-x2.5-1.7b.toml b/models/iflytek/spark-x2.5-1.7b.toml new file mode 100644 index 00000000000..05c0da164ba --- /dev/null +++ b/models/iflytek/spark-x2.5-1.7b.toml @@ -0,0 +1,24 @@ +name = "Spark X2.5 1.7B" +description = "Ultra-lightweight 1.7B edge Dense model with native 1M context; designed for IoT/smart-home control, robotics, and on-device agents; 90.3% Domux control accuracy at 0.85s avg response" +family = "spark" +release_date = "2026-09-01" +last_updated = "2026-09-01" +attachment = false +reasoning = true +temperature = true +tool_call = false +structured_output = false +knowledge = "2026-08" +open_weights = true + +[limit] +context = 1_048_576 +output = 8_192 + +[modalities] +input = ["text"] +output = ["text"] + +[[weights]] +label = "Hugging Face" +url = "https://huggingface.co/XHToken/Spark-X2.5-1.7B" diff --git a/models/iflytek/spark-x2.5-4b.toml b/models/iflytek/spark-x2.5-4b.toml new file mode 100644 index 00000000000..de2373c34e1 --- /dev/null +++ b/models/iflytek/spark-x2.5-4b.toml @@ -0,0 +1,24 @@ +name = "Spark X2.5 4B" +description = "Compact 4B edge Dense model with native 1M context; hybrid attention (1 full + 3 sliding window layers); 200+ languages; agentic, tool-use, code, and math reasoning" +family = "spark" +release_date = "2026-09-01" +last_updated = "2026-09-01" +attachment = false +reasoning = true +temperature = true +tool_call = true +structured_output = false +knowledge = "2026-08" +open_weights = true + +[limit] +context = 1_048_576 +output = 65_536 + +[modalities] +input = ["text"] +output = ["text"] + +[[weights]] +label = "Hugging Face" +url = "https://huggingface.co/XHToken/Spark-X2.5-4B" diff --git a/models/iflytek/spark-x2.5.toml b/models/iflytek/spark-x2.5.toml new file mode 100644 index 00000000000..9fbc585d4b6 --- /dev/null +++ b/models/iflytek/spark-x2.5.toml @@ -0,0 +1,20 @@ +name = "Spark X2.5" +description = "iFlytek flagship 293B-A30B MoE model with 256K context, 200+ languages, strong at code and agentic tasks" +family = "spark" +release_date = "2026-09-07" +last_updated = "2026-09-07" +attachment = false +reasoning = true +temperature = true +tool_call = true +structured_output = true +knowledge = "2026-08" +open_weights = false + +[limit] +context = 262_144 +output = 65_536 + +[modalities] +input = ["text"] +output = ["text"] diff --git a/packages/core/src/family.ts b/packages/core/src/family.ts index 9f719d80376..deb243e3120 100644 --- a/packages/core/src/family.ts +++ b/packages/core/src/family.ts @@ -445,6 +445,9 @@ export const ModelFamilyValues = [ // Elephant "elephant", + + // iFlytek Spark + "spark", ] as const; export const ModelFamily = z.enum(ModelFamilyValues); diff --git a/providers/iflytek/logo.svg b/providers/iflytek/logo.svg new file mode 100644 index 00000000000..538fed07fec --- /dev/null +++ b/providers/iflytek/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/providers/iflytek/models/deepseek-v3.2.toml b/providers/iflytek/models/deepseek-v3.2.toml new file mode 100644 index 00000000000..77d57eaab3e --- /dev/null +++ b/providers/iflytek/models/deepseek-v3.2.toml @@ -0,0 +1,23 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# DeepSeek-V3.2: 128K context, hybrid reasoning with thinking/non-thinking modes. +# Tool calling SUPPORTED on this host (per host docs, only V3.2 and GLM-4.7). +# Toggle: thinking.type = enabled|disabled per host docs (matching +# established relay baseline from OpenRouter, TokenGo, Novita for this +# hybrid model — toggle only, no graded effort). +# Pricing: Token Plan points 200/40/300 per 1M at 0.01 CNY/point +# (Token Plan doc defines points as the unified meter; 1 point ≈ 0.01 CNY +# is the published conversion for standard members at 200 CNY / 20000 points), +# converted at 7.25 CNY/USD. + +base_model = "deepseek/deepseek-v3.2" +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.28 +output = 0.41 +cache_read = 0.06 diff --git a/providers/iflytek/models/deepseek-v4-flash.toml b/providers/iflytek/models/deepseek-v4-flash.toml new file mode 100644 index 00000000000..47cdafb4298 --- /dev/null +++ b/providers/iflytek/models/deepseek-v4-flash.toml @@ -0,0 +1,30 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# DeepSeek-V4-Flash: 1M context, fast economical reasoning model. +# Toggle: thinking.type = enabled|disabled (OpenAI format) per host docs; +# effort = low|high|max per host docs (host supports thinking intensity +# control for DeepSeek V4 via reasoning_effort or output_config.effort). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 100/20/200 per 1M, converted at 7.25 CNY/USD. + +base_model = "deepseek/deepseek-v4-flash" +tool_call = false + +[[reasoning_options]] +type = "toggle" + +[[reasoning_options]] +type = "effort" +values = ["low", "high", "max"] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.14 +output = 0.28 +cache_read = 0.03 + +[limit] +output = 131_072 diff --git a/providers/iflytek/models/deepseek-v4-pro.toml b/providers/iflytek/models/deepseek-v4-pro.toml new file mode 100644 index 00000000000..81e1cac8baa --- /dev/null +++ b/providers/iflytek/models/deepseek-v4-pro.toml @@ -0,0 +1,30 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# DeepSeek-V4-Pro: 1M context, reasoning model. +# Toggle: thinking.type = enabled|disabled (OpenAI format) per host docs; +# effort = high|max per host docs (host supports thinking intensity control +# for DeepSeek V4 via reasoning_effort or output_config.effort = high|max). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 1200/240/2400 per 1M, converted at 7.25 CNY/USD. + +base_model = "deepseek/deepseek-v4-pro" +tool_call = false + +[[reasoning_options]] +type = "toggle" + +[[reasoning_options]] +type = "effort" +values = ["high", "max"] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 1.66 +output = 3.31 +cache_read = 0.33 + +[limit] +output = 131_072 diff --git a/providers/iflytek/models/glm-4-7-flash.toml b/providers/iflytek/models/glm-4-7-flash.toml new file mode 100644 index 00000000000..1f6ebc3e273 --- /dev/null +++ b/providers/iflytek/models/glm-4-7-flash.toml @@ -0,0 +1,25 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# GLM-4.7-Flash: 128K context on this host (Token Plan listing; lab is 200K). +# Toggle: enable_thinking = true|false per host docs ("仅支持思考的模型不受 +# 此参数影响" — GLM-4.7-Flash is a thinking model, so the toggle applies). +# Matches first-party zhipuai baseline and peers (empiriolabs, poe/novita). +# Tool calling SUPPORTED on this host (per host docs, only V3.2 and GLM-4.7). +# Pricing: Token Plan points 100/20/150 per 1M at 0.01 CNY/point +# (Token Plan doc: 200 CNY / 20000 points for standard members), +# converted at 7.25 CNY/USD. + +base_model = "zhipuai/glm-4.7-flash" +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.14 +output = 0.21 +cache_read = 0.03 + +[limit] +context = 128_000 diff --git a/providers/iflytek/models/glm-5.1.toml b/providers/iflytek/models/glm-5.1.toml new file mode 100644 index 00000000000..a7be6884e26 --- /dev/null +++ b/providers/iflytek/models/glm-5.1.toml @@ -0,0 +1,20 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# GLM-5.1: 200K context on this host (matches lab). +# Toggle: enable_thinking = true|false per host docs (matches lab/peer +# baseline for GLM-5.1; only GLM-5.2 supports graded high/max on this host). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 800/160/2800 per 1M, converted at 7.25 CNY/USD. + +base_model = "zhipuai/glm-5.1" +tool_call = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 1.10 +output = 3.86 +cache_read = 0.22 diff --git a/providers/iflytek/models/glm-5.2.toml b/providers/iflytek/models/glm-5.2.toml new file mode 100644 index 00000000000..ecba9329d07 --- /dev/null +++ b/providers/iflytek/models/glm-5.2.toml @@ -0,0 +1,22 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# GLM-5.2: 1M context on this host (matches lab). +# Reasoning: reasoning_effort = high|max per iFlytek host docs (only GLM-5.2 +# among GLM models supports graded effort on this host via +# reasoning_effort or output_config.effort; GLM-5.1 and GLM-5 expose toggle +# only). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 800/200/2800 per 1M, converted at 7.25 CNY/USD. + +base_model = "zhipuai/glm-5.2" +tool_call = false +reasoning_options = [{ type = "effort", values = ["high", "max"] }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 1.10 +output = 3.86 +cache_read = 0.28 diff --git a/providers/iflytek/models/glm-5.toml b/providers/iflytek/models/glm-5.toml new file mode 100644 index 00000000000..836d1870c5c --- /dev/null +++ b/providers/iflytek/models/glm-5.toml @@ -0,0 +1,20 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# GLM-5: 200K context on this host (matches lab). +# Toggle: enable_thinking = true|false per host docs (matches lab/peer +# baseline for GLM-5; only GLM-5.2 supports graded high/max on this host). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 600/120/2200 per 1M, converted at 7.25 CNY/USD. + +base_model = "zhipuai/glm-5" +tool_call = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.83 +output = 3.03 +cache_read = 0.17 diff --git a/providers/iflytek/models/kimi-k2.5.toml b/providers/iflytek/models/kimi-k2.5.toml new file mode 100644 index 00000000000..6c98396de18 --- /dev/null +++ b/providers/iflytek/models/kimi-k2.5.toml @@ -0,0 +1,30 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Kimi-K2.5: 128K context on this host (Token Plan listing; lab 262K). +# Toggle: enable_thinking = true|false per host docs (enable_thinking bool +# controls thinking on/off; no per-model effort grading on this host for +# Kimi). Tool calling NOT supported on this host (only DeepSeek V3.2 and +# GLM-4.7). Text-only on this API; base lab's multimodal capabilities not +# exposed here. +# Pricing: Token Plan points 400/80/2100 per 1M, converted at 7.25 CNY/USD. + +base_model = "moonshotai/kimi-k2.5" +tool_call = false +attachment = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[modalities] +input = ["text"] +output = ["text"] + +[cost] +input = 0.55 +output = 2.90 +cache_read = 0.11 + +[limit] +context = 128_000 diff --git a/providers/iflytek/models/kimi-k2.6.toml b/providers/iflytek/models/kimi-k2.6.toml new file mode 100644 index 00000000000..d08941c337b --- /dev/null +++ b/providers/iflytek/models/kimi-k2.6.toml @@ -0,0 +1,27 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Kimi-K2.6: 256K context on this host (matches lab). +# Toggle: enable_thinking = true|false per host docs (enable_thinking bool +# controls thinking on/off; no per-model effort grading on this host for +# Kimi). Tool calling NOT supported on this host (only DeepSeek V3.2 and +# GLM-4.7). Text-only on this API; base lab's multimodal capabilities not +# exposed here. +# Pricing: Token Plan points 650/130/2700 per 1M, converted at 7.25 CNY/USD. + +base_model = "moonshotai/kimi-k2.6" +tool_call = false +attachment = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[modalities] +input = ["text"] +output = ["text"] + +[cost] +input = 0.90 +output = 3.72 +cache_read = 0.18 diff --git a/providers/iflytek/models/minimax-m2.5.toml b/providers/iflytek/models/minimax-m2.5.toml new file mode 100644 index 00000000000..63e7150d3c5 --- /dev/null +++ b/providers/iflytek/models/minimax-m2.5.toml @@ -0,0 +1,23 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# MiniMax-M2.5: 128K context on this host (Token Plan listing; lab 204.8K). +# Reasoning: always-on with no caller control (matching peer baseline from +# opencode — reasoning_options = []). reasoning_content returned interleaved. +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 210/42/840 per 1M, converted at 7.25 CNY/USD. + +base_model = "minimax/MiniMax-M2.5" +tool_call = false +reasoning_options = [] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.29 +output = 1.16 +cache_read = 0.06 + +[limit] +context = 128_000 diff --git a/providers/iflytek/models/qwen3-coder-next.toml b/providers/iflytek/models/qwen3-coder-next.toml new file mode 100644 index 00000000000..8ee2d2ccb03 --- /dev/null +++ b/providers/iflytek/models/qwen3-coder-next.toml @@ -0,0 +1,14 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# Qwen3-Coder-Next-FP8: 256K context, code-specialized model. +# Non-reasoning per base lab model. +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: Token Plan points 250/50/1000 per 1M, converted at 7.25 CNY/USD. + +base_model = "alibaba/qwen3-coder-next" +tool_call = false + +[cost] +input = 0.34 +output = 1.38 +cache_read = 0.07 diff --git a/providers/iflytek/models/qwen3.5-35b-a3b.toml b/providers/iflytek/models/qwen3.5-35b-a3b.toml new file mode 100644 index 00000000000..2d1379af736 --- /dev/null +++ b/providers/iflytek/models/qwen3.5-35b-a3b.toml @@ -0,0 +1,32 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Qwen3.5-35B-A3B: 128K context on this host (Token Plan; lab 262_144). +# Toggle: enable_thinking = true|false per host docs. No budget_tokens +# (host does not expose thinking_budget). No graded effort (host "OSS" +# phrase targets OpenAI OSS gpt-oss family, not Qwen; matching +# toggle-only peer baseline). +# Tool calling NOT supported on this host. Text-only on this API; base +# lab is multimodal, attachment/modalities overridden. +# Pricing: Token Plan points 40/8/170 per 1M at 0.01 CNY/point, +# converted at 7.25 CNY/USD. + +base_model = "alibaba/qwen3.5-35b-a3b" +tool_call = false +attachment = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[modalities] +input = ["text"] +output = ["text"] + +[cost] +input = 0.06 +output = 0.23 +cache_read = 0.01 + +[limit] +context = 128_000 diff --git a/providers/iflytek/models/qwen3.5-397b-a17b.toml b/providers/iflytek/models/qwen3.5-397b-a17b.toml new file mode 100644 index 00000000000..a7720e6ade3 --- /dev/null +++ b/providers/iflytek/models/qwen3.5-397b-a17b.toml @@ -0,0 +1,36 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Qwen3.5-397B-A17B: 256K context on this host (Token Plan; lab 262_144). +# Toggle: enable_thinking = true|false per host docs. No budget_tokens +# (host does not expose thinking_budget; DashScope-specific). No graded +# effort (host "仅针对OpenAI开源的OSS模型" phrase targets OpenAI OSS +# gpt-oss family, not Qwen; matching toggle-only peer baseline from +# TokenGo and similar relays). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Text-only on this API; base lab is multimodal, attachment/modalities +# overridden. +# Pricing: Token Plan points 120/24/720 per 1M at 0.01 CNY/point +# (Token Plan doc defines points as the unified meter; 1 point ≈ 0.01 CNY +# is the published conversion for standard members at 200 CNY / 20000 points), +# converted at 7.25 CNY/USD. + +base_model = "alibaba/qwen3.5-397b-a17b" +tool_call = false +attachment = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[modalities] +input = ["text"] +output = ["text"] + +[cost] +input = 0.17 +output = 0.99 +cache_read = 0.03 + +[limit] +context = 256_000 diff --git a/providers/iflytek/models/qwen3.6-35b-a3b.toml b/providers/iflytek/models/qwen3.6-35b-a3b.toml new file mode 100644 index 00000000000..278855ef7fa --- /dev/null +++ b/providers/iflytek/models/qwen3.6-35b-a3b.toml @@ -0,0 +1,32 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Qwen3.6-35B-A3B: 128K context on this host (Token Plan; lab 262_144). +# Toggle: enable_thinking = true|false per host docs. No budget_tokens +# (host does not expose thinking_budget). No graded effort (host "OSS" +# phrase targets OpenAI OSS gpt-oss family, not Qwen; matching +# toggle-only peer baseline). +# Tool calling NOT supported on this host. Text-only on this API; base +# lab is multimodal, attachment/modalities overridden. +# Pricing: Token Plan points 100/20/360 per 1M at 0.01 CNY/point, +# converted at 7.25 CNY/USD. + +base_model = "alibaba/qwen3.6-35b-a3b" +tool_call = false +attachment = false +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[modalities] +input = ["text"] +output = ["text"] + +[cost] +input = 0.14 +output = 0.50 +cache_read = 0.03 + +[limit] +context = 128_000 diff --git a/providers/iflytek/models/spark-x2-flash.toml b/providers/iflytek/models/spark-x2-flash.toml new file mode 100644 index 00000000000..269ac84fac4 --- /dev/null +++ b/providers/iflytek/models/spark-x2-flash.toml @@ -0,0 +1,26 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Spark-X2-Flash: 256K context, lightweight first-party iFlytek model. +# Toggle: enable_thinking = true|false +# Effort: reasoning_effort = high|max +# Thinking content returned in message.reasoning_content (interleaved). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: estimated from Token Plan point ratios (100/20/200 points per 1M) +# at 0.01 CNY/point (Token Plan doc: 200 CNY / 20000 points for standard +# members), converted at 7.25 CNY/USD. + +base_model = "iflytek/spark-x2-flash" +tool_call = false +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["high", "max"] }, +] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.14 +output = 0.28 +cache_read = 0.03 diff --git a/providers/iflytek/models/spark-x2.5-1.7b.toml b/providers/iflytek/models/spark-x2.5-1.7b.toml new file mode 100644 index 00000000000..4c0c0f718cc --- /dev/null +++ b/providers/iflytek/models/spark-x2.5-1.7b.toml @@ -0,0 +1,27 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://maas.xfyun.cn/modelSquare +# Spark-X2.5-1.7B: 1M context, open-weight 1.7B ultra-light edge model. +# Toggle: enable_thinking = true|false per host docs; effort = high|max +# matching the documented Spark reasoning intensity control (same surface +# as the flagship Spark-X2.5 / Spark-X2-Flash on this host). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: listed as 限时免费 (limited-time free) on MaaS model square; +# cost is 0 while the free promotion runs. + +base_model = "iflytek/spark-x2.5-1.7b" + +[[reasoning_options]] +type = "toggle" + +[[reasoning_options]] +type = "effort" +values = ["high", "max"] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0 +output = 0 +cache_read = 0 diff --git a/providers/iflytek/models/spark-x2.5-4b.toml b/providers/iflytek/models/spark-x2.5-4b.toml new file mode 100644 index 00000000000..772f3a2dd88 --- /dev/null +++ b/providers/iflytek/models/spark-x2.5-4b.toml @@ -0,0 +1,28 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://maas.xfyun.cn/modelSquare +# Spark-X2.5-4B: 1M context, open-weight 4B edge Dense model. +# Toggle: enable_thinking = true|false per host docs; effort = high|max +# matching the documented Spark reasoning intensity control (same surface +# as the flagship Spark-X2.5 / Spark-X2-Flash on this host). +# Tool calling NOT supported on this host (only DeepSeek V3.2 and GLM-4.7). +# Pricing: listed as 限时免费 (limited-time free) on MaaS model square; +# cost is 0 while the free promotion runs. + +base_model = "iflytek/spark-x2.5-4b" +tool_call = false + +[[reasoning_options]] +type = "toggle" + +[[reasoning_options]] +type = "effort" +values = ["high", "max"] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0 +output = 0 +cache_read = 0 diff --git a/providers/iflytek/models/spark-x2.5.toml b/providers/iflytek/models/spark-x2.5.toml new file mode 100644 index 00000000000..ec589ad9d0f --- /dev/null +++ b/providers/iflytek/models/spark-x2.5.toml @@ -0,0 +1,27 @@ +# Sources (accessed 2026-09-14): +# https://www.xfyun.cn/doc/spark/TokenPlan.html +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# Spark-X2.5: 256K context, first-party iFlytek flagship (293B-A30B MoE). +# Toggle: enable_thinking = true|false +# Effort: reasoning_effort = high|max +# Thinking content returned in message.reasoning_content (interleaved). +# Pricing: list price CNY 3.2 input / 0.48 cache_read / 12 output per 1M +# tokens → USD 0.44 / 0.07 / 1.65 at 7.25 CNY/USD. Note: a limited-time +# 50% promotion (as of 2026-09) halves these to CNY 1.6/0.24/6; cost above +# reflects the list price since the promotion end date is unpublished. +# Tool calling not supported per host docs. + +base_model = "iflytek/spark-x2.5" +tool_call = false +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["high", "max"] }, +] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.44 +output = 1.65 +cache_read = 0.07 diff --git a/providers/iflytek/provider.toml b/providers/iflytek/provider.toml new file mode 100644 index 00000000000..44c0609f4b3 --- /dev/null +++ b/providers/iflytek/provider.toml @@ -0,0 +1,40 @@ +name = "iFlytek" +npm = "@ai-sdk/openai-compatible" +env = ["IFLYTEK_API_KEY"] +# iFlytek MaaS Inference API (讯飞星辰MaaS推理服务). +# OpenAI-compatible chat completions at /v2/chat/completions. +# Text-only endpoint — base lab multimodal capabilities (image/video/audio +# input on Kimi, Qwen) are not exposed on this API. +# +# Reasoning controls per model family (from host docs, accessed 2026-09-14): +# - DeepSeek V4 Pro: thinking.type toggle (enabled|disabled) + effort +# high|max (host-specific intensity control via reasoning_effort or +# output_config.effort). +# - DeepSeek V4 Flash: thinking.type toggle + effort low|high|max. +# - DeepSeek V3.2: thinking.type toggle only (hybrid model, matches +# established relay baseline from OpenRouter/TokenGo/Novita). +# - GLM-5.2: effort high|max only (only GLM on this host with graded effort). +# - GLM-5.1, GLM-5: enable_thinking toggle only (no graded effort). +# - GLM-4.7-Flash: enable_thinking toggle (matches first-party zhipuai +# baseline and empiriolabs/poe peers; host docs: enable_thinking bool +# applies to thinking models, GLM-4.7-Flash is a thinking model). +# - Kimi K2.5/K2.6: enable_thinking toggle only. +# - MiniMax M2.5: always-on reasoning, no caller control ([]). +# - Qwen 397B/3.6-35B/3.5-35B: enable_thinking toggle only (host "OSS" +# phrase targets OpenAI OSS gpt-oss, not Qwen; no budget_tokens, no +# graded effort). +# - Qwen3-Coder-Next: non-reasoning. +# - Spark-X2.5/X2-Flash (first-party): enable_thinking toggle + effort high|max. +# - Spark-X2.5-4B/1.7B (open-weight): enable_thinking toggle + effort high|max +# (same Spark surface as flagship). +# +# All reasoning models return message.reasoning_content (interleaved). +# Tool calling: only DeepSeek V3.2 and GLM-4.7 series per host docs. +# JSON mode: response_format = {"type": "json_object"} on DeepSeek, GLM, Kimi, +# Qwen series; set search_disable=true recommended under JSON mode. +# +# Sources: +# https://www.xfyun.cn/doc/spark/推理服务-http.html +# https://www.xfyun.cn/doc/spark/TokenPlan.html +doc = "https://www.xfyun.cn/doc/spark/%E6%8E%A8%E7%90%86%E6%9C%8D%E5%8A%A1-http.html" +api = "https://maas-api.cn-huabei-1.xf-yun.com/v2"